switch cppscripts to references and unique_ptrs

This commit is contained in:
jadebenn
2024-12-17 23:33:46 -06:00
parent e1c20192f7
commit 42367deeca
5 changed files with 325 additions and 331 deletions

View File

@@ -357,10 +357,10 @@ namespace CppScripts {
virtual void OnRequestActivityExit(Entity* sender, LWOOBJID player, bool canceled){};
};
Script* const GetScript(Entity* parent, const std::string& scriptName);
Script& GetScript(Entity* parent, const std::string& scriptName);
// Get the invalid script. Would be a static variable of the namespace, but that would be
// more cluttery to use. Also this allows us to control where this invalid script is defined and initialized
// since we dont want anyone externally modifying it.
Script* const GetInvalidScript();
Script& GetInvalidScript();
};