mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Avoid div/0 in this. I'm not sure when that would happen.
This commit is contained in:
@@ -278,8 +278,8 @@
|
|||||||
n = get_step(my_mob, direct)
|
n = get_step(my_mob, direct)
|
||||||
|
|
||||||
total_delay = TICKS2DS(-round(-(DS2TICKS(total_delay)))) //Rounded to the next tick in equivalent ds
|
total_delay = TICKS2DS(-round(-(DS2TICKS(total_delay)))) //Rounded to the next tick in equivalent ds
|
||||||
var/glide_size = WORLD_ICON_SIZE/DS2TICKS(total_delay) //Down to whatever decimal
|
var/glide_size = WORLD_ICON_SIZE/max(DS2TICKS(total_delay), 1) //Down to whatever decimal
|
||||||
my_mob.setMoveCooldown(max(total_delay, 1))
|
my_mob.setMoveCooldown(total_delay)
|
||||||
. = my_mob.SelfMove(n, direct, glide_size)
|
. = my_mob.SelfMove(n, direct, glide_size)
|
||||||
|
|
||||||
// If we have a grab
|
// If we have a grab
|
||||||
|
|||||||
Reference in New Issue
Block a user