e9da54c2f9
Too many changes to list.
34 lines
919 B
Lua
34 lines
919 B
Lua
INC_CLIENT()
|
|
|
|
ENT.NextEmit = 0
|
|
|
|
function ENT:Initialize()
|
|
self:SetColor(Color(255, 255, 145, 255))
|
|
self:SetMaterial("models/seagull/seagull")
|
|
end
|
|
|
|
function ENT:Draw()
|
|
self:DrawModel()
|
|
|
|
if CurTime() < self.NextEmit then return end
|
|
self.NextEmit = CurTime() + 0.025
|
|
|
|
local pos = self:GetPos()
|
|
|
|
local emitter = ParticleEmitter(pos)
|
|
emitter:SetNearClip(24, 32)
|
|
|
|
local particle = emitter:Add("particles/smokey", pos)
|
|
particle:SetDieTime(math.Rand(0.4, 0.5))
|
|
particle:SetStartAlpha(255)
|
|
particle:SetEndAlpha(0)
|
|
particle:SetStartSize(math.Rand(3, 5))
|
|
particle:SetEndSize(0)
|
|
particle:SetRoll(math.Rand(0, 255))
|
|
particle:SetRollDelta(math.Rand(-10, 10))
|
|
particle:SetVelocity((self:GetVelocity():GetNormalized() * -1 + VectorRand():GetNormalized()):GetNormalized() * math.Rand(16, 48))
|
|
particle:SetLighting(true)
|
|
particle:SetColor(190, 125, 255)
|
|
|
|
emitter:Finish() emitter = nil collectgarbage("step", 64)
|
|
end
|