Skip to content

Commit

Permalink
JoinTeam: force C4 drop when changing to SPEC
Browse files Browse the repository at this point in the history
  • Loading branch information
dystopm committed Sep 12, 2023
1 parent 329a68c commit 628dffe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion regamedll/dlls/API/CSPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ EXT_FUNC bool CCSPlayer::JoinTeam(TeamName team)
pPlayer->pev->deadflag = DEAD_DEAD;
pPlayer->pev->health = 0;

if (pPlayer->m_bHasC4)
pPlayer->DropPlayerItem("weapon_c4");

pPlayer->RemoveAllItems(TRUE);
pPlayer->m_bHasC4 = false;

pPlayer->m_iTeam = SPECTATOR;
pPlayer->m_iJoiningState = JOINED;
Expand Down

0 comments on commit 628dffe

Please sign in to comment.