Fix some triggers from not working without the GS_DEVELOPER define set, because ::Respawn() is required for trigger volumes to be registered as such when not exactly visible

This commit is contained in:
Marco Cawthorne 2019-02-25 18:19:54 +01:00
parent b393367f4e
commit 8d0ba69a0e
9 changed files with 25 additions and 2 deletions

View file

@ -83,10 +83,10 @@ void CBaseTrigger :: InitPointTrigger ( void )
void CBaseTrigger :: InitBrushTrigger ( void )
{
precache_model( model );
precache_model( m_oldModel );
movetype = MOVETYPE_NONE;
solid = SOLID_TRIGGER;
setmodel( this, model );
setmodel( this, m_oldModel );
#ifdef GS_DEVELOPER
alpha = 0.5f;
effects = EF_FLAG2;

View file

@ -74,6 +74,10 @@ void trigger_hurt :: Touch ( void )
void trigger_hurt :: Respawn ( void )
{
solid = SOLID_TRIGGER;
#ifdef GS_DEVELOPER
alpha = 0.5f;
#endif
if ( spawnflags & SF_HURT_OFF ) {
solid = SOLID_NOT;
}

View file

@ -10,6 +10,7 @@ class trigger_teleport : CBaseTrigger
{
void() trigger_teleport;
virtual void() touch;
virtual void() Respawn;
};
void trigger_teleport :: touch ( void )
@ -23,6 +24,14 @@ void trigger_teleport :: touch ( void )
}
}
void trigger_teleport :: Respawn( void )
{
solid = SOLID_TRIGGER;
#ifdef GS_DEVELOPER
alpha = 0.5f;
#endif
}
void trigger_teleport :: trigger_teleport ( void )
{
CBaseTrigger::CBaseTrigger();

View file

@ -10,6 +10,7 @@ class func_bomb_target:CBaseTrigger
{
void() func_bomb_target;
virtual void() touch;
virtual void() Respawn;
};
void func_bomb_target::touch(void)
@ -24,8 +25,17 @@ void func_bomb_target::touch(void)
}
}
void func_bomb_target::Respawn(void)
{
solid = SOLID_TRIGGER;
#ifdef GS_DEVELOPER
alpha = 0.5f;
#endif
}
void func_bomb_target::func_bomb_target(void)
{
func_bomb_target::Respawn();
CBaseTrigger::CBaseTrigger();
CBaseTrigger::InitBrushTrigger();
iBombZones++;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.