mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-04 11:04:28 +00:00
Merge 52209adc33
This commit is contained in:
parent
cbdf9b5d04
commit
004054586b
@ -351,6 +351,7 @@ BOOL CFuncTank::StartControl( CBasePlayer *pController )
|
|||||||
ALERT( at_console, "using TANK!\n");
|
ALERT( at_console, "using TANK!\n");
|
||||||
|
|
||||||
m_pController = pController;
|
m_pController = pController;
|
||||||
|
m_pController->m_pTank = this;
|
||||||
if( m_pController->m_pActiveItem )
|
if( m_pController->m_pActiveItem )
|
||||||
{
|
{
|
||||||
m_pController->m_pActiveItem->Holster();
|
m_pController->m_pActiveItem->Holster();
|
||||||
@ -380,6 +381,8 @@ void CFuncTank::StopControl()
|
|||||||
m_pController->m_iHideHUD &= ~HIDEHUD_WEAPONS;
|
m_pController->m_iHideHUD &= ~HIDEHUD_WEAPONS;
|
||||||
|
|
||||||
pev->nextthink = 0;
|
pev->nextthink = 0;
|
||||||
|
|
||||||
|
m_pController->m_pTank = NULL;
|
||||||
m_pController = NULL;
|
m_pController = NULL;
|
||||||
|
|
||||||
if( IsActive() )
|
if( IsActive() )
|
||||||
@ -426,7 +429,6 @@ void CFuncTank::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
|
|||||||
}
|
}
|
||||||
else if( !m_pController && useType != USE_OFF )
|
else if( !m_pController && useType != USE_OFF )
|
||||||
{
|
{
|
||||||
( (CBasePlayer*)pActivator )->m_pTank = this;
|
|
||||||
StartControl( (CBasePlayer*)pActivator );
|
StartControl( (CBasePlayer*)pActivator );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -792,10 +792,7 @@ void CBasePlayer::RemoveAllItems( BOOL removeSuit )
|
|||||||
m_pLastItem = NULL;
|
m_pLastItem = NULL;
|
||||||
|
|
||||||
if( m_pTank != 0 )
|
if( m_pTank != 0 )
|
||||||
{
|
|
||||||
m_pTank->Use( this, this, USE_OFF, 0 );
|
m_pTank->Use( this, this, USE_OFF, 0 );
|
||||||
m_pTank = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
CBasePlayerItem *pPendingItem;
|
CBasePlayerItem *pPendingItem;
|
||||||
@ -856,10 +853,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib )
|
|||||||
g_pGameRules->PlayerKilled( this, pevAttacker, g_pevLastInflictor );
|
g_pGameRules->PlayerKilled( this, pevAttacker, g_pevLastInflictor );
|
||||||
|
|
||||||
if( m_pTank != 0 )
|
if( m_pTank != 0 )
|
||||||
{
|
|
||||||
m_pTank->Use( this, this, USE_OFF, 0 );
|
m_pTank->Use( this, this, USE_OFF, 0 );
|
||||||
m_pTank = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// this client isn't going to be thinking for a while, so reset the sound until they respawn
|
// this client isn't going to be thinking for a while, so reset the sound until they respawn
|
||||||
pSound = CSoundEnt::SoundPointerForIndex( CSoundEnt::ClientSoundIndex( edict() ) );
|
pSound = CSoundEnt::SoundPointerForIndex( CSoundEnt::ClientSoundIndex( edict() ) );
|
||||||
@ -1402,10 +1396,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle )
|
|||||||
m_pActiveItem->Holster();
|
m_pActiveItem->Holster();
|
||||||
|
|
||||||
if( m_pTank != 0 )
|
if( m_pTank != 0 )
|
||||||
{
|
|
||||||
m_pTank->Use( this, this, USE_OFF, 0 );
|
m_pTank->Use( this, this, USE_OFF, 0 );
|
||||||
m_pTank = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// clear out the suit message cache so we don't keep chattering
|
// clear out the suit message cache so we don't keep chattering
|
||||||
SetSuitUpdate( NULL, FALSE, 0 );
|
SetSuitUpdate( NULL, FALSE, 0 );
|
||||||
@ -1481,7 +1472,6 @@ void CBasePlayer::PlayerUse( void )
|
|||||||
// Stop controlling the tank
|
// Stop controlling the tank
|
||||||
// TODO: Send HUD Update
|
// TODO: Send HUD Update
|
||||||
m_pTank->Use( this, this, USE_OFF, 0 );
|
m_pTank->Use( this, this, USE_OFF, 0 );
|
||||||
m_pTank = NULL;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2520,7 +2510,6 @@ void CBasePlayer::PostThink()
|
|||||||
{
|
{
|
||||||
// they've moved off the platform
|
// they've moved off the platform
|
||||||
m_pTank->Use( this, this, USE_OFF, 0 );
|
m_pTank->Use( this, this, USE_OFF, 0 );
|
||||||
m_pTank = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user