Unexpected behavior with mp_forcerespawn leading to a possible exploit

Basically there is an exploit (or bug?) where depending on mp_forcerespawn if his value is higher to 0 and lower than 1, when you respawn you have a brief window to change your team, if you succesfully manage to change your team between the mp_forcerespawn value and WITHOUT closing the change appearance menu, you won't die due to "m_fNextSuicideTime", that will trigger the change team but without actually changing your skin model, you will keep the enemy one but the team change will success.

Thanks https://github.com/metita for helping me with this

Co-Authored-By: metita <33007491+metita@users.noreply.github.com>
This commit is contained in:
FEDERICOMB 2021-06-27 02:21:56 -03:00
parent d85b03096f
commit 73d1c16706

View File

@ -2105,6 +2105,10 @@ BOOL EXT_FUNC __API_HOOK(HandleMenu_ChooseTeam)(CBasePlayer *pPlayer, int slot)
pPlayer->TeamChangeUpdate(); pPlayer->TeamChangeUpdate();
#ifdef REGAMEDLL_FIXES
pPlayer->SetPlayerModel(pPlayer->m_bHasC4);
#endif
szOldTeam = GetTeam(oldTeam); szOldTeam = GetTeam(oldTeam);
szNewTeam = GetTeam(team); szNewTeam = GetTeam(team);