mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-10 16:19:59 +00:00
Add a safe pointer model to ScriptInterface, additional bug/crash fixes.
This commit introduces pointer checks to various functions; so that entity_* will no longer crash or produce weird results if passed a Node pointer, etc. The checks are disabled by default, but can be enabled in ScriptInterface.cpp. Fixed possible crashes in a few more functions due to missing NULL-checks. There was a "feature" in the single Lua state that it would keep globals intact until the game was quit. That made any globals from mods "leak" into the game or other mods. Now it resets the Lua state when a mod is loaded or closed.
This commit is contained in:
parent
becd31770c
commit
4320b8296b
22 changed files with 298 additions and 103 deletions
|
@ -167,6 +167,7 @@ bool Entity::canSetBoneLock()
|
|||
|
||||
Entity::Entity() : StateMachine(), DFSprite()
|
||||
{
|
||||
addType(SCO_ENTITY);
|
||||
poison = 0.0f;
|
||||
calledEntityDied = false;
|
||||
wasUnderWater = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue