diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-06-16 20:36:15 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-06-16 20:36:15 +0100 |
commit | 54b88e25b2df0e3d388cd4b833af2580db6f14a7 (patch) | |
tree | 2f70a202854353cfca40f3ff7280166252daf9c7 | |
parent | 60c5b5628a8ac2f9c5fb9922438d0dc1b221b440 (diff) |
set min mob damage is 0 and fix runaway dir for rotated mobs.
-rw-r--r-- | api.lua | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,9 +1,9 @@ --- Mobs Api (11th June 2017) +-- Mobs Api (16th June 2017) mobs = {} mobs.mod = "redo" -mobs.version = "20170611" +mobs.version = "20170616" -- Intllib @@ -2134,14 +2134,13 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) local lp = hitter:getpos() local s = self.object:getpos() - local vec = { x = lp.x - s.x, y = lp.y - s.y, z = lp.z - s.z } - local yaw = atan(vec.z / vec.x) + 3 * pi / 2 + local yaw = (atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate if lp.x > s.x then yaw = yaw + pi @@ -2506,7 +2505,7 @@ minetest.register_entity(name, { view_range = def.view_range or 5, walk_velocity = def.walk_velocity or 1, run_velocity = def.run_velocity or 2, - damage = max(1, (def.damage or 0) * difficulty), + damage = max(0, (def.damage or 0) * difficulty), light_damage = def.light_damage or 0, water_damage = def.water_damage or 0, lava_damage = def.lava_damage or 0, |