mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Remove vendetta code.
This commit is contained in:
parent
163bc4cb73
commit
d94bc0d5e0
@ -71,8 +71,6 @@ public:
|
||||
BYTE m_bLockedSentence;
|
||||
BYTE m_bUnlockedSound;
|
||||
BYTE m_bUnlockedSentence;
|
||||
BOOL m_bIsEndBossDoor;
|
||||
int m_iNumTimesItWasOpen;
|
||||
};
|
||||
|
||||
TYPEDESCRIPTION CBaseDoor::m_SaveData[] =
|
||||
@ -85,9 +83,6 @@ TYPEDESCRIPTION CBaseDoor::m_SaveData[] =
|
||||
DEFINE_FIELD( CBaseDoor, m_bLockedSentence, FIELD_CHARACTER ),
|
||||
DEFINE_FIELD( CBaseDoor, m_bUnlockedSound, FIELD_CHARACTER ),
|
||||
DEFINE_FIELD( CBaseDoor, m_bUnlockedSentence, FIELD_CHARACTER ),
|
||||
|
||||
DEFINE_FIELD( CBaseDoor, m_bIsEndBossDoor, FIELD_BOOLEAN ),
|
||||
DEFINE_FIELD( CBaseDoor, m_iNumTimesItWasOpen, FIELD_INTEGER ),
|
||||
};
|
||||
|
||||
IMPLEMENT_SAVERESTORE( CBaseDoor, CBaseToggle )
|
||||
@ -321,18 +316,6 @@ void CBaseDoor::Spawn()
|
||||
}
|
||||
else // touchable button
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
|
||||
m_bIsEndBossDoor = FALSE;
|
||||
m_iNumTimesItWasOpen = 0;
|
||||
|
||||
if( FStrEq( STRING( gpGlobals->mapname ), "pv_asl02" ) && FStrEq( STRING( pev->targetname ), "robogate" ) )
|
||||
{
|
||||
m_bIsEndBossDoor = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bIsEndBossDoor = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void CBaseDoor::SetToggleState( int state )
|
||||
@ -678,41 +661,22 @@ void CBaseDoor::DoorHitTop( void )
|
||||
ASSERT( m_toggle_state == TS_GOING_UP );
|
||||
m_toggle_state = TS_AT_TOP;
|
||||
|
||||
m_iNumTimesItWasOpen++;
|
||||
|
||||
if( m_bIsEndBossDoor )
|
||||
// toggle-doors don't come down automatically, they wait for refire.
|
||||
if( FBitSet( pev->spawnflags, SF_DOOR_NO_AUTO_RETURN ) )
|
||||
{
|
||||
if( m_iNumTimesItWasOpen < 2 )
|
||||
{
|
||||
// In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open
|
||||
pev->nextthink = pev->ltime + 1;
|
||||
SetThink( &CBaseDoor::DoorGoDown );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_flWait = -1;
|
||||
pev->nextthink = -1;
|
||||
}
|
||||
// Re-instate touch method, movement is complete
|
||||
if( !FBitSet( pev->spawnflags, SF_DOOR_USE_ONLY ) )
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
}
|
||||
else
|
||||
{
|
||||
// toggle-doors don't come down automatically, they wait for refire.
|
||||
if( FBitSet( pev->spawnflags, SF_DOOR_NO_AUTO_RETURN ) )
|
||||
{
|
||||
// Re-instate touch method, movement is complete
|
||||
if( !FBitSet( pev->spawnflags, SF_DOOR_USE_ONLY ) )
|
||||
SetTouch( &CBaseDoor::DoorTouch );
|
||||
}
|
||||
else
|
||||
{
|
||||
// In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open
|
||||
pev->nextthink = pev->ltime + m_flWait;
|
||||
SetThink( &CBaseDoor::DoorGoDown );
|
||||
// In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open
|
||||
pev->nextthink = pev->ltime + m_flWait;
|
||||
SetThink( &CBaseDoor::DoorGoDown );
|
||||
|
||||
if( m_flWait == -1 )
|
||||
{
|
||||
pev->nextthink = -1;
|
||||
}
|
||||
if( m_flWait == -1 )
|
||||
{
|
||||
pev->nextthink = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user