+local minetest = minetest
--class
mobs = {}
mob_register.head_rotation_offset = def.head_rotation_offset
mob_register.head_position_correction = def.head_position_correction
mob_register.head_coord = def.head_coord
+ mob_register.flip_pitch = def.flip_pitch
else
- print("create some other functions to turn mob " .. def.mobname)
+ --print("create some other functions to turn mob " .. def.mobname)
end
mob_register.hurt_inside_timer = 0
mob_register.attack_type = def.attack_type
if def.attack_type == "explode" then
mob_register.tnt_tick_timer = 0
+ mob_register.explosion_type = def.explosion_type
end
mob_register.explosion_radius = def.explosion_radius
mob_register.explosion_power = def.explosion_power
mob_register.projectile_timer_cooldown = def.projectile_timer_cooldown
mob_register.attacked_hostile = def.attacked_hostile
-
+if not def.hostile and not def.attacked_hostile then
+ mob_register.scared = false
+ mob_register.scared_timer = 0
+end
+mob_register.attack_damage = def.attack_damage
mob_register.projectile_timer = 0
mob_register.projectile_type = def.projectile_type
mob_register.custom_on_activate = def.custom_on_activate
+mob_register.custom_on_punch = def.custom_on_punch
+
+mob_register.c_mob_data = def.c_mob_data
+
+mob_register.deactivating = false
+
+mob_register.on_fire = false
+
+mob_register.fire_table = def.fire_table
+
if def.pathfinds then
--mob_register.path = {}
mob_register.pathfinding_timer = 0
self.manage_hurt_color_timer(self,dtime)
+ if self.manage_scared_timer then
+ self.manage_scared_timer(self,dtime)
+ end
+
if self.set_animation then
self.set_animation(self)
end