Skip to content

Commit

Permalink
Merge branch 'master' into destroy-autokill
Browse files Browse the repository at this point in the history
  • Loading branch information
pl608 authored May 14, 2024
2 parents 5b010c4 + 8a582a7 commit a59622d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
5 changes: 2 additions & 3 deletions mods/ctf/ctf_modebase/mode_vote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ function ctf_modebase.mode_vote.start_vote()
timer = minetest.after(VOTING_TIME, ctf_modebase.mode_vote.end_vote)
formspec_send_timer = minetest.after(2, send_formspec)
else
ctf_modebase.current_mode_matches = mode_defined_rounds
ctf_modebase.mode_on_next_match = new_mode
ctf_modebase.start_match_after_vote()
votes = {mode_defined_rounds}
ctf_modebase.mode_vote.end_vote()
end
end

Expand Down
12 changes: 11 additions & 1 deletion mods/ctf/ctf_modebase/recent_rankings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,17 @@ return {
rankings_teams = {}
end,
players = function() return rankings_players end,
teams = function() return rankings_teams end,
teams = function()
local out = {}

for k, v in pairs(rankings_teams) do
if not ctf_teams.team[k].not_playing then
out[k] = v
end
end

return out
end,
}

end
18 changes: 14 additions & 4 deletions mods/other/playertag/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ local function add_entity_tag(player, old_observers)
color = {a = 0, r = 0, g = 0, b = 0}
})

local ent = minetest.add_entity(player:get_pos(), "playertag:tag")
local ppos = player:get_pos()

local ent = minetest.add_entity(ppos, "playertag:tag")
local ent2 = false
local ent3 = false

if ent.set_observers then
ent2 = minetest.add_entity(player:get_pos(), "playertag:tag")
ent2 = minetest.add_entity(ppos, "playertag:tag")
ent2:set_observers(old_observers.nametag_entity or {})
ent2:set_properties({
nametag = player:get_player_name(),
nametag_color = "#EEFFFFDD",
nametag_bgcolor = "#0000002D"
})

ent3 = minetest.add_entity(player:get_pos(), "playertag:tag")
ent3 = minetest.add_entity(ppos, "playertag:tag")
ent3:set_observers(old_observers.symbol_entity or {})
ent3:set_properties({
collisionbox = { 0, 0, 0, 0, 0, 0 },
Expand Down Expand Up @@ -152,9 +154,17 @@ minetest.register_entity("playertag:tag", {
physical = false,
makes_footstep_sound = false,
backface_culling = false,
static_save = false,
static_save = true,
pointable = false,
on_punch = function() return true end,
on_detach = function(self, parent)
self.object:remove()
end,
on_deactivate = function(self, removal)
if not removal then
self.object:remove()
end
end,
})

minetest.register_on_joinplayer(function(player)
Expand Down

0 comments on commit a59622d

Please sign in to comment.