Skip to content

Commit

Permalink
fix infinite recursion in hugger custom rebound
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Jun 26, 2023
1 parent b18014a commit 531a742
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Facehuggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@
if(stat == UNCONSCIOUS)
return

// Force reset throw now because [/atom/movable/proc/launch_impact] only does that later on
// If we DON'T, step()'s move below can collide, rebound, trigger this proc again, into infinite recursion
throwing = FALSE
rebounding = FALSE

if(leaping && can_hug(L, hivenumber))
attach(L)
else if(L.density)
Expand Down

0 comments on commit 531a742

Please sign in to comment.