From e456d6f1ceaf7f40398d459bca1b4de2ef2fa8e9 Mon Sep 17 00:00:00 2001 From: Robotboy655 Date: Wed, 20 Apr 2016 21:55:55 +0300 Subject: [PATCH] Fixed/Improved thruster rendering No longer has halo around effects, effects now draw properly over the model --- .../sandbox/entities/entities/base_gmodentity.lua | 1 - .../sandbox/entities/entities/gmod_thruster.lua | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/garrysmod/gamemodes/sandbox/entities/entities/base_gmodentity.lua b/garrysmod/gamemodes/sandbox/entities/entities/base_gmodentity.lua index 324d2d98be..c6f14b368e 100644 --- a/garrysmod/gamemodes/sandbox/entities/entities/base_gmodentity.lua +++ b/garrysmod/gamemodes/sandbox/entities/entities/base_gmodentity.lua @@ -52,7 +52,6 @@ function ENT:GetOverlayText() end - function ENT:SetPlayer( ply ) if ( IsValid(ply) ) then diff --git a/garrysmod/gamemodes/sandbox/entities/entities/gmod_thruster.lua b/garrysmod/gamemodes/sandbox/entities/entities/gmod_thruster.lua index 3be70ae434..2de93926a5 100644 --- a/garrysmod/gamemodes/sandbox/entities/entities/gmod_thruster.lua +++ b/garrysmod/gamemodes/sandbox/entities/entities/gmod_thruster.lua @@ -3,7 +3,6 @@ AddCSLuaFile() DEFINE_BASECLASS( "base_gmodentity" ) ENT.Spawnable = false -ENT.RenderGroup = RENDERGROUP_BOTH local matHeatWave = Material( "sprites/heatwave" ) local matFire = Material( "effects/fire_cloud1" ) @@ -88,15 +87,9 @@ function ENT:Draw() if ( self.ShouldDraw == 0 ) then return end - BaseClass.Draw( self ) + self:DrawModel() -end - -function ENT:DrawTranslucent() - - if ( self.ShouldDraw == 0 ) then return end - - BaseClass.DrawTranslucent( self ) + if ( halo.RenderedEntity() == self ) then return end if ( !self:IsOn() ) then self.OnStart = nil @@ -108,7 +101,6 @@ function ENT:DrawTranslucent() local EffectThink = self[ "EffectDraw_" .. self:GetEffect() ] if ( EffectThink ) then EffectThink( self ) end - end function ENT:Think()