From 644c464b0c879f6127df5f538b0187eb1576b829 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 31 Oct 2009 18:18:11 +0100 Subject: [PATCH] Minior fixes. Tested ZR on a vanilla server with newest SourceMod, fixed issues related to vanilla configuration. See details. Fixed timer handle error in volfeatures on map end. Fixed incorrect default value in class cvars. Changed map config files to be loaded in OnAutoConfigsBuffered. --- src/zombiereloaded.sp | 11 ++++++++++- src/zr/cvars.inc | 4 ++-- src/zr/volfeatures/volevents.inc | 9 +++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/zombiereloaded.sp b/src/zombiereloaded.sp index 6aae23f..d6056bc 100644 --- a/src/zombiereloaded.sp +++ b/src/zombiereloaded.sp @@ -171,6 +171,16 @@ public OnMapStart() public OnMapEnd() { // Forward event to modules. + VolOnMapEnd(); +} + +/** + * Main configs were just executed. + */ +public OnAutoConfigsBuffered() +{ + // Load map configurations. + ConfigLoad(); } /** @@ -179,7 +189,6 @@ public OnMapEnd() public OnConfigsExecuted() { // Forward event to modules. (OnConfigsExecuted) - ConfigLoad(); ModelsLoad(); DownloadsLoad(); WeaponsLoad(); diff --git a/src/zr/cvars.inc b/src/zr/cvars.inc index 69f6c90..d590328 100644 --- a/src/zr/cvars.inc +++ b/src/zr/cvars.inc @@ -262,8 +262,8 @@ CvarsCreate() g_hCvarsList[CVAR_CLASSES_DEFAULT_ZOMBIE] = CreateConVar("zr_classes_default_zombie", "random", "Zombie class assigned to players on connect. [\"random\" = Random zombie class | \"\" = Class config default]"); g_hCvarsList[CVAR_CLASSES_DEFAULT_M_ZOMB] = CreateConVar("zr_classes_default_mother_zombie", "motherzombies","Zombie class assigned to mother zombies. [\"motherzombies\" = Random mother zombie class | \"random\" = Random regular zombie class | \"disabled\" = Don't change class on mother zombies]"); g_hCvarsList[CVAR_CLASSES_DEFAULT_HUMAN] = CreateConVar("zr_classes_default_human", "random", "Human class assigned to players on connect. [\"random\" = Random human class | \"\" = Class config default]"); - g_hCvarsList[CVAR_CLASSES_DEFAULT_ADMIN] = CreateConVar("zr_classes_default_admin", "random", "(Not implemented!) Admin-only class assigned to admins on connect, if any. [\"default\" = Default human class | \"random\" = Random admin-only class]"); - g_hCvarsList[CVAR_CLASSES_DEFAULT_ADMIN_MODE] = CreateConVar("zr_classes_default_admin_mode", "default", "(Incomplete) Admin-mode class assigned to admins on connect. Do not confuse this with admin-only classes. [\"random\" = Random admin class | \"\" = Class config default]"); + g_hCvarsList[CVAR_CLASSES_DEFAULT_ADMIN] = CreateConVar("zr_classes_default_admin", "default", "(Not implemented!) Admin-only class assigned to admins on connect, if any. [\"default\" = Default human class | \"random\" = Random admin-only class]"); + g_hCvarsList[CVAR_CLASSES_DEFAULT_ADMIN_MODE] = CreateConVar("zr_classes_default_admin_mode", "random", "(Incomplete) Admin-mode class assigned to admins on connect. Do not confuse this with admin-only classes. [\"random\" = Random admin class | \"\" = Class config default]"); g_hCvarsList[CVAR_CLASSES_ZOMBIE_SELECT] = CreateConVar("zr_classes_zombie_select", "1", "Allow players to select zombie classes."); g_hCvarsList[CVAR_CLASSES_HUMAN_SELECT] = CreateConVar("zr_classes_human_select", "1", "Allow players to select human classes."); g_hCvarsList[CVAR_CLASSES_ADMIN_SELECT] = CreateConVar("zr_classes_admin_select", "1", "Allow admins to select admin mode classes. (Not to be confused by admin-only classes!)"); diff --git a/src/zr/volfeatures/volevents.inc b/src/zr/volfeatures/volevents.inc index fdbbadd..e5dbb28 100644 --- a/src/zr/volfeatures/volevents.inc +++ b/src/zr/volfeatures/volevents.inc @@ -180,6 +180,15 @@ VolOnRoundEnd() VolDisableVolumes(); } +/** + * Called right before the map ends. + */ +VolOnMapEnd() +{ + // Make sure timers and volumes are stopped. Foreward event. + VolOnRoundEnd(); +} + /** * Called when a volume is disabled. * @param volumeIndex The volume index.