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

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Sep 1, 2015
1 parent e078025 commit 8f1b6c7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ctf/teams.lua
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,15 @@ end)

-- Disable friendly fire.
minetest.register_on_punchplayer(function(player, hitter)
local to = ctf.player(player:get_player_name())
local from = ctf.player(hitter:get_player_name())

if to.team == from.team and to.team ~= "" and to.team ~= nil then
minetest.chat_send_player(from:get_player_name(), to:get_player_name() .. " is on your team!")
if not ctf.setting("friendly_fire") then
return true
if player and hitter then
local to = ctf.player(player:get_player_name())
local from = ctf.player(hitter:get_player_name())

if to.team == from.team and to.team ~= "" and to.team ~= nil then
minetest.chat_send_player(hitter:get_player_name(), player:get_player_name() .. " is on your team!")
if not ctf.setting("friendly_fire") then
return true
end
end
end
end)

0 comments on commit 8f1b6c7

Please sign in to comment.