From 8341312b6482b0bd6d89ee375f13b19f110fa6fd Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Sun, 29 Oct 2023 20:02:45 -0300 Subject: [PATCH] fix hydro planes --- lib_planes/entities.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 9cee4c7..a4fc322 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -319,7 +319,9 @@ function airutils.logic(self) if (math.abs(velocity.x) < 0.1 and math.abs(velocity.z) < 0.1) and is_flying == false and is_attached == false and self._engine_running == false then - self.object:set_velocity({x=0,y=airutils.gravity*self.dtime,z=0}) + if self._ground_friction then + if self._ground_friction <= 0.97 then self.object:set_velocity({x=0,y=airutils.gravity*self.dtime,z=0}) end + end return end