mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 00:27:31 +01:00
[MIRROR] Fix AI eye not being recreated if it was qdel'd, but not nulled [MDB IGNORE] (#9850)
* Fix AI eye not being recreated if it was qdel'd, but not nulled (#63131) As an error recovery point, if the eye somehow gets qdel'd, it is recreated when you try to move to the core. However, this error recovery doesn't work if the AI eye is qdel'd without being nulled, as create_eye() checks if eyeobj exists (NOT if it's qdel'd). Of course the real bug is in whatever is qdel'ing the eye, but considering this is an existing error recovery system, it should still work! * Fix AI eye not being recreated if it was qdel'd, but not nulled Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -188,6 +188,8 @@
|
||||
|
||||
if(isturf(loc) && (QDELETED(eyeobj) || !eyeobj.loc))
|
||||
to_chat(src, "ERROR: Eyeobj not found. Creating new eye...")
|
||||
stack_trace("AI eye object wasn't found! Location: [loc] / Eyeobj: [eyeobj] / QDELETED: [QDELETED(eyeobj)] / Eye loc: [eyeobj?.loc]")
|
||||
QDEL_NULL(eyeobj)
|
||||
create_eye()
|
||||
|
||||
eyeobj?.setLoc(loc)
|
||||
|
||||
Reference in New Issue
Block a user