From 2ef0837c0b779da03c5110bd62d93d043ee078a5 Mon Sep 17 00:00:00 2001 From: Giferns <47265743+Giferns@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:36:20 +0300 Subject: [PATCH] Update to 1.2.3 Respawn logic fix (bug specified to v1.2.2) --- addons/amxmodx/scripting/include/rt_api.inc | 3 ++- addons/amxmodx/scripting/rt_core.sma | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/amxmodx/scripting/include/rt_api.inc b/addons/amxmodx/scripting/include/rt_api.inc index d220959..ae65a9b 100644 --- a/addons/amxmodx/scripting/include/rt_api.inc +++ b/addons/amxmodx/scripting/include/rt_api.inc @@ -9,7 +9,7 @@ #endif #define _rt_api_included -public stock const VERSION[] = "1.2.2"; +public stock const VERSION[] = "1.2.3"; public stock const AUTHORS[] = "DEV-CS.RU Community"; /** @@ -165,6 +165,7 @@ stock UTIL_RemoveCorpses(const id = 0, const szClassName[] = DEAD_BODY_CLASSNAME set_entvar(iEnt, var_flags, FL_KILLME); set_entvar(iEnt, var_nextthink, 0.0); + set_entvar(iEnt, var_iuser1, 0); if(iActivator) break; diff --git a/addons/amxmodx/scripting/rt_core.sma b/addons/amxmodx/scripting/rt_core.sma index 741a5a0..102e696 100644 --- a/addons/amxmodx/scripting/rt_core.sma +++ b/addons/amxmodx/scripting/rt_core.sma @@ -260,14 +260,14 @@ public Corpse_Think(const iEnt) { get_entvar(iActivator, var_origin, g_fSpawnOrigin); + UTIL_RemoveCorpses(iPlayer, DEAD_BODY_CLASSNAME); + EnableHookChain(g_iGetPlayerSpawnSpot_HookChain); rg_round_respawn(iPlayer); DisableHookChain(g_iGetPlayerSpawnSpot_HookChain); if(is_user_alive(iPlayer)) engfunc(EngFunc_SetOrigin, iPlayer, g_fSpawnOrigin); - - UTIL_RemoveCorpses(iPlayer, DEAD_BODY_CLASSNAME); } if(!is_user_alive(iActivator)) {