summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-10-22 09:36:08 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-10-22 09:36:08 +0100
commit954565efa2624421646ef6f282abc052d553b7c8 (patch)
tree29d28ea40e24001f1ac63d8d8f1bb41b4f6bcc46 /api.lua
parent4d37da6fe67eb02bf6a6b9ac7c4c20bc9cb20020 (diff)
tidy
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/api.lua b/api.lua
index 9cb521d..546872e 100644
--- a/api.lua
+++ b/api.lua
@@ -1,5 +1,5 @@
--- Mobs Api (21st October 2016)
+-- Mobs Api (22nd October 2016)
mobs = {}
mobs.mod = "redo"
@@ -1848,9 +1848,6 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
return
end
- -- direction error check
- dir = dir or {x = 0, y = 0, z = 0}
-
-- weapon wear
local weapon = hitter:get_wielded_item()
local punch_interval = 1.4
@@ -1889,7 +1886,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
end
end
- -- print ("Mob Damage is", damage)
+-- print ("Mob Damage is", damage)
-- add weapon wear
if tool_capabilities then
@@ -1962,6 +1959,9 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
up = 0
end
+ -- direction error check
+ dir = dir or {x = 0, y = 0, z = 0}
+
self.object:setvelocity({
x = dir.x * kb,
y = up,