1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-01-07 08:20:21 +01:00

fix riding gravity

This commit is contained in:
tenplus1 2024-12-13 15:49:52 +00:00
parent c24874a3bf
commit 22d7ea79fd
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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)