]> git.lizzy.rs Git - Crafter.git/blobdiff - mods/mob/api/api_hook.lua
Optimize a ton of globals to locals
[Crafter.git] / mods / mob / api / api_hook.lua
index 59b5c63128e9a4d3f5a1197edfabdbf11988378d..4607bf2049fc397e742c94ad032e571443a8ed17 100644 (file)
@@ -1,3 +1,4 @@
+local minetest = minetest
 --class 
 mobs = {}
 
@@ -90,6 +91,7 @@ mob_register.die_sound = def.die_sound
 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
@@ -136,6 +138,12 @@ 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
@@ -159,7 +167,7 @@ mob_register.on_step = function(self, dtime,moveresult)
                self.custom_function_begin(self,dtime)
        end
        
-       --self.collision_detection(self)
+       self.collision_detection(self)
        if self.fall_damage then
                self.fall_damage(self)
        end
@@ -173,7 +181,7 @@ mob_register.on_step = function(self, dtime,moveresult)
                        self.custom_function(self,dtime,moveresult)
                end
 
-               --self.move(self,dtime,moveresult)
+               self.move(self,dtime,moveresult)
                
                --self.debug_nametag(self,dtime)