From 84f2e1af7af3369c3a392197a2281976821118c0 Mon Sep 17 00:00:00 2001 From: KJack Date: Fri, 15 Mar 2024 18:58:23 -0400 Subject: [PATCH] (feature) allow config to be reloaded without server restart. (#38) * Allow config to be reloaded without server restart. * comment unused variables --------- Co-authored-by: Walter Pagani Co-authored-by: Winfidonarleyan --- src/Solocraft.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Solocraft.cpp b/src/Solocraft.cpp index 5969cd1..320ade1 100644 --- a/src/Solocraft.cpp +++ b/src/Solocraft.cpp @@ -40,12 +40,10 @@ class SolocraftConfig : public WorldScript public: SolocraftConfig() : WorldScript("SolocraftConfig") {} - void OnBeforeConfigLoad(bool reload) override + void OnBeforeConfigLoad(bool /*reload*/) override { - if (!reload) { - // Load Configuration Settings - SetInitialWorldSettings(); - } + // Load Configuration Settings + SetInitialWorldSettings(); } // Load Configuration Settings @@ -528,7 +526,7 @@ class SolocraftPlayerInstanceHandler : public PlayerScript int SpellPowerBonus = 0; - // Check for an existing No XP Gain flag - other mod compatibility + // Check for an existing No XP Gain flag - other mod compatibility if (player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN)) { SolocraftNoXPFlag = 1;