Skip to content

Commit

Permalink
add decals to T2 sera gunship
Browse files Browse the repository at this point in the history
  • Loading branch information
shalkya committed Dec 5, 2020
1 parent 01a3c53 commit 0a22d36
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions lua/seraphimprojectiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ SPhasicAutogun = Class(MultiPolyTrailProjectile) {
PolyTrailOffset = {0,0},
}

SHeavyPhasicAutogun = Class(MultiPolyTrailProjectile) {
SHeavyPhasicAutogun = Class(MultiPolyTrailProjectile) { -- T2 gunship and T2 transport
FxImpactLand = EffectTemplate.HeavyPhasicAutoGunHit,
FxImpactNone = EffectTemplate.HeavyPhasicAutoGunHit,
FxImpactProp = EffectTemplate.HeavyPhasicAutoGunHitUnit,
Expand All @@ -234,10 +234,26 @@ SHeavyPhasicAutogun = Class(MultiPolyTrailProjectile) {
PolyTrailOffset = {0,0},
}

-- Adjustment for XSA0203 projectile speed.
-- Adjustment for XSA0203 projectile speed. : T2 gunship
SHeavyPhasicAutogun02 = Class(SHeavyPhasicAutogun) {
PolyTrails = EffectTemplate.HeavyPhasicAutoGunProjectileTrail02,
FxTrails = EffectTemplate.HeavyPhasicAutoGunProjectileTrailGlow02,

OnImpact = function(self, targetType, targetEntity)
if targetType ~= 'Shield' and targetType ~= 'Water' and targetType ~= 'Air' and targetType ~= 'UnitAir' and targetType ~= 'Projectile' and targetType ~= 'Unit' then
local RandomFloat = import('/lua/utilities.lua').GetRandomFloat
local rotation = RandomFloat(0,2*math.pi)
local pos = self:GetPosition()
local army = self.Army

DamageArea( self, pos, 0.7, 1, 'Force', true )
DamageArea( self, pos, 0.7, 1, 'Force', true )

CreateDecal(pos, rotation, 'scorch_001_albedo', '', 'Albedo', 0.7, 0.7, 130, 15, army)
end

SHeavyPhasicAutogun.OnImpact(self, targetType, targetEntity)
end,
}

--------------------------------------------------------------------------
Expand Down

0 comments on commit 0a22d36

Please sign in to comment.