From 73d1c1670645a0798b94055562baff2484cc2cd9 Mon Sep 17 00:00:00 2001 From: FEDERICOMB <41979395+FEDERICOMB96@users.noreply.github.com> Date: Sun, 27 Jun 2021 02:21:56 -0300 Subject: [PATCH] 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> --- regamedll/dlls/client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index 58aff3d2..9b30d346 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -2105,6 +2105,10 @@ BOOL EXT_FUNC __API_HOOK(HandleMenu_ChooseTeam)(CBasePlayer *pPlayer, int slot) pPlayer->TeamChangeUpdate(); +#ifdef REGAMEDLL_FIXES + pPlayer->SetPlayerModel(pPlayer->m_bHasC4); +#endif + szOldTeam = GetTeam(oldTeam); szNewTeam = GetTeam(team);