summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-02-07 18:58:23 +0100
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:09 +0100
commit5c84a2b60360fb956715456c5edc5a21628f1d74 (patch)
treef35fd29f5a0b30b470a8d85b4b9d8fc3c43c00ae /src/game/g_buildable.c
parent069a74c854991bba55770a4f2143a4576bc47dcb (diff)
never set groundEntityNum to -1, use ENTITYNUM_NONE instead
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 77ae43c8..58977872 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -583,7 +583,7 @@ qboolean G_FindCreep( gentity_t *self )
vec3_t temp_v;
//don't check for creep if flying through the air
- if( !self->client && self->s.groundEntityNum == -1 )
+ if( !self->client && self->s.groundEntityNum == ENTITYNUM_NONE )
return qtrue;
//if self does not have a parentNode or it's parentNode is invalid find a new one
@@ -865,7 +865,7 @@ void ASpawn_Think( gentity_t *self )
if( self->spawned )
{
//only suicide if at rest
- if( self->s.groundEntityNum )
+ if( self->s.groundEntityNum != ENTITYNUM_NONE )
{
if( ( ent = G_CheckSpawnPoint( self->s.number, self->s.origin,
self->s.origin2, BA_A_SPAWN, NULL ) ) != NULL )
@@ -1686,7 +1686,7 @@ void HSpawn_Think( gentity_t *self )
if( self->spawned )
{
//only suicide if at rest
- if( self->s.groundEntityNum )
+ if( self->s.groundEntityNum != ENTITYNUM_NONE )
{
if( ( ent = G_CheckSpawnPoint( self->s.number, self->s.origin,
self->s.origin2, BA_H_SPAWN, NULL ) ) != NULL )
@@ -3678,7 +3678,7 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable,
built->s.pos.trType = BG_Buildable( buildable )->traj;
built->s.pos.trTime = level.time;
built->physicsBounce = BG_Buildable( buildable )->bounce;
- built->s.groundEntityNum = -1;
+ built->s.groundEntityNum = ENTITYNUM_NONE;
built->s.generic1 = MAX( built->health, 0 );