From 22d7ea79fd544a1028095a28b7dbb70308d21b14 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 13 Dec 2024 15:49:52 +0000 Subject: [PATCH] fix riding gravity --- api.lua | 2 +- mount.lua | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api.lua b/api.lua index 3b718bd..a5b2615 100644 --- a/api.lua +++ b/api.lua @@ -2616,7 +2616,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) if use_mc2 then enchants = minetest.deserialize( - weapon:get_meta():get_string("mcl_enchanting:enchantments")) or {} + weapon:get_meta():get_string("mcl_enchanting:enchantments")) or {} end -- calculate mob damage diff --git a/mount.lua b/mount.lua index ddf6719..ded3acc 100644 --- a/mount.lua +++ b/mount.lua @@ -220,7 +220,6 @@ end -- vars -local GRAVITY = -9.8 local damage_counter = 0 -- ride mob like car or horse @@ -232,7 +231,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) if entity.player_rotation.y == 90 then rot_view = pi / 2 end - local acce_y = GRAVITY + local acce_y = 0 local velo = entity.object:get_velocity() ; if not velo then return end entity.v = get_v(velo) * get_sign(entity.v)