Skip to content
Permalink
Browse files Browse the repository at this point in the history
Update recall feature (#4398)
Fix a few exploits that people could use to vote for another player
  • Loading branch information
Hdt80bro committed Nov 15, 2022
1 parent 52a8bec commit 6880971
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 148 deletions.
2 changes: 1 addition & 1 deletion lua/SimSync.lua
Expand Up @@ -125,12 +125,12 @@ end
function NoteFocusArmyChanged(new, old)
--LOG('NoteFocusArmyChanged(new=' .. repr(new) .. ', old=' .. repr(old) .. ')')
import("/lua/simping.lua").OnArmyChange()
import("/lua/sim/recall.lua").OnArmyChange()
for entityID, data in UnitData do
if new == -1 or data.OwnerArmy == new then
Sync.UnitData[entityID] = data.Data
elseif old == -1 or data.OwnerArmy == old then
Sync.ReleaseIds[entityID] = true
else
end
end
SyncUnitEnhancements()
Expand Down
1 change: 1 addition & 0 deletions lua/SimUtils.lua
Expand Up @@ -703,6 +703,7 @@ function BreakAlliance(data)
table.insert(Sync.BrokenAlliances, { From = data.From, To = data.To })
end
import("/lua/simping.lua").OnAllianceChange()
import("/lua/sim/recall.lua").OnAllianceChange(data)
end

---@param resultData {From: number, To: number, ResultValue: DiplomacyActionType}
Expand Down

0 comments on commit 6880971

Please sign in to comment.