Skip to content

Commit

Permalink
decals friendlyfire re-fix
Browse files Browse the repository at this point in the history
removed if statement
  • Loading branch information
shalkya committed Aug 29, 2021
1 parent 0245e90 commit e3716dd
Show file tree
Hide file tree
Showing 46 changed files with 82 additions and 315 deletions.
35 changes: 7 additions & 28 deletions lua/aeonprojectiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,7 @@ AGravitonBombProjectile = Class(SinglePolyTrailProjectile) { -- T1 bomber
OnImpact = function(self, targetType, targetEntity)
local radius = self.DamageData.DamageRadius
local pos = self:GetPosition()
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
Expand Down Expand Up @@ -464,10 +461,7 @@ AMissileSerpentineProjectile = Class(SingleCompositeEmitterProjectile) {
OnImpact = function(self, targetType, targetEntity)
local radius = self.DamageData.DamageRadius
local pos = self:GetPosition()
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
Expand Down Expand Up @@ -516,10 +510,7 @@ AOblivionCannonProjectile = Class(EmitterProjectile) {
OnImpact = function(self, targetType, targetEntity)
local radius = self.DamageData.DamageRadius
local pos = self:GetPosition()
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
Expand Down Expand Up @@ -549,10 +540,7 @@ AOblivionCannonProjectile02 = Class(SinglePolyTrailProjectile) {
OnImpact = function(self, targetType, targetEntity)
local radius = self.DamageData.DamageRadius
local pos = self:GetPosition()
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
Expand Down Expand Up @@ -582,10 +570,7 @@ AOblivionCannonProjectile03 = Class(EmitterProjectile) {
OnImpact = function(self, targetType, targetEntity)
local radius = self.DamageData.DamageRadius
local pos = self:GetPosition()
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
Expand Down Expand Up @@ -628,10 +613,7 @@ AQuantumDisruptorProjectile = Class(SinglePolyTrailProjectile) { -- ACU
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, 0.5, 1, 'Force', FriendlyFire )
DamageArea( self, pos, 0.5, 1, 'Force', FriendlyFire )
Expand Down Expand Up @@ -746,10 +728,7 @@ AQuarkBombProjectile = Class(EmitterProjectile) { -- Strategic bomber
CreateLightParticle(self, -1, self.Army, 26, 6, 'sparkle_white_add_08', 'ramp_white_02')
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
DamageArea(self, pos, radius, 1, 'Force', FriendlyFire)
Expand Down
45 changes: 10 additions & 35 deletions lua/cybranprojectiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ CIFProtonBombProjectile = Class(NullShell) { -- T3 strategic bomber
local army = self.Army
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

CreateLightParticle(self, -1, army, 12, 28, 'glow_03', 'ramp_proton_flash_02')
CreateLightParticle(self, -1, army, 8, 22, 'glow_03', 'ramp_antimatter_02')
Expand Down Expand Up @@ -130,10 +127,7 @@ CDFProtonCannonProjectile = Class(MultiPolyTrailProjectile) {
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
Expand Down Expand Up @@ -171,10 +165,7 @@ CDFHvyProtonCannonProjectile = Class(MultiPolyTrailProjectile) {
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
Expand Down Expand Up @@ -303,10 +294,7 @@ CArtilleryProtonProjectile = Class(SinglePolyTrailProjectile) {
local army = self.Army
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

CreateLightParticle( self, -1, army, radius * 2, 12, 'glow_03', 'ramp_red_06' )
CreateLightParticle( self, -1, army, radius * 2, 22, 'glow_03', 'ramp_antimatter_02' )
Expand Down Expand Up @@ -407,10 +395,7 @@ CDisintegratorLaserProjectile = Class(MultiPolyTrailProjectile) { --loya & waile
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, 0.5, 1, 'Force', FriendlyFire )
DamageArea( self, pos, 0.5, 1, 'Force', FriendlyFire )
Expand Down Expand Up @@ -465,7 +450,7 @@ CElectronBolterProjectile = Class(MultiPolyTrailProjectile) { -- loya, wagner, m
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

self.DamageData.DamageAmount = self.DamageData.DamageAmount - 2

Expand All @@ -474,7 +459,6 @@ CElectronBolterProjectile = Class(MultiPolyTrailProjectile) { -- loya, wagner, m
DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )

else
local FriendlyFire = false
DamageArea( self, pos, 1, 1, 'Force', FriendlyFire )
DamageArea( self, pos, 1, 1, 'Force', FriendlyFire )

Expand Down Expand Up @@ -524,10 +508,7 @@ CHeavyElectronBolterProjectile = Class(MultiPolyTrailProjectile) { -- SR
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
Expand Down Expand Up @@ -639,7 +620,7 @@ CIridiumRocketProjectile = Class(SingleCompositeEmitterProjectile) { -- T2 gs &

if radius == 0 then
local pos = self:GetPosition()
local local FriendlyFire = false
local FriendlyFire = false

DamageArea(self, pos, 1, 1, 'Force', FriendlyFire)
DamageArea(self, pos, 1, 1, 'Force', FriendlyFire)
Expand Down Expand Up @@ -673,10 +654,7 @@ CCorsairRocketProjectile = Class(SingleCompositeEmitterProjectile) {
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
DamageArea( self, pos, radius, 1, 'Force', FriendlyFire )
Expand Down Expand Up @@ -1193,10 +1171,7 @@ CHeavyDisintegratorPulseLaser = Class(MultiPolyTrailProjectile) { -- Brick
OnImpact = function(self, targetType, targetEntity)
local pos = self:GetPosition()
local radius = self.DamageData.DamageRadius
local FriendlyFire = self.DamageData.DamageFriendly
if radius == 0 then
local FriendlyFire = false
end
local FriendlyFire = self.DamageData.DamageFriendly and radius ~=0

DamageArea( self, pos, 1, 1, 'Force', FriendlyFire )
DamageArea( self, pos, 1, 1, 'Force', FriendlyFire )
Expand Down
Loading

0 comments on commit e3716dd

Please sign in to comment.