Skip to content

Commit

Permalink
Drop defuser on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
dystopm authored and s1lentq committed Oct 24, 2023
1 parent a2678a1 commit 7e02dea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3588,14 +3588,15 @@ void CHalfLifeMultiplay::ClientDisconnected(edict_t *pClient)
{
pPlayer->DropPlayerItem("weapon_c4");
}

#ifndef REGAMEDLL_FIXES
// Why ? DropPlayerItem didn't handle item_thighpack

if (pPlayer->m_bHasDefuser)
{
pPlayer->DropPlayerItem("item_thighpack");
}
#ifdef REGAMEDLL_FIXES
SpawnDefuser(pPlayer->pev->origin, nullptr);
#else
pPlayer->DropPlayerItem("item_thighpack"); // DropPlayerItem didn't handle item_thighpack
#endif
}

if (pPlayer->m_bIsVIP)
{
Expand Down

0 comments on commit 7e02dea

Please sign in to comment.