diff --git a/scripting/randomizer.sp b/scripting/randomizer.sp index 2e02399..23d033e 100644 --- a/scripting/randomizer.sp +++ b/scripting/randomizer.sp @@ -15,7 +15,7 @@ #pragma newdecls required -#define PLUGIN_VERSION "1.11.2" +#define PLUGIN_VERSION "1.11.3" #define PLUGIN_VERSION_REVISION "manual" #define CONFIG_MAXCHAR 64 diff --git a/scripting/randomizer/sdkhook.sp b/scripting/randomizer/sdkhook.sp index 8149e03..8386f3e 100644 --- a/scripting/randomizer/sdkhook.sp +++ b/scripting/randomizer/sdkhook.sp @@ -84,14 +84,14 @@ public void Client_OnTakeDamagePost(int iVictim, int iAttacker, int iInflictor, g_bOnTakeDamage = false; g_bFeignDeath[iVictim] = false; - if (g_bOnTakeDamageClass[iAttacker]) - { - RevertClientClass(iAttacker); - g_bOnTakeDamageClass[iAttacker] = false; - } - if (0 < iAttacker <= MaxClients) { + if (g_bOnTakeDamageClass[iAttacker]) + { + RevertClientClass(iAttacker); + g_bOnTakeDamageClass[iAttacker] = false; + } + if (iWeapon != INVALID_ENT_REFERENCE && HasEntProp(iWeapon, Prop_Send, "m_iItemDefinitionIndex")) { Properties_SaveWeaponPropInt(iAttacker, iWeapon, "m_iDecapitations");