fix and tweak runaway_timer from "code tweaks"

* backport only the tweak of "code tweaks" of
 upstream commit 457eb1838cd1e694052298a42c84cd7b061d809d
 run away soon and early
This commit is contained in:
general 2024-04-07 20:40:59 -04:00
parent 21cf18990b
commit fe3c543136

View File

@ -2527,8 +2527,8 @@ function mob_class:do_states(dtime)
self.runaway_timer = self.runaway_timer + 1
-- stop after 5 seconds or when at cliff -- TODO
if self.runaway_timer > 5
-- stop early after 3 or 2 seconds or when at cliff cos defaults start at 0 but on some states is 3
if self.runaway_timer > 4
or self.at_cliff
or self.order == "stand" then
self.runaway_timer = 0