mirror of
https://github.com/SmallJoker/boost_cart.git
synced 2024-11-23 15:13:44 +01:00
Correct the player attachment position for the new player model
Requires the player_api mod to 'detect' the new model
This commit is contained in:
parent
3c646ee4df
commit
11a1ebad74
@ -18,7 +18,9 @@ function boost_cart:manage_attachment(player, obj)
|
||||
default.player_attached[player_name] = status
|
||||
|
||||
if status then
|
||||
player:set_attach(obj, "", {x=0, y=6, z=0}, {x=0, y=0, z=0})
|
||||
-- player_api came after the new model. Check for it.
|
||||
local y_pos = player_api and -4.5 or 6
|
||||
player:set_attach(obj, "", {x=0, y=y_pos, z=0}, {x=0, y=0, z=0})
|
||||
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
|
||||
else
|
||||
player:set_detach()
|
||||
|
Loading…
Reference in New Issue
Block a user