fixing issues pointed by Stella

This commit is contained in:
Alexsandro Percy 2023-07-08 15:50:29 -03:00
parent 8bf6bb87aa
commit cf7cd5f7dc
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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", {