mirror of
https://github.com/mt-mods/hangglider.git
synced 2024-11-16 15:30:40 +01:00
rename can_fly() to friendly_airspace()
The name confused me over and over again. The function doesn't check flight-ability at all, it rather checks permission / friendlyness of area. safe_node_below() does more of what 'can_fly' implies.
This commit is contained in:
parent
0872a9161f
commit
10d082c3bb
4
init.lua
4
init.lua
|
@ -84,7 +84,7 @@ function hangglider.allowed_to_fly(pos, name, in_flight) --luacheck: no unused a
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local function can_fly(pos, name)
|
local function friendly_airspace(pos, name)
|
||||||
if not enable_flak then
|
if not enable_flak then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -153,7 +153,7 @@ local function hangglider_step(self, dtime)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not can_fly(pos, name) then
|
if not friendly_airspace(pos, name) then
|
||||||
if not self.flak_timer then
|
if not self.flak_timer then
|
||||||
self.flak_timer = 0
|
self.flak_timer = 0
|
||||||
shoot_flak_sound(pos)
|
shoot_flak_sound(pos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user