diff options
author | /dev/humancontroller <devhc@example.com> | 2017-02-07 18:39:19 +0100 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:09 +0100 |
commit | 69f688e1658f4d934d3a0eca00e8fde1d07273b4 (patch) | |
tree | a88d1303ea60edf8eda53f7a27e4a4c8135ca95a | |
parent | ef371ec4b5069dfda294e660053c7c929b986f1c (diff) |
never use a passEntityNum of -1 in trace calls, use ENTITYNUM_NONE instead
-rw-r--r-- | src/game/g_buildable.c | 2 | ||||
-rw-r--r-- | src/game/g_misc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 136794e0..796aff15 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -100,7 +100,7 @@ gentity_t *G_CheckSpawnPoint( int spawnNum, const vec3_t origin, if( tr.entityNum != ENTITYNUM_NONE ) return &g_entities[ tr.entityNum ]; - trap_Trace( &tr, localOrigin, cmins, cmaxs, localOrigin, -1, MASK_PLAYERSOLID ); + trap_Trace( &tr, localOrigin, cmins, cmaxs, localOrigin, ENTITYNUM_NONE, MASK_PLAYERSOLID ); if( tr.entityNum != ENTITYNUM_NONE ) return &g_entities[ tr.entityNum ]; diff --git a/src/game/g_misc.c b/src/game/g_misc.c index 1915921e..8fb70b1b 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -392,11 +392,11 @@ static void findEmptySpot( vec3_t origin, float radius, vec3_t spot ) VectorAdd( origin, delta, test ); - trap_Trace( &tr, test, NULL, NULL, test, -1, MASK_SOLID ); + trap_Trace( &tr, test, NULL, NULL, test, ENTITYNUM_NONE, MASK_SOLID ); if( !tr.allsolid ) { - trap_Trace( &tr, test, NULL, NULL, origin, -1, MASK_SOLID ); + trap_Trace( &tr, test, NULL, NULL, origin, ENTITYNUM_NONE, MASK_SOLID ); VectorScale( delta, tr.fraction, delta ); VectorAdd( total, delta, total ); } |