From 7e02dea4a0b6206c64cf15fa89d2069821115fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mu=C3=B1oz?= Date: Tue, 10 Oct 2023 19:05:13 -0300 Subject: [PATCH] Drop defuser on disconnect --- regamedll/dlls/multiplay_gamerules.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 5222cc080..becd1bf9f 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -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) {