added routine to stop calculations when it is stoped

master
Alexsandro Percy 2022-05-01 19:01:24 -03:00
parent 5109ac623d
commit 05f48d593c
1 changed files with 4 additions and 0 deletions

View File

@ -553,6 +553,10 @@ function pa28.flightstep(self)
end
end
if longit_speed == 0 and is_flying == false and is_attached == false and self._engine_running == false then
return
end
--ajustar angulo de ataque
local percentage = math.abs(((longit_speed * 100)/(pa28.min_speed + 5))/100)
if percentage > 1.5 then percentage = 1.5 end