mirror of
https://github.com/weltensturm/wac.git
synced 2025-03-04 03:02:59 -05:00
null cl lua emitter fix
added a NULL check for invalid cl lua emitters.
This commit is contained in:
parent
3aaa06968e
commit
e7ef1331bb
@ -559,6 +559,7 @@ function ENT:Draw()
|
||||
if self.engineRpm > 0.2 and self.SmokePos then
|
||||
if !self.lastHeatDrawn or self.lastHeatDrawn < CurTime()-0.1 then
|
||||
if type(self.SmokePos) == "table" then
|
||||
if !self.Emitter or !self.Emitter:IsValid() then return end -- sometimes it isnt valid for some reason
|
||||
for _, v in self.SmokePos do
|
||||
local particle = self.Emitter:Add("sprites/heatwave",self:LocalToWorld(v))
|
||||
particle:SetVelocity(self:GetVelocity()+self:GetForward()*-100)
|
||||
|
Loading…
Reference in New Issue
Block a user