[quake3-commits] r2266 - in trunk/code: game qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jun 18 12:28:39 EDT 2012
Author: ztm
Date: 2012-06-18 12:28:39 -0400 (Mon, 18 Jun 2012)
New Revision: 2266
Modified:
trunk/code/game/g_items.c
trunk/code/game/g_mover.c
trunk/code/qcommon/q_shared.h
Log:
never set groundEntityNum to -1, use ENTITYNUM_NONE instead
>From /dev/humancontroller.
Modified: trunk/code/game/g_items.c
===================================================================
--- trunk/code/game/g_items.c 2012-06-18 16:27:00 UTC (rev 2265)
+++ trunk/code/game/g_items.c 2012-06-18 16:28:39 UTC (rev 2266)
@@ -953,8 +953,8 @@
int contents;
int mask;
- // if groundentity has been set to -1, it may have been pushed off an edge
- if ( ent->s.groundEntityNum == -1 ) {
+ // if its groundentity has been set to none, it may have been pushed off an edge
+ if ( ent->s.groundEntityNum == ENTITYNUM_NONE ) {
if ( ent->s.pos.trType != TR_GRAVITY ) {
ent->s.pos.trType = TR_GRAVITY;
ent->s.pos.trTime = level.time;
Modified: trunk/code/game/g_mover.c
===================================================================
--- trunk/code/game/g_mover.c 2012-06-18 16:27:00 UTC (rev 2265)
+++ trunk/code/game/g_mover.c 2012-06-18 16:28:39 UTC (rev 2266)
@@ -164,7 +164,7 @@
// may have pushed them off an edge
if ( check->s.groundEntityNum != pusher->s.number ) {
- check->s.groundEntityNum = -1;
+ check->s.groundEntityNum = ENTITYNUM_NONE;
}
block = G_TestEntityPosition( check );
@@ -189,7 +189,7 @@
VectorCopy( (pushed_p-1)->angles, check->s.apos.trBase );
block = G_TestEntityPosition (check);
if ( !block ) {
- check->s.groundEntityNum = -1;
+ check->s.groundEntityNum = ENTITYNUM_NONE;
pushed_p--;
return qtrue;
}
Modified: trunk/code/qcommon/q_shared.h
===================================================================
--- trunk/code/qcommon/q_shared.h 2012-06-18 16:27:00 UTC (rev 2265)
+++ trunk/code/qcommon/q_shared.h 2012-06-18 16:28:39 UTC (rev 2266)
@@ -1277,7 +1277,7 @@
int otherEntityNum; // shotgun sources, etc
int otherEntityNum2;
- int groundEntityNum; // -1 = in air
+ int groundEntityNum; // ENTITYNUM_NONE = in air
int constantLight; // r + (g<<8) + (b<<16) + (intensity<<24)
int loopSound; // constantly loop this sound
More information about the quake3-commits
mailing list