Lua: Implement Hot-Reload

This commit is contained in:
Lion Kortlepel
2021-09-21 16:17:40 +02:00
parent fe3ccafc1d
commit 9d0caf2c7d
3 changed files with 10 additions and 3 deletions

View File

@@ -165,7 +165,7 @@ private:
TPluginMonitor mPluginMonitor;
std::atomic_bool mShutdown { false };
fs::path mResourceServerPath;
std::vector<TLuaPlugin*> mLuaPlugins;
std::vector<std::shared_ptr<TLuaPlugin>> mLuaPlugins;
std::unordered_map<TLuaStateId, std::unique_ptr<StateThreadData>> mLuaStates;
std::recursive_mutex mLuaStatesMutex;
std::unordered_map<std::string /* event name */, std::unordered_map<TLuaStateId, std::set<std::string>>> mLuaEvents;