Skip to content

Commit

Permalink
Reverted tracer model path
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedTail committed May 20, 2024
1 parent 8eaedac commit 97e45a7
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
35 changes: 20 additions & 15 deletions lua/effects/acf_projectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function EFFECT:Init(Data)

if Remove then self:Remove() end
else
print("Invalid action for bullet #" .. Index .. ", removing.")
print("Invalid action for bullet #" .. Index .. ", ignoring.")

self:Remove()
end
Expand Down Expand Up @@ -50,27 +50,15 @@ function EFFECT:Create(Index, Data)
DragCoef = Crate:GetNW2Float("DragCoef", 1),
AmmoType = Crate:GetNW2String("AmmoType", "AP"),
Accel = Crate:GetNW2Vector("Accel", ACF.Gravity),
Color = Color,
LastThink = Clock.CurTime,
Effect = self,
}

if Color then
self:ManipulateBoneScale(0, Vector(Caliber * 4, Caliber * 2, Caliber * 2))
self:SetModel("models/acf/core/tracer.mdl")
self:SetColor(Color)

self.IsTracer = true
else
self:SetModel("models/munitions/round_100mm_shot.mdl")
self:SetModelScale(Caliber * 0.1, 0)
end
self.Bullet = Bullet

self:SetNoDraw(Data:GetAttachment() == 0)
self:SetAngles(Bullet.Flight:Angle())
self:SetPos(Bullet.Pos)

self.Bullet = Bullet
self:SetTracer(Color)

Bullets[Index] = Bullet
end
Expand Down Expand Up @@ -141,6 +129,23 @@ function EFFECT:Ricochet(Index, Data)
return true
end

function EFFECT:SetTracer(Color)
local IsTracer = Color and true or false
local Bullet = self.Bullet
local Caliber = Bullet.Caliber

if IsTracer then
self:ManipulateBoneScale(0, Vector(Caliber * 4, Caliber * 2, Caliber * 2))
self:SetModel("models/tracer.mdl")
self:SetColor(Color)
else
self:SetModel("models/munitions/round_100mm_shot.mdl")
self:SetModelScale(Caliber * 0.1, 0)
end

self.IsTracer = IsTracer
end

function EFFECT:Think()
local Bullet = self.Bullet

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VertexLitGeneric
{
$basetexture "models/acf/core/tracer.vtf"
$basetexture "models\tracer.vtf"
$selfillum 1
$translucent 1
$additive 1
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 97e45a7

Please sign in to comment.