mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Prevent the game from hanging if bullets find an infinite loop.
This commit is contained in:
@@ -93,4 +93,4 @@ var/list/TAGGERLOCATIONS = list("Disposals",
|
||||
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
|
||||
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics")
|
||||
|
||||
var/list/guitar_notes = flist("sound/guitar/")
|
||||
var/global/list/guitar_notes = flist("sound/guitar/")
|
||||
|
||||
@@ -65,15 +65,17 @@
|
||||
var/obj/effect/cross_action/spacetime_dist/linked_dist
|
||||
var/busy = FALSE
|
||||
var/sound
|
||||
var/walks_left = 50 //prevents the game from hanging in extreme cases (such as minigun fire)
|
||||
|
||||
/obj/effect/cross_action/spacetime_dist/New()
|
||||
..()
|
||||
sound = "sound/guitar/[safepick(guitar_notes)]"
|
||||
|
||||
/obj/effect/cross_action/spacetime_dist/proc/walk_link(atom/movable/AM)
|
||||
if(linked_dist)
|
||||
if(linked_dist && walks_left > 0)
|
||||
flick("purplesparkles", src)
|
||||
linked_dist.get_walker(AM)
|
||||
walks_left--
|
||||
|
||||
/obj/effect/cross_action/spacetime_dist/proc/get_walker(atom/movable/AM)
|
||||
busy = TRUE
|
||||
|
||||
Reference in New Issue
Block a user