]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
improved NaN velocity/NaN origin warnings, they now print the entity
[xonotic/darkplaces.git] / sv_phys.c
index 5169028e8095938baf89a463c5e0d40f38b948fa..b7adc93ba1c0be1be68fe8d7eb28258f45dfbe91 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -552,12 +552,12 @@ void SV_CheckVelocity (prvm_edict_t *ent)
        {
                if (IS_NAN(ent->fields.server->velocity[i]))
                {
-                       Con_Printf("Got a NaN velocity on %s\n", PRVM_GetString(ent->fields.server->classname));
+                       Con_Printf("Got a NaN velocity on entity #%i (%s)\n", PRVM_NUM_FOR_EDICT(ent), PRVM_GetString(ent->fields.server->classname));
                        ent->fields.server->velocity[i] = 0;
                }
                if (IS_NAN(ent->fields.server->origin[i]))
                {
-                       Con_Printf("Got a NaN origin on %s\n", PRVM_GetString(ent->fields.server->classname));
+                       Con_Printf("Got a NaN origin on entity #%i (%s)\n", PRVM_NUM_FOR_EDICT(ent), PRVM_GetString(ent->fields.server->classname));
                        ent->fields.server->origin[i] = 0;
                }
        }