Portal Fix (#21158)

* Fixes telescience portals not working correctly, causing an infinite
loop.
This commit is contained in:
Geeves
2025-08-12 18:30:44 +02:00
committed by GitHub
parent ca693d0bc1
commit d8e05c16c8
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -146,6 +146,14 @@
playSpecials(curturf,effectin,soundin)
// we don't want a teleportation loop, if we teleport to a destination that already has a portal
// disable it for just a moment until we get there
var/has_active_destination_portal = FALSE
var/obj/effect/portal/destination_portal = locate() in destturf
if(destination_portal?.does_teleport)
has_active_destination_portal = TRUE
destination_portal.does_teleport = FALSE
var/obj/structure/bed/stool/chair/C = null
if(isliving(teleatom))
var/mob/living/L = teleatom
@@ -270,6 +278,9 @@
destarea.Entered(teleatom)
if(has_active_destination_portal)
destination_portal.does_teleport = TRUE
return TRUE
/datum/teleport/proc/teleport()
+6
View File
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Fixes telescience portals not working correctly, causing an infinite loop."