2 次代碼提交 6df04e3a3e ... 7671b5215d

作者 SHA1 備註 提交日期
  tenplus1 7671b5215d fix mortick nil check, use new get_look_horizontal functions 2 年之前
  tenplus1 633fc46e31 fix mese dragon bugs 3 年之前
共有 4 個文件被更改,包括 11 次插入4 次删除
  1. 2 2
      mobs/mese_dragon.lua
  2. 8 1
      mobs/morde.lua
  3. 1 1
      mobs/morlu.lua
  4. 二進制
      screenshot.png

+ 2 - 2
mobs/mese_dragon.lua

@@ -107,7 +107,7 @@ mobs:register_mob("nssm:mese_dragon", {
 
 				self.attack_rip = 0
 
-				mobs:set_animation("punch1")
+				self:set_animation("punch1")
 
 				for dx = -17, 17 do
 					for dz = -17, 17 do
@@ -117,7 +117,7 @@ mobs:register_mob("nssm:mese_dragon", {
 
 						if n == "air" and math.random(1, 23) == 1 then
 							minetest.set_node(k, {name="nssm:mese_meteor"})
-							nodeupdate(k)
+							minetest.check_single_for_falling(k)
 						end
 					end
 				end

+ 8 - 1
mobs/morde.lua

@@ -165,7 +165,14 @@ minetest.register_entity("nssm:mortick", {
 		if self.attack ~= 0 then
 
 			local p = self.attack:get_pos()
-			local yawp = self.attack:get_look_yaw()
+
+			-- Just incase player teleports away or leaves game
+			if not p then
+				self.attack = nil
+				return
+			end
+
+			local yawp = self.attack:get_look_horizontal() + math.pi / 2
 			local pi = math.pi
 
 			p.y = p.y + 1

+ 1 - 1
mobs/morlu.lua

@@ -208,7 +208,7 @@ mobs:register_mob("nssm:morlu", {
 									self.morlu_timer = os.time()
 									self.curr_attack = self.attack
 									self.state = ""
-									local pyaw = self.curr_attack: get_look_yaw()
+									local pyaw = self.curr_attack: get_look_horizontal() + math.pi / 2
 									self.dir = pyaw
 									self.object:set_yaw(pyaw)
 									if self then

二進制
screenshot.png