From 4a1faa44de4c107f9ed7e016e6d53789234249e9 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 6 Apr 2021 21:59:51 -0400 Subject: [PATCH] Make unmounting a mob less of a jolt --- mods/ENTITIES/mcl_mobs/mount.lua | 8 ++++++-- mods/ENTITIES/mobs_mc/horse.lua | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/mount.lua b/mods/ENTITIES/mcl_mobs/mount.lua index d8ce484c3..3d093a123 100644 --- a/mods/ENTITIES/mcl_mobs/mount.lua +++ b/mods/ENTITIES/mcl_mobs/mount.lua @@ -168,16 +168,20 @@ function mobs.detach(player, offset) mcl_player.player_set_animation(player, "stand" , 30) - local pos = player:get_pos() + --local pos = player:get_pos() - pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z} + --pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z} + player:add_velocity(vector.new(math.random(-5,5),math.random(3,6),math.random(-5,5))) --throw the rider off + + --[[ minetest.after(0.1, function(name, pos) local player = minetest.get_player_by_name(name) if player then player:set_pos(pos) end end, player:get_player_name(), pos) + ]]-- end diff --git a/mods/ENTITIES/mobs_mc/horse.lua b/mods/ENTITIES/mobs_mc/horse.lua index 1c2df41f3..3da63831e 100644 --- a/mods/ENTITIES/mobs_mc/horse.lua +++ b/mods/ENTITIES/mobs_mc/horse.lua @@ -231,7 +231,6 @@ local horse = { temper_increase = 5 elseif (iname == mobs_mc.items.golden_apple) then temper_increase = 10 - -- Trying to ride elseif not self.driver then self.object:set_properties({stepheight = 1.1})