Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Sera effect flash at finished structure #3196

Merged
merged 1 commit into from
Nov 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 1 addition & 12 deletions lua/EffectUtilities.lua
Expand Up @@ -817,18 +817,7 @@ function CreateSeraphimBuildThread(unitBeingBuilt, builder, EffectsBag, scaleFac
end
end

-- The flash can now be seen only by the player owning the building, his allies or enemies who
-- have a visual of the building.
local unitsArmy = unitBeingBuilt.Army
local focusArmy = GetFocusArmy()
if focusArmy == -1 or IsAlly(unitsArmy, focusArmy) then
CreateLightParticle(unitBeingBuilt, -1, unitsArmy, unitBeingBuilt:GetFootPrintSize() * 7, 8, 'glow_02', 'ramp_blue_22')
elseif IsEnemy(unitsArmy, focusArmy) then
local blip = unitBeingBuilt:GetBlip(focusArmy)
if blip ~= nil and blip:IsSeenNow(focusArmy) then
CreateLightParticle(unitBeingBuilt, -1, unitsArmy, unitBeingBuilt:GetFootPrintSize() * 7, 8, 'glow_02', 'ramp_blue_22')
end
end
CreateLightParticleIntel(unitBeingBuilt, -1, unitBeingBuilt.Army, unitBeingBuilt:GetFootPrintSize() * 7, 8, 'glow_02', 'ramp_blue_22')

WaitSeconds(0.5)
BuildBaseEffect:Destroy()
Expand Down