Skip to content

Commit

Permalink
Solved table overwritting case at acf_ap_impact file
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyX5555 committed Sep 16, 2023
1 parent 98c8099 commit c340e65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/effects/acf_ap_impact/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function EFFECT:Init( data )
local Material = ACE_GetMaterialName( Mat )
local SmokeColor = ACE.DustMaterialColor[Material] or ACE.DustMaterialColor["Concrete"]

print(SmokeColor)

if Material == "Metal" then
self:Metal( SmokeColor )
else
Expand Down Expand Up @@ -111,7 +113,7 @@ end

function EFFECT:Metal( SmokeColor )

SmokeColor.a = SmokeColor.a * 0.5
local SmokeAlpha = SmokeColor.a * 0.5

--local PMul = self.ParticleMul
local Vel = self.Velocity / 2500
Expand All @@ -130,7 +132,7 @@ function EFFECT:Metal( SmokeColor )
Dust:SetVelocity(VectorRand() * math.random(25, 35 * Energy))
Dust:SetLifeTime(0)
Dust:SetDieTime(math.Rand(0.1, 4) * math.max(Energy, 2) / 3)
Dust:SetStartAlpha(math.Rand(math.max(SmokeColor.a - 25, 10), SmokeColor.a))
Dust:SetStartAlpha(math.Rand(math.max(SmokeAlpha - 25, 10), SmokeAlpha))
Dust:SetEndAlpha(0)
Dust:SetStartSize(5 * Energy)
Dust:SetEndSize(15 * Energy)
Expand Down

0 comments on commit c340e65

Please sign in to comment.