diff --git a/bin/config/settings_zone.xml b/bin/config/settings_zone.xml
index f50c18ce..547219a7 100644
--- a/bin/config/settings_zone.xml
+++ b/bin/config/settings_zone.xml
@@ -13,7 +13,7 @@
./cache/
- 1
+ true
../scripts/native/
../cmake-build-debug/
cmake --build %1% --target %2%
diff --git a/src/servers/sapphire_zone/Script/NativeScriptManager.h b/src/servers/sapphire_zone/Script/NativeScriptManager.h
index 38588ffd..a793b68e 100644
--- a/src/servers/sapphire_zone/Script/NativeScriptManager.h
+++ b/src/servers/sapphire_zone/Script/NativeScriptManager.h
@@ -40,8 +40,6 @@ namespace Scripting {
const std::string getModuleExtension();
bool isModuleLoaded( const std::string& name );
- // todo: use some template magic (type_traits is_same?) to avoid ScriptType param
- // not sure if worthwhile given that it adds an extra place where script types need to be managed
template< typename T >
T* getScript( uint32_t scriptId )
{
diff --git a/src/servers/sapphire_zone/Script/ScriptInfo.h b/src/servers/sapphire_zone/Script/ScriptInfo.h
index ae9fafb0..f57c1a7c 100644
--- a/src/servers/sapphire_zone/Script/ScriptInfo.h
+++ b/src/servers/sapphire_zone/Script/ScriptInfo.h
@@ -26,7 +26,6 @@ namespace Scripting {
ModuleHandle handle;
std::vector< ScriptObject* > scripts;
- std::size_t type;
};
}
}
diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp
index 40ec2bdc..c9a1fa01 100644
--- a/src/servers/sapphire_zone/Script/ScriptManager.cpp
+++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp
@@ -74,6 +74,10 @@ bool Core::Scripting::ScriptManager::init()
void Core::Scripting::ScriptManager::watchDirectories()
{
+ auto shouldWatch = g_serverZone.getConfig()->getValue< bool >( "Settings.General.Scripts.HotSwap.Enabled", true );
+ if( !shouldWatch )
+ return;
+
Watchdog::watchMany( g_serverZone.getConfig()->getValue< std::string >( "Settings.General.Scripts.Path", "./compiledscripts/" ) + "*" + m_nativeScriptManager->getModuleExtension(),
[ this ]( const std::vector< ci::fs::path >& paths )
{