From 2d014a75c4d796b32c8b0dd6462b00ab166f0936 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 21 Jul 2021 19:38:41 +0100 Subject: [PATCH] tweak "stand" mobs velocity --- api.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 9db731e..236bf3b 100644 --- a/api.lua +++ b/api.lua @@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20210714", + version = "20210721", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -274,7 +274,9 @@ function mob_class:set_velocity(v) -- halt mob if it has been ordered to stay if self.order == "stand" then - self.object:set_velocity({x = 0, y = self.fall_speed, z = 0}) + local vel = self.object:get_velocity() or {y = 0} + + self.object:set_velocity({x = 0, y = vel.y, z = 0}) return end