|
|
|
@ -71,8 +71,6 @@ public:
@@ -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[] =
@@ -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()
@@ -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,24 +661,6 @@ void CBaseDoor::DoorHitTop( void )
@@ -678,24 +661,6 @@ void CBaseDoor::DoorHitTop( void )
|
|
|
|
|
ASSERT( m_toggle_state == TS_GOING_UP ); |
|
|
|
|
m_toggle_state = TS_AT_TOP; |
|
|
|
|
|
|
|
|
|
m_iNumTimesItWasOpen++; |
|
|
|
|
|
|
|
|
|
if( m_bIsEndBossDoor ) |
|
|
|
|
{ |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
// toggle-doors don't come down automatically, they wait for refire.
|
|
|
|
|
if( FBitSet( pev->spawnflags, SF_DOOR_NO_AUTO_RETURN ) ) |
|
|
|
|
{ |
|
|
|
@ -714,7 +679,6 @@ void CBaseDoor::DoorHitTop( void )
@@ -714,7 +679,6 @@ void CBaseDoor::DoorHitTop( void )
|
|
|
|
|
pev->nextthink = -1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Fire the close target (if startopen is set, then "top" is closed) - netname is the close target
|
|
|
|
|
if( pev->netname && ( pev->spawnflags & SF_DOOR_START_OPEN ) ) |
|
|
|
|