]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - svvm_cmds.c
Fix compiler warning in custom stat clearing
[xonotic/darkplaces.git] / svvm_cmds.c
index 0e1a8720f61f1ab652fd2d81f1317c6a1eb4a988..5b99fc904d4bc992335128f46b9895dcb42f092f 100644 (file)
@@ -1636,11 +1636,8 @@ static int vm_customstats_last;
 
 void VM_CustomStats_Clear (void)
 {
-       if(vm_customstats)
-       {
-               memset(vm_customstats, 0, sizeof(vm_customstats));
-               vm_customstats_last = -1;
-       }
+       memset(vm_customstats, 0, sizeof(vm_customstats));
+       vm_customstats_last = -1;
 }
 
 void VM_SV_UpdateCustomStats (client_t *client, prvm_edict_t *ent, sizebuf_t *msg, int *stats)
@@ -1780,6 +1777,8 @@ static void VM_SV_copyentity(prvm_prog_t *prog)
                return;
        }
        memcpy(out->fields.fp, in->fields.fp, prog->entityfields * sizeof(prvm_vec_t));
+       if (VectorCompare(PRVM_serveredictvector(out, absmin), PRVM_serveredictvector(out, absmax)))
+               return;
        SV_LinkEdict(out);
 }