diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 80adad0..a31a82a 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -522,7 +522,7 @@ function airutils.logic(self) self.object:set_rotation({x=newpitch,y=newyaw,z=newroll}) --end - if longit_speed > self._max_speed and self._flap == true then + if (longit_speed / 2) > self._max_speed and self._flap == true then if is_attached and self.driver_name then minetest.chat_send_player(self.driver_name, core.colorize('#ff0000', " >>> Flaps retracted due for overspeed")) end diff --git a/lib_planes/utilities.lua b/lib_planes/utilities.lua index 5f9ff96..f4aafd0 100644 --- a/lib_planes/utilities.lua +++ b/lib_planes/utilities.lua @@ -327,7 +327,10 @@ function airutils.testImpact(self, velocity, position) end end - if vertical_impact > 0.5 and self._longit_speed > self._min_speed/2 then + if self._last_touch == nil then self._last_touch = 1 end + if self._last_touch <= 1 then self._last_touch = self._last_touch + self.dtime end + if vertical_impact > 0.5 and self._longit_speed > self._min_speed/2 and self._last_touch >= 1 then + self._last_touch = 0 local noded = airutils.nodeatpos(airutils.pos_shift(p,{y=touch_point})) if (noded and noded.drawtype ~= 'airlike') then minetest.sound_play("airutils_touch", {