Skip to content

Commit

Permalink
Fix issues with release (FAForever#3822)
Browse files Browse the repository at this point in the history
Fixes various sound issues, a miss matching file, some issues with the UEF Build Effect and the AI blueprint view window.
  • Loading branch information
Garanas authored Apr 29, 2022
1 parent dbdfca9 commit 7afd6de
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lua/EffectUtilitiesUEF.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function CreateBuildCubeThread(
CoroutineYield(BuildCubeDelay)

-- always check if we're still there after waiting
if EntityBeenDestroyed(unitBeingBuilt) then
if EntityBeenDestroyed(unitBeingBuilt) or EntityBeenDestroyed(BuildBaseEffect) then
return
end

Expand All @@ -317,7 +317,7 @@ function CreateBuildCubeThread(
WaitSeconds(BuildCubeFirstSliceDelay)

-- always check if we're still there after waiting
if unitBeingBuilt.Dead then
if EntityBeenDestroyed(unitBeingBuilt) or EntityBeenDestroyed(BuildBaseEffect) then
return
end

Expand Down
10 changes: 8 additions & 2 deletions lua/sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,9 @@ Unit = Class(moho.unit_methods) {
-- Handle ships that can walk on land
self:PlayUnitSound('AmphibiousFloatingKilledOnLand')
else
self:PlayUnitSound('Killed')
if not self:PlayUnitSound('Killed') then
self:PlayUnitSound('Destroyed')
end
end

-- apply death animation on half built units (do not apply for ML and mega)
Expand Down Expand Up @@ -1859,7 +1861,11 @@ Unit = Class(moho.unit_methods) {
-- wait at least 1 tick before destroying unit
WaitSeconds(math.max(0.1, self.DeathThreadDestructionWaitTime))

self:PlayUnitSound('Destroyed')
-- do not play sound after sinking
if not self.Sinking then
self:PlayUnitSound('Destroyed')
end

self:Destroy()
end,

Expand Down
2 changes: 1 addition & 1 deletion lua/ui/dialogs/AIUtilitiesView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function OpenWindow()
SPEW("Created AI utilities window")

-- create the window
State.GUI = Window.CreateDefaultWindow(
State.GUI = UIUtil.CreateWindowStd(
GetFrame(0),
"AI blueprint information",
false,
Expand Down
1 change: 1 addition & 0 deletions projectiles/ShieldCollider/ShieldCollider_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ ShieldCollider = Class(Projectile) {
if not self.Plane.GroundImpacted then
self.Plane:OnImpact(targetType)
end

self:Destroy()
elseif targetType == 'Shield' and targetEntity and not targetEntity:BeenDestroyed() and targetEntity.ShieldType == 'Bubble' then
if not self.ShieldImpacted and not self.Plane.GroundImpacted then
Expand Down

0 comments on commit 7afd6de

Please sign in to comment.