From: havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Sun, 23 Dec 2007 15:05:09 +0000 (+0000)
Subject: improved NaN velocity/NaN origin warnings, they now print the entity
X-Git-Tag: xonotic-v0.1.0preview~2645
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff5e045d96c0815080d93fca3b48978dead980d4;p=xonotic%2Fdarkplaces.git

improved NaN velocity/NaN origin warnings, they now print the entity
number


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

diff --git a/sv_phys.c b/sv_phys.c
index 5169028e..b7adc93b 100644
--- 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;
 		}
 	}