mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-14 21:42:27 +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
|
#endif
|
||||||
|
|
||||||
#ifdef REGAMEDLL_FIXES
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1596,6 +1596,14 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
|||||||
pev->viewmodel = 0;
|
pev->viewmodel = 0;
|
||||||
pev->weaponmodel = 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)
|
if (removeSuit)
|
||||||
pev->weapons = 0;
|
pev->weapons = 0;
|
||||||
else
|
else
|
||||||
@ -1611,6 +1619,8 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
|||||||
|
|
||||||
m_bHasNightVision = false;
|
m_bHasNightVision = false;
|
||||||
SendItemStatus();
|
SendItemStatus();
|
||||||
|
|
||||||
|
ResetMaxSpeed();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// send Selected Weapon Message to our client
|
// send Selected Weapon Message to our client
|
||||||
@ -6669,6 +6679,17 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(RemovePlayerItem)(CBasePlayerItem *pItem)
|
|||||||
if (m_pActiveItem == pItem)
|
if (m_pActiveItem == pItem)
|
||||||
{
|
{
|
||||||
ResetAutoaim();
|
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->pev->nextthink = 0;
|
||||||
|
|
||||||
pItem->SetThink(nullptr);
|
pItem->SetThink(nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user