Browse Source

Remove vendetta code.

poke646
Night Owl 8 years ago
parent
commit
d94bc0d5e0
  1. 58
      dlls/doors.cpp

58
dlls/doors.cpp

@ -71,8 +71,6 @@ public:
BYTE m_bLockedSentence; BYTE m_bLockedSentence;
BYTE m_bUnlockedSound; BYTE m_bUnlockedSound;
BYTE m_bUnlockedSentence; BYTE m_bUnlockedSentence;
BOOL m_bIsEndBossDoor;
int m_iNumTimesItWasOpen;
}; };
TYPEDESCRIPTION CBaseDoor::m_SaveData[] = TYPEDESCRIPTION CBaseDoor::m_SaveData[] =
@ -85,9 +83,6 @@ TYPEDESCRIPTION CBaseDoor::m_SaveData[] =
DEFINE_FIELD( CBaseDoor, m_bLockedSentence, FIELD_CHARACTER ), DEFINE_FIELD( CBaseDoor, m_bLockedSentence, FIELD_CHARACTER ),
DEFINE_FIELD( CBaseDoor, m_bUnlockedSound, FIELD_CHARACTER ), DEFINE_FIELD( CBaseDoor, m_bUnlockedSound, FIELD_CHARACTER ),
DEFINE_FIELD( CBaseDoor, m_bUnlockedSentence, 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 ) IMPLEMENT_SAVERESTORE( CBaseDoor, CBaseToggle )
@ -321,18 +316,6 @@ void CBaseDoor::Spawn()
} }
else // touchable button else // touchable button
SetTouch( &CBaseDoor::DoorTouch ); 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 ) void CBaseDoor::SetToggleState( int state )
@ -678,41 +661,22 @@ void CBaseDoor::DoorHitTop( void )
ASSERT( m_toggle_state == TS_GOING_UP ); ASSERT( m_toggle_state == TS_GOING_UP );
m_toggle_state = TS_AT_TOP; m_toggle_state = TS_AT_TOP;
m_iNumTimesItWasOpen++; // toggle-doors don't come down automatically, they wait for refire.
if( FBitSet( pev->spawnflags, SF_DOOR_NO_AUTO_RETURN ) )
if( m_bIsEndBossDoor )
{ {
if( m_iNumTimesItWasOpen < 2 ) // Re-instate touch method, movement is complete
{ if( !FBitSet( pev->spawnflags, SF_DOOR_USE_ONLY ) )
// In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open SetTouch( &CBaseDoor::DoorTouch );
pev->nextthink = pev->ltime + 1;
SetThink( &CBaseDoor::DoorGoDown );
}
else
{
m_flWait = -1;
pev->nextthink = -1;
}
} }
else else
{ {
// toggle-doors don't come down automatically, they wait for refire. // In flWait seconds, DoorGoDown will fire, unless wait is -1, then door stays open
if( FBitSet( pev->spawnflags, SF_DOOR_NO_AUTO_RETURN ) ) pev->nextthink = pev->ltime + m_flWait;
{ SetThink( &CBaseDoor::DoorGoDown );
// 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 );
if( m_flWait == -1 ) if( m_flWait == -1 )
{ {
pev->nextthink = -1; pev->nextthink = -1;
}
} }
} }

Loading…
Cancel
Save