mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-18 08:10:38 +01:00
Fix crash when blinktimer is nil
This commit is contained in:
parent
a660b2917d
commit
c76bc7e019
@ -506,7 +506,7 @@ function mobs:register_mob(name, def)
|
|||||||
else
|
else
|
||||||
self.set_velocity(self, 0)
|
self.set_velocity(self, 0)
|
||||||
self.timer = self.timer + dtime
|
self.timer = self.timer + dtime
|
||||||
self.blinktimer = self.blinktimer + dtime
|
self.blinktimer = (self.blinktimer + dtime) or nil
|
||||||
if self.blinktimer > 0.2 then
|
if self.blinktimer > 0.2 then
|
||||||
self.blinktimer = self.blinktimer - 0.2
|
self.blinktimer = self.blinktimer - 0.2
|
||||||
if self.blinkstatus then
|
if self.blinkstatus then
|
||||||
|
Loading…
Reference in New Issue
Block a user