Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Mar 29, 2016
1 parent 8c073e1 commit 59d220f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions ctf/teams.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ function ctf.count_players_in_team(team)
end

function ctf.new_player(name)
if not name then
if name then
ctf.players[name] = {
name = name
}
else
ctf.error("team", "Can't create a blank player")
ctf.log("team", debug.traceback())
end
ctf.players[name] = {
name = name
}
end

-- get a player
Expand Down
5 changes: 3 additions & 2 deletions ctf_colors/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)

-- Settings page
if fields.save then
ctf.gui.show(name, "settings")

local name = player:get_player_name()
local pdata = ctf.player(name)
local team = ctf.team(pdata.team)

ctf.gui.show(name, "settings")
if team and ctf.can_mod(name, pdata.team) then
if ctf.flag_colors[fields.color] then
team.data.color = fields.color
Expand Down

0 comments on commit 59d220f

Please sign in to comment.