Fix some creeper issues

- Fix fuse sound sometimes not playing
- Timer = 1.5s
- Distance behaviour like in MC
This commit is contained in:
Wuzzy 2018-03-31 03:51:49 +02:00
parent d6228145c6
commit 8060928237
2 changed files with 13 additions and 9 deletions

View file

@ -1850,10 +1850,10 @@ local do_states = function(self, dtime)
mob_sound(self, self.sounds.fuse)
-- print ("=== explosion timer started", self.explosion_timer)
-- stop timer if out of blast radius or direct line of sight
-- stop timer if out of reach or direct line of sight
elseif self.allow_fuse_reset
and self.v_start
and (dist > max(self.reach, entity_damage_radius) + 0.5
and (dist > self.reach
or not line_of_sight(self, s, p, 2)) then
self.v_start = false
self.timer = 0