control adjust
This commit is contained in:
parent
c30a1b581e
commit
bf2b1cc4af
@ -138,7 +138,7 @@ function hidroplane.control(self, dtime, hull_direction, longit_speed, longit_dr
|
||||
self._rudder_angle = self._rudder_angle + correction
|
||||
|
||||
factor = 1
|
||||
--if self._elevator_angle > -1.5 then factor = -1 end --here is the "compansator" adjusto to keep it stable
|
||||
--if self._elevator_angle > -1.5 then factor = -1 end --here is the "compensator" adjusto to keep it stable
|
||||
if self._elevator_angle > 0 then factor = -1 end
|
||||
correction = (elevator_limit/10) * factor * dtime
|
||||
self._elevator_angle = self._elevator_angle + correction
|
||||
|
@ -540,15 +540,15 @@ function hidroplane.flightstep(self)
|
||||
-- end roll
|
||||
|
||||
--accell calculation
|
||||
if is_attached then
|
||||
--control
|
||||
accel, stop = hidroplane.control(self, self.dtime, hull_direction, longit_speed, longit_drag, later_speed, later_drag, accel, player, is_flying)
|
||||
else
|
||||
--control
|
||||
accel, stop = hidroplane.control(self, self.dtime, hull_direction, longit_speed, longit_drag, later_speed, later_drag, accel, player, is_flying)
|
||||
if not is_attached then
|
||||
-- for some engine error the player can be detached from the machine, so lets set him attached again
|
||||
hidroplane.checkattachBug(self)
|
||||
end
|
||||
--end accell
|
||||
--lift calculation
|
||||
if accel == nil then accel = {x=0,y=0,z=0} end
|
||||
accel.y = accel_y
|
||||
local new_accel = accel
|
||||
if longit_speed > 2 then
|
||||
|
Loading…
x
Reference in New Issue
Block a user