mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 13:01:29 -10:00
Previously, if a script called a function that called another scripting hook, some hook variables might be removed. This was the case since after executing the hook the code would remove the set hook variables again. If these variables had the same name as previously set variables, they would overwrite and corrupt the state the original script expected. This was unexpected behavior for script writers so this puts values on a stack and only adds or removes from the stack instead of overwriting values. This should make the hook variable state consistent for scripts even if scripting hooks are called indirectly.