mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-23 16:00:16 +01:00
fix riding gravity
This commit is contained in:
parent
c24874a3bf
commit
22d7ea79fd
@ -220,7 +220,6 @@ end
|
|||||||
|
|
||||||
-- vars
|
-- vars
|
||||||
|
|
||||||
local GRAVITY = -9.8
|
|
||||||
local damage_counter = 0
|
local damage_counter = 0
|
||||||
|
|
||||||
-- ride mob like car or horse
|
-- 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
|
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
|
local velo = entity.object:get_velocity() ; if not velo then return end
|
||||||
|
|
||||||
entity.v = get_v(velo) * get_sign(entity.v)
|
entity.v = get_v(velo) * get_sign(entity.v)
|
||||||
|
Loading…
Reference in New Issue
Block a user