Skip to content

Commit

Permalink
Prevent manual attack move of clearing structure queues (FAForever#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Penguin5 authored Aug 14, 2022
1 parent 1b6a40c commit ceb2ea3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/SimCallbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,13 @@ function IsInvalidAssist(unit, target)
end

Callbacks.AttackMove = function(data, units)
-- exclude structures as it makes no sense to apply a move command to them
local allNonStructures = EntityCategoryFilterDown(categories.ALLUNITS - categories.STRUCTURE, units)

if data.Clear then
IssueClearCommands(units)
IssueClearCommands(allNonStructures)
end
IssueAggressiveMove(units, data.Target)
IssueAggressiveMove(allNonStructures, data.Target)
end

--tells a unit to toggle its pointer
Expand Down

0 comments on commit ceb2ea3

Please sign in to comment.