Skip to content

Commit d2fbbc9

Browse files
authored
update(player): Trying to fix invalid team index.
1 parent 2c08438 commit d2fbbc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/player/Player.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void Player::SwitchTeam(int team)
228228
if (!playerController)
229229
return;
230230

231-
if (team == CS_TEAM_SPECTATOR)
231+
if (team == CS_TEAM_SPECTATOR || team == CS_TEAM_NONE)
232232
CALL_VIRTUAL(void, g_Offsets->GetOffset("CCSPlayerController_ChangeTeam"), playerController, team);
233233
else
234234
g_Signatures->FetchSignature<CCSPlayerController_SwitchTeam>("CCSPlayerController_SwitchTeam")(playerController, team);
@@ -574,4 +574,4 @@ VoiceFlag_t Player::GetVoiceFlags()
574574
ListenOverride Player::GetListen(CPlayerSlot slot) const
575575
{
576576
return m_listenMap[slot.Get()];
577-
}
577+
}

0 commit comments

Comments
 (0)