Imported fix from dev: 661:dbb2ad84eb58 - Fixed a bug where zr_suicide_cmds was being ignored and only the default value was being used.
This commit is contained in:
parent
04a8fef584
commit
950a8f9e41
@ -211,6 +211,7 @@ public OnConfigsExecuted()
|
||||
WeaponsLoad();
|
||||
HitgroupsLoad();
|
||||
InfectLoad();
|
||||
DamageLoad();
|
||||
VEffectsLoad();
|
||||
SEffectsLoad();
|
||||
AntiStickLoad();
|
||||
|
@ -54,5 +54,4 @@ CommandsInit()
|
||||
|
||||
// Forward event to modules. (hook commands)
|
||||
ClassOnCommandsHook();
|
||||
DamageOnCommandsHook();
|
||||
}
|
||||
|
@ -65,9 +65,16 @@ new bool:g_bDamageMotherZombie[MAXPLAYERS + 1];
|
||||
|
||||
/**
|
||||
* Hook commands related to damage here.
|
||||
* Note: This isn't OnCommandsHook because this depends on cvars.
|
||||
*/
|
||||
DamageOnCommandsHook()
|
||||
new bool:g_bSuicideCmdsHooked = false;
|
||||
DamageLoad()
|
||||
{
|
||||
if (g_bSuicideCmdsHooked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Create command callbacks (intercepts) for listed suicide commands.
|
||||
decl String:suicidecmds[DAMAGE_SUICIDE_MAX_CMDS * DAMAGE_SUICIDE_MAX_LENGTH];
|
||||
GetConVarString(g_hCvarsList[CVAR_DAMAGE_SUICIDE_CMDS], suicidecmds, sizeof(suicidecmds));
|
||||
@ -88,6 +95,9 @@ DamageOnCommandsHook()
|
||||
// Prepare intercept for this command.
|
||||
RegConsoleCmd(arrayCmds[x], DamageSuicideIntercept);
|
||||
}
|
||||
|
||||
// Important: If ZR can be unloaded some day, make sure to remove the listeners and set this to false.
|
||||
g_bSuicideCmdsHooked = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user