mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 05:02:18 +00:00
Enforcing no sleep during mob/Life().
This commit is contained in:
@@ -182,22 +182,23 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
B.overmind = overmind
|
||||
B.density = TRUE
|
||||
if(T.Enter(B,src)) //NOW we can attempt to move into the tile
|
||||
sleep(1) // To have the slide animation work.
|
||||
B.density = initial(B.density)
|
||||
B.forceMove(T)
|
||||
B.update_icon()
|
||||
if(B.overmind && expand_reaction)
|
||||
B.overmind.blob_type.on_expand(src, B, T, B.overmind)
|
||||
do_slide_animation(B, T, expand_reaction)
|
||||
return B
|
||||
|
||||
else
|
||||
blob_attack_animation(T, controller)
|
||||
T.blob_act(src) //if we can't move in hit the turf again
|
||||
qdel(B) //we should never get to this point, since we checked before moving in. destroy the blob so we don't have two blobs on one tile
|
||||
return null
|
||||
blob_attack_animation(T, controller)
|
||||
T.blob_act(src) //if we can't move in hit the turf again
|
||||
qdel(B) //we should never get to this point, since we checked before moving in. destroy the blob so we don't have two blobs on one tile
|
||||
return null
|
||||
else
|
||||
blob_attack_animation(T, controller) //if we can't, animate that we attacked
|
||||
return null
|
||||
|
||||
/obj/structure/blob/proc/do_slide_animation(var/obj/structure/blob/B, var/turf/T, var/expand_reaction)
|
||||
set waitfor = FALSE
|
||||
sleep(1) // To have the slide animation work.
|
||||
B.density = initial(B.density)
|
||||
B.forceMove(T)
|
||||
B.update_icon()
|
||||
if(B.overmind && expand_reaction)
|
||||
B.overmind.blob_type.on_expand(src, B, T, B.overmind)
|
||||
|
||||
/obj/structure/blob/proc/consume_tile()
|
||||
for(var/atom/A in loc)
|
||||
@@ -427,4 +428,4 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
qdel(src)
|
||||
|
||||
/turf/simulated/wall/blob_act()
|
||||
take_damage(100)
|
||||
take_damage(100)
|
||||
|
||||
@@ -86,7 +86,8 @@
|
||||
B = temp
|
||||
break
|
||||
|
||||
CHECK_TICK // Iterating over a list containing hundreds of blobs can get taxing.
|
||||
if(TICK_CHECK) // Iterating over a list containing hundreds of blobs can get taxing.
|
||||
return // Swapped to TICK_CHECK because previous usage was sleeping entire mob subsystem.
|
||||
|
||||
if(B)
|
||||
forceMove(B.loc)
|
||||
@@ -129,7 +130,8 @@
|
||||
B = temp
|
||||
break
|
||||
|
||||
CHECK_TICK
|
||||
if(TICK_CHECK)
|
||||
return // Blobs are tick checked but this while loop is not. Previous usage was sleeping the entire mob subsystem.
|
||||
|
||||
if(B)
|
||||
forceMove(B.loc)
|
||||
@@ -171,7 +173,8 @@
|
||||
B = temp
|
||||
break
|
||||
|
||||
CHECK_TICK
|
||||
if(TICK_CHECK)
|
||||
return // Do not sleep the entire mob subsystem pls.
|
||||
|
||||
if(B)
|
||||
forceMove(B.loc)
|
||||
|
||||
Reference in New Issue
Block a user