]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
added more developer_memorydebug sentinel checks, and made developer_memorydebug...
[xonotic/darkplaces.git] / sv_user.c
index 37fe57417d88e4d27b4421e0bfb80f17aa0c1338..f251a8bc0c4db2c7ac019596679eccb98a69fb92 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -700,17 +700,22 @@ void SV_ReadClientMove (void)
 
 void SV_ApplyClientMove (void)
 {
+#ifdef NUM_PING_TIMES
        int i;
-       prvm_eval_t *val;
        float total;
+#endif
+       prvm_eval_t *val;
        usercmd_t *move = &host_client->cmd;
 
        // calculate average ping time
+       host_client->ping = move->receivetime - move->time;
+#ifdef NUM_PING_TIMES
        host_client->ping_times[host_client->num_pings % NUM_PING_TIMES] = move->receivetime - move->time;
        host_client->num_pings++;
        for (i=0, total = 0;i < NUM_PING_TIMES;i++)
                total += host_client->ping_times[i];
        host_client->ping = total / NUM_PING_TIMES;
+#endif
 
        // set the edict fields
        host_client->edict->fields.server->button0 = move->buttons & 1;