mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-13 23:28:04 +03:00
Player reset zoom & speed. (#541)
* RemoveAllItems: reset (update) player speed. * RemoveAllItems: reset player zoom. * RemovePlayerItem: reset player zoom & speed * CFuncTank->StartControl: fully reset zoom.
This commit is contained in:
parent
0dd9b97c37
commit
27c15c38f6
@ -245,7 +245,11 @@ BOOL CFuncTank::StartControl(CBasePlayer *pController)
|
||||
#endif
|
||||
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
m_pController->m_iFOV = DEFAULT_FOV;
|
||||
// if (m_pController->m_iFOV != DEFAULT_FOV)
|
||||
{
|
||||
m_pController->pev->fov = m_pController->m_iFOV = m_pController->m_iLastZoom = DEFAULT_FOV;
|
||||
m_pController->m_bResumeZoom = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1596,6 +1596,14 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
||||
pev->viewmodel = 0;
|
||||
pev->weaponmodel = 0;
|
||||
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// if (m_iFOV != DEFAULT_FOV)
|
||||
{
|
||||
pev->fov = m_iFOV = m_iLastZoom = DEFAULT_FOV;
|
||||
m_bResumeZoom = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (removeSuit)
|
||||
pev->weapons = 0;
|
||||
else
|
||||
@ -1611,6 +1619,8 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
||||
|
||||
m_bHasNightVision = false;
|
||||
SendItemStatus();
|
||||
|
||||
ResetMaxSpeed();
|
||||
#endif
|
||||
|
||||
// send Selected Weapon Message to our client
|
||||
@ -6669,6 +6679,17 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(RemovePlayerItem)(CBasePlayerItem *pItem)
|
||||
if (m_pActiveItem == pItem)
|
||||
{
|
||||
ResetAutoaim();
|
||||
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
// if (m_iFOV != DEFAULT_FOV)
|
||||
{
|
||||
pev->fov = m_iFOV = m_iLastZoom = DEFAULT_FOV;
|
||||
m_bResumeZoom = false;
|
||||
|
||||
ResetMaxSpeed();
|
||||
}
|
||||
#endif
|
||||
|
||||
pItem->pev->nextthink = 0;
|
||||
|
||||
pItem->SetThink(nullptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user