diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_trigger.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/g_trigger.c b/src/game/g_trigger.c index a9ecd1a3..f9472e0e 100644 --- a/src/game/g_trigger.c +++ b/src/game/g_trigger.c @@ -420,7 +420,7 @@ void SP_trigger_hurt( gentity_t *self ) self->noise_index = G_SoundIndex( "sound/misc/electro.wav" ); self->touch = hurt_touch; - if( !self->damage ) + if( self->damage <= 0 ) self->damage = 5; self->r.contents = CONTENTS_TRIGGER; @@ -1067,6 +1067,12 @@ void SP_trigger_heal( gentity_t *self ) { G_SpawnInt( "heal", "5", &self->damage ); + if( self->damage <= 0 ) + { + self->damage = 1; + G_Printf( S_COLOR_YELLOW "WARNING: trigger_heal with negative damage key\n" ); + } + self->touch = trigger_heal_touch; self->use = trigger_heal_use; @@ -1140,6 +1146,12 @@ void SP_trigger_ammo( gentity_t *self ) { G_SpawnInt( "ammo", "1", &self->damage ); + if( self->damage <= 0 ) + { + self->damage = 1; + G_Printf( S_COLOR_YELLOW "WARNING: trigger_ammo with negative ammo key\n" ); + } + self->touch = trigger_ammo_touch; InitTrigger( self ); |