summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/api.lua b/api.lua
index 3c23316..d6ba21b 100644
--- a/api.lua
+++ b/api.lua
@@ -3,7 +3,7 @@
mobs = {}
mobs.mod = "redo"
-mobs.version = "20180419"
+mobs.version = "20180427"
-- Intllib
@@ -762,6 +762,15 @@ local do_jump = function(self)
self.object:setvelocity(v)
+ -- when in air move forward
+ minetest.after(0.5, function(self, v)
+ self.object:setvelocity({
+ x = v.x * 1.5,
+ y = 0,
+ z = v.z * 1.5
+ })
+ end, self, v)
+
if get_velocity(self) > 0 then
mob_sound(self, self.sounds.jump)
end
@@ -3761,11 +3770,9 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
.. default.gui_bg_img
.. "field[0.5,1;7.5,0;name;" .. minetest.formspec_escape(S("Enter name:")) .. ";" .. tag .. "]"
.. "button_exit[2.5,3.5;3,1;mob_rename;" .. minetest.formspec_escape(S("Rename")) .. "]")
-
end
return false
-
end
@@ -3812,7 +3819,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- reset external variables
mob_obj[name] = nil
mob_sta[name] = nil
-
end
end)