mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
improved backwards speed
This commit is contained in:
parent
136e16fe21
commit
d11f10eef1
1 changed files with 3 additions and 3 deletions
|
@ -116,7 +116,7 @@ function airutils.heli_control(self, dtime, hull_direction, longit_speed, longit
|
|||
self._acceleration = 0
|
||||
end
|
||||
elseif ctrl.down then
|
||||
if longit_speed > -1.0 then
|
||||
if longit_speed > -self._max_speed then
|
||||
self._acceleration = self._acceleration + (-acc_fraction)
|
||||
else
|
||||
self._acceleration = 0
|
||||
|
@ -125,7 +125,7 @@ function airutils.heli_control(self, dtime, hull_direction, longit_speed, longit
|
|||
self._acceleration = 0
|
||||
end
|
||||
self._acceleration = math.min(self._acceleration,self._max_engine_acc)
|
||||
self._acceleration = math.max(self._acceleration,-1)
|
||||
self._acceleration = math.max(self._acceleration,-self._max_engine_acc)
|
||||
|
||||
if is_flying then --why double check? because I dont want lateral movement when landed
|
||||
if ctrl.right then
|
||||
|
@ -153,7 +153,7 @@ function airutils.heli_control(self, dtime, hull_direction, longit_speed, longit
|
|||
end
|
||||
|
||||
self._vehicle_acc = math.min(self._acceleration, self._max_engine_acc)
|
||||
self._vehicle_acc = math.max(self._acceleration,-1)
|
||||
self._vehicle_acc = math.max(self._acceleration,-self._max_engine_acc)
|
||||
self._lat_acc = math.min(self._lat_acceleration, self._max_engine_acc)
|
||||
|
||||
local hull_acc = vector.multiply(hull_direction,self._vehicle_acc)
|
||||
|
|
Loading…
Add table
Reference in a new issue