mirror of
https://github.com/APercy/ap_airship.git
synced 2025-07-21 06:44:47 -04:00
fixes and priv to anchor added
This commit is contained in:
parent
9c2b1a84cc
commit
232f5df95f
3 changed files with 16 additions and 4 deletions
|
@ -229,8 +229,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
if fields.anchor == "true" then
|
||||
local max_speed_anchor = 0.6
|
||||
if ent._longit_speed then
|
||||
local is_admin = minetest.check_player_privs(player, {server=true}) --force stop by admins
|
||||
if (math.abs(ent._longit_speed) < max_speed_anchor and ent.isonground) or is_admin then
|
||||
local can_anchor = minetest.check_player_privs(player, {ap_airship_anchor=true}) --force stop
|
||||
if (math.abs(ent._longit_speed) < max_speed_anchor and ent.isonground) or can_anchor then
|
||||
ent.anchored = true
|
||||
ent.object:set_acceleration(vector.new())
|
||||
ent.object:set_velocity(vector.new())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue