From 1eb385602a538d08575ef54245c5ef9ebf39de1d Mon Sep 17 00:00:00 2001 From: Artem Golubikhin Date: Mon, 17 Jul 2017 14:42:21 +0300 Subject: [PATCH] Fixed bug with lastinv (fix from 7561) (#173) --- regamedll/dlls/player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 622da293..3b6731a1 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -6536,7 +6536,10 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(RemovePlayerItem)(CBasePlayerItem *pItem) pev->viewmodel = 0; pev->weaponmodel = 0; } - else if (m_pLastItem == pItem) +#ifndef REGAMEDLL_FIXES + else +#endif + if (m_pLastItem == pItem) m_pLastItem = NULL; CBasePlayerItem *pPrev = m_rgpPlayerItems[pItem->iItemSlot()];