-mob_register = {}
+local mob_register = {}
------------------------------------------------
mob_register.initial_properties = {
mob_register.die_in_light_level = def.die_in_light_level
mob_register.current_animation = 0
+mob_register.hurt_color_timer = 0
mob_register.mob = true
self.custom_function_begin(self,dtime)
end
- --self.collision_detection(self)
+ self.collision_detection(self)
self.fall_damage(self)
if self.dead == false and self.death_animation_timer == 0 then
- --self.move(self,dtime)
-
- if not self.yaw then self.yaw = 0 end
- self.yaw = self.yaw + dtime
- if self.yaw > math.pi then
- self.yaw = -math.pi
- end
- self.object:set_velocity(minetest.yaw_to_dir(self.yaw))
+ self.move(self,dtime)
+ self.manage_hurt_color_timer(self,dtime)
self.set_animation(self)
if self.look_around then
self.look_around(self,dtime)
end
- --print(self.object:get_yaw()-(math.pi/2))
-
self.manage_punch_timer(self,dtime)
--self.debug_nametag(self,dtime)
else