Replaced static_spawnpoint

This commit is contained in:
ezhh 2016-09-20 12:35:02 +01:00
parent 5b6484eddc
commit b89cac540b

View File

@ -242,10 +242,10 @@ minetest.register_chatcommand("uncage", {
minetest.chat_send_player(warden_name,"This player is not caged") minetest.chat_send_player(warden_name,"This player is not caged")
return return
end end
--get spawn point position from config or return. --get release position from config or return.
local spawnpos = minetest.setting_get_pos("static_spawnpoint") local releasepos = minetest.setting_get_pos("release_coordinate")
if not spawnpos then if not releasepos then
minetest.chat_send_player(warden_name, "No spawn point set...") minetest.chat_send_player(warden_name, "No release point set...")
return return
end end
--get target's original privs from table and restore them. --get target's original privs from table and restore them.
@ -254,9 +254,9 @@ minetest.register_chatcommand("uncage", {
--remove entry for target from table and save to file. --remove entry for target from table and save to file.
priv_table[target_name] = nil priv_table[target_name] = nil
table_save() table_save()
--restore sneak and move target to spawn. --restore sneak and move target to release point.
target:set_physics_override({sneak = true}) target:set_physics_override({sneak = true})
target:setpos(spawnpos) target:setpos(releasepos)
end end
}) })