diff --git a/player.lua b/player.lua index 65ddb64..961021b 100644 --- a/player.lua +++ b/player.lua @@ -460,6 +460,14 @@ function Player:set_fov(fov, is_multiplier, transition_time) error("NOT IMPLEMEN function Player:get_fov() error("NOT IMPLEMENTED") end function Player:get_eye_offset() return self._eye_offset_first, self._eye_offset_third end +function Player:set_eye_offset(firstperson, thirdperson) + self._eye_offset_first = firstperson and table.copy(firstperson) or {x=0,y=0,z=0} + thirdperson = thirdperson and table.copy(thirdperson) or {x=0,y=0,z=0} + thirdperson.x = math.max(-10, math.min(10, thirdperson.x)) + thirdperson.y = math.max(-10, math.min(15, thirdperson.y)) + thirdperson.z = math.max(-5, math.min(5, thirdperson.z)) + self._eye_offset_third = thirdperson +end function Player:set_attribute(attribute, value) DEPRECATED() end function Player:get_attribute(attribute) DEPRECATED() end