Skip to content

Commit

Permalink
Fix Miasma shield penetration (FAForever#6163)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh <[email protected]>
  • Loading branch information
clyfordv and MrRowey authored May 12, 2024
1 parent f6540d3 commit 94713b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
3 changes: 3 additions & 0 deletions lua/sim/projectiles/aeon/AMiasmaProjectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ local EmitterProjectile = import("/lua/sim/defaultprojectiles.lua").EmitterProje
AMiasmaProjectile = ClassProjectile(EmitterProjectile) {
FxTrails = EffectTemplate.AMiasmaMunition01,
FxImpactNone = EffectTemplate.AMiasma01,
FxImpactLand = EffectTemplate.AMiasmaField01,
FxImpactUnit = EffectTemplate.AMiasmaField01,
FxImpactProp = EffectTemplate.AMiasmaField01,
}
1 change: 0 additions & 1 deletion projectiles/AIFMiasmaShell01/AIFMiasmaShell01_proj.bp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ ProjectileBlueprint {
},
Physics = {
DestroyOnWater = true,
DetonateBelowHeight = 2,
LeadTarget = false,
StayUpright = false,
VelocityAlign = false,
Expand Down
27 changes: 1 addition & 26 deletions projectiles/AIFMiasmaShell01/AIFMiasmaShell01_script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,5 @@ local utilities = import("/lua/utilities.lua")

--- Aeon T2 Artillery Projectile : uab2303
---@class AIFMiasmaShell01 : AMiasmaProjectile
AIFMiasmaShell01 = ClassProjectile(AMiasmaProjectile) {

---@param self AIFMiasmaShell01
---@param targetType string
---@param targetEntity Prop|Unit
OnImpact = function(self, targetType, targetEntity)
local bp = self.Blueprint.Audio
local snd = bp['Impact'.. targetType]

if snd then
self:PlaySound(snd)
-- Generic Impact Sound
elseif bp.Impact then
self:PlaySound(bp.Impact)
end

self:CreateImpactEffects( self.Army, self.FxImpactNone, self.FxNoneHitScale )
local x,y,z = self:GetVelocity()
local speed = utilities.GetVectorLength(Vector(x*10,y*10,z*10))

-- One initial projectile following same directional path as the original
self:CreateChildProjectile('/projectiles/AIFMiasmaShell02/AIFMiasmaShell02_proj.bp')
:SetVelocity(x,y,z):SetVelocity(speed).DamageData = self.DamageData
self:Destroy()
end,
}
AIFMiasmaShell01 = ClassProjectile(AMiasmaProjectile) {}
TypeClass = AIFMiasmaShell01

0 comments on commit 94713b2

Please sign in to comment.