From b592e8ea57b7fe835e6395bde2d5fc8f00ff72ae Mon Sep 17 00:00:00 2001 From: Greyscale Date: Wed, 15 Jul 2009 17:58:20 -0700 Subject: [PATCH] Error fix in LogEvent that caused the plugin to basically break down on maps with post configs. (Error stopped the entire call stack for all config loading) Added an extra logic statement in napalm. --- src/zr/config.inc | 2 +- src/zr/napalm.inc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/zr/config.inc b/src/zr/config.inc index f906a8a..82d2cb8 100644 --- a/src/zr/config.inc +++ b/src/zr/config.inc @@ -254,7 +254,7 @@ ConfigOnModulesLoaded() ServerCommand("exec %s", mapconfig); // Log action. - LogEvent(false, LogType_Normal, LOG_CORE_EVENTS, LogModule_Config, "Executed post map config file: %s", path); + LogEvent(false, LogType_Normal, LOG_CORE_EVENTS, LogModule_Config, "Post Map Configs", "Executed post map config file: %s", path); } /** diff --git a/src/zr/napalm.inc b/src/zr/napalm.inc index 7c2e208..1cca75e 100644 --- a/src/zr/napalm.inc +++ b/src/zr/napalm.inc @@ -39,6 +39,12 @@ */ NapalmOnClientHurt(client, attacker, const String:weapon[]) { + // If there's no attacker, then stop. + if (!attacker) + { + return; + } + // If player isn't a zombie, then stop. if (!InfectIsClientInfected(client)) {