mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
fix isonground
This commit is contained in:
parent
cd58d6900f
commit
164399401d
1 changed files with 4 additions and 13 deletions
|
@ -120,6 +120,10 @@ function airutils.on_step(self,dtime,colinfo)
|
|||
props.show_on_minimap = true
|
||||
self.object:set_properties(props)
|
||||
end
|
||||
if self.isonground and props.show_on_minimap then
|
||||
props.show_on_minimap = false
|
||||
self.object:set_properties(plane_properties)
|
||||
end
|
||||
|
||||
if colinfo then
|
||||
self.isonground = colinfo.touching_ground
|
||||
|
@ -189,19 +193,6 @@ function airutils.logic(self)
|
|||
local co_pilot = nil
|
||||
if self.co_pilot and self._have_copilot then co_pilot = minetest.get_player_by_name(self.co_pilot) end
|
||||
|
||||
local plane_properties = self.object:get_properties()
|
||||
if self.isonground then
|
||||
if plane_properties.show_on_minimap == true then
|
||||
plane_properties.show_on_minimap = false
|
||||
self.object:set_properties(plane_properties)
|
||||
end
|
||||
else
|
||||
if plane_properties.show_on_minimap == false then
|
||||
plane_properties.show_on_minimap = true
|
||||
self.object:set_properties(plane_properties)
|
||||
end
|
||||
end
|
||||
|
||||
if player then
|
||||
local ctrl = player:get_player_control()
|
||||
---------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue