Compare commits
No commits in common. "327504b1316acc2b66df401ee7d4d1c22ef86f28" and "62e0fe449e6e8be86846f24a2fe403c2dc817462" have entirely different histories.
327504b131
...
62e0fe449e
3 changed files with 5 additions and 13 deletions
|
@ -183,7 +183,6 @@ minetest.register_chatcommand("team", {
|
||||||
minetest.register_chatcommand("join", {
|
minetest.register_chatcommand("join", {
|
||||||
params = "team name",
|
params = "team name",
|
||||||
description = "Add to team",
|
description = "Add to team",
|
||||||
privs = {ctf_team_mgr = true},
|
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
if ctf.join(name, param, false, name) then
|
if ctf.join(name, param, false, name) then
|
||||||
return true, "Joined team " .. param .. "!"
|
return true, "Joined team " .. param .. "!"
|
||||||
|
|
|
@ -73,18 +73,16 @@ function ctf_classes.set(player, new_name)
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
local old_name = meta:get("ctf_classes:class")
|
local old_name = meta:get("ctf_classes:class")
|
||||||
|
|
||||||
if old_name == new_name then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
meta:set_string("ctf_classes:class", new_name)
|
meta:set_string("ctf_classes:class", new_name)
|
||||||
ctf_classes.update(player)
|
ctf_classes.update(player)
|
||||||
|
|
||||||
ctf_classes.set_cooldown(player:get_player_name())
|
ctf_classes.set_cooldown(player:get_player_name())
|
||||||
|
|
||||||
local old = old_name and ctf_classes.__classes[old_name]
|
if old_name == nil or old_name ~= new_name then
|
||||||
for i=1, #registered_on_changed do
|
local old = old_name and ctf_classes.__classes[old_name]
|
||||||
registered_on_changed[i](player, old, new)
|
for i=1, #registered_on_changed do
|
||||||
|
registered_on_changed[i](player, old, new)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -73,11 +73,6 @@ check_grapple("shooter_hook:grapple_hook")
|
||||||
-- Override grappling hook entity to check if player has flag before teleporting
|
-- Override grappling hook entity to check if player has flag before teleporting
|
||||||
local old_grapple_step = minetest.registered_entities["shooter_hook:hook"].on_step
|
local old_grapple_step = minetest.registered_entities["shooter_hook:hook"].on_step
|
||||||
minetest.registered_entities["shooter_hook:hook"].on_step = function(self, dtime, ...)
|
minetest.registered_entities["shooter_hook:hook"].on_step = function(self, dtime, ...)
|
||||||
-- User left the game. Life is no longer worth living for this poor hook
|
|
||||||
if not self.user then
|
|
||||||
self.object:remove()
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Remove entity if player has flag
|
-- Remove entity if player has flag
|
||||||
-- This is to prevent players from firing the hook, and then punching the flag
|
-- This is to prevent players from firing the hook, and then punching the flag
|
||||||
if ctf_flag.has_flag(self.user) then
|
if ctf_flag.has_flag(self.user) then
|
||||||
|
|
Loading…
Reference in a new issue