mirror of
https://github.com/APercy/airutils.git
synced 2025-04-30 08:41:41 -04:00
fix for backwards acceleration
This commit is contained in:
parent
bfd3f9792a
commit
136e16fe21
1 changed files with 2 additions and 0 deletions
|
@ -125,6 +125,7 @@ function airutils.heli_control(self, dtime, hull_direction, longit_speed, longit
|
||||||
self._acceleration = 0
|
self._acceleration = 0
|
||||||
end
|
end
|
||||||
self._acceleration = math.min(self._acceleration,self._max_engine_acc)
|
self._acceleration = math.min(self._acceleration,self._max_engine_acc)
|
||||||
|
self._acceleration = math.max(self._acceleration,-1)
|
||||||
|
|
||||||
if is_flying then --why double check? because I dont want lateral movement when landed
|
if is_flying then --why double check? because I dont want lateral movement when landed
|
||||||
if ctrl.right then
|
if ctrl.right then
|
||||||
|
@ -152,6 +153,7 @@ function airutils.heli_control(self, dtime, hull_direction, longit_speed, longit
|
||||||
end
|
end
|
||||||
|
|
||||||
self._vehicle_acc = math.min(self._acceleration, self._max_engine_acc)
|
self._vehicle_acc = math.min(self._acceleration, self._max_engine_acc)
|
||||||
|
self._vehicle_acc = math.max(self._acceleration,-1)
|
||||||
self._lat_acc = math.min(self._lat_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)
|
local hull_acc = vector.multiply(hull_direction,self._vehicle_acc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue