Skip to content

Commit

Permalink
Allow sending resources only to allies
Browse files Browse the repository at this point in the history
  • Loading branch information
speed2 authored and speed2CZ committed Nov 19, 2020
1 parent 39aad2d commit a57b7d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/SimUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ end

function GiveResourcesToPlayer(data)
SendChatToReplay(data)
-- Ignore observers and players trying to send resources to themselves
if data.From ~= -1 and data.From ~= data.To then
-- Ignore observers and players trying to send resources to themselves or to enemies
if data.From ~= -1 and data.From ~= data.To and IsAlly(data.From, data.To) then
if not OkayToMessWithArmy(data.From) then
return
end
Expand Down

0 comments on commit a57b7d9

Please sign in to comment.