Draft: Fix Lua Move functions breaking mobj references
In Lua scripts, functions that moved mobjs also updated object references using a local variable. This caused a dangling pointer to be considered a valid reference, which threw off the reference counter and caused it to report bogus values (console was flooded with Number of potentially faulty references: -1073741825
errors, which doesn't make any sense). This most notably caused memory leaks, as unused mobjs would no longer deallocated, but it could potentially cause further issues down the line, such as alive object being reported as dead (this is not confirmed though).
Edited by Hanicef