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:
parent
c24874a3bf
commit
22d7ea79fd
2
api.lua
2
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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user