removed support for any other game on camera reposition method
This commit is contained in:
parent
21928c277c
commit
57937e7b18
@ -751,11 +751,12 @@ function airutils.get_xz_from_hipotenuse(orig_x, orig_z, yaw, distance)
|
||||
end
|
||||
|
||||
function airutils.camera_reposition(player, pitch, roll)
|
||||
local new_eye_offset = vector.new()
|
||||
if airutils.is_minetest then
|
||||
if roll < -0.4 then roll = -0.4 end
|
||||
if roll > 0.4 then roll = 0.4 end
|
||||
|
||||
local player_properties = player:get_properties()
|
||||
local new_eye_offset = vector.new()
|
||||
|
||||
local eye_y = -5
|
||||
if airutils.detect_player_api(player) == 1 then
|
||||
@ -773,6 +774,8 @@ function airutils.camera_reposition(player, pitch, roll)
|
||||
local x, _ = airutils.get_xz_from_hipotenuse(0, eye_y, roll, player_properties.eye_height)
|
||||
new_eye_offset.x = -x*15
|
||||
return new_eye_offset
|
||||
end
|
||||
return new_eye_offset
|
||||
end
|
||||
|
||||
function airutils.seats_create(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user