]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - lhnet.c
forgot to give strlcat a size
[xonotic/darkplaces.git] / lhnet.c
diff --git a/lhnet.c b/lhnet.c
index 259928e718dc6b8d085ccd5b720aff9f6a3e92c9..4b33180bb31b179ed9336f6892b0807c06435d16 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -460,7 +460,7 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address)
 #endif
                                        {
 #ifdef WIN32
-                                               size_t namelen;
+                                               int namelen;
 #else
                                                socklen_t namelen;
 #endif
@@ -565,7 +565,7 @@ int LHNET_Read(lhnetsocket_t *lhnetsocket, void *content, int maxcontentlength,
                                continue;
                        }
 #ifndef STANDALONETEST
-                       if (p->sentdoubletime && Sys_DoubleTime() < p->sentdoubletime)
+                       if (cl_netlocalping.value && (Sys_DoubleTime() - cl_netlocalping.value * 1000.0) < p->sentdoubletime)
                                continue;
 #endif
                        if (value == 0 && p->destinationport == lhnetsocket->address.addressdata.loop.port)
@@ -681,8 +681,7 @@ int LHNET_Write(lhnetsocket_t *lhnetsocket, const void *content, int contentleng
                p->next->prev = p;
                p->prev->next = p;
 #ifndef STANDALONETEST
-               if (cl_netlocalping_min.value || cl_netlocalping_max.value)
-                       p->sentdoubletime = Sys_DoubleTime() + lhrandom(cl_netlocalping_min.value, cl_netlocalping_max.value) * (0.5 / 1000.0);
+               p->sentdoubletime = Sys_DoubleTime();
 #endif
                value = contentlength;
        }