diff --git a/dlls/doors.cpp b/dlls/doors.cpp index f9219d02..bf7205ee 100644 --- a/dlls/doors.cpp +++ b/dlls/doors.cpp @@ -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; } }