]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
improved NaN velocity/NaN origin warnings, they now print the entity
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Dec 2007 15:05:09 +0000 (15:05 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Dec 2007 15:05:09 +0000 (15:05 +0000)
number

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7846 d7cf8633-e32d-0410-b094-e92efae38249

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;
                }
        }