Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/entities/gmod_wire_hoverball.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
local drawhoverballs = CreateConVar( "cl_drawhoverballs", "1" )
local glowmat = Material( "sprites/light_glow02_add" )

function ENT:DrawTranslucent()
function ENT:DrawTranslucent(flags)
BaseClass.DrawTranslucent(self, flags)
if not drawhoverballs:GetBool() then return end

if self:IsOn() then
Expand Down Expand Up @@ -178,7 +179,7 @@

phys:Wake()

local Vel = phys:GetVelocity()

Check warning on line 182 in lua/entities/gmod_wire_hoverball.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: Vel
local Distance = self:GetZTarget() - Pos.z
local AirResistance = self:GetAirResistance()

Expand Down
3 changes: 2 additions & 1 deletion lua/entities/gmod_wire_light.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if CLIENT then
local matLight = Material( "sprites/light_ignorez" )
local matBeam = Material( "effects/lamp_beam" )

Check warning on line 20 in lua/entities/gmod_wire_light.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: matBeam

function ENT:Initialize()
self.PixVis = util.GetPixelVisibleHandle()
Expand All @@ -34,14 +34,15 @@
return Color( self:GetR(), self:GetG(), self:GetB(), 255 )
end

function ENT:DrawTranslucent()
function ENT:DrawTranslucent(flags)
BaseClass.DrawTranslucent(self, flags)
if not self:GetOn() then return end

local LightPos = self:GetPos()
render.SetMaterial( matLight )

local ViewNormal = self:GetPos() - EyePos()
local Distance = ViewNormal:Length()

Check warning on line 45 in lua/entities/gmod_wire_light.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: Distance
ViewNormal:Normalize()

local Visible = util.PixelVisible( LightPos, 4, self.PixVis )
Expand Down Expand Up @@ -115,7 +116,7 @@
-- text
local color_text = string.format("Color:\n%d,%d,%d",color.r,color.g,color.b)

local w,h = surface.GetTextSize( color_text )

Check warning on line 119 in lua/entities/gmod_wire_light.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: w
draw.DrawText( color_text, "GModWorldtip", pos.center.x, pos.min.y + pos.edgesize, color_white, TEXT_ALIGN_CENTER )

-- color box
Expand Down
3 changes: 2 additions & 1 deletion lua/entities/gmod_wire_thruster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
self:SetRenderBounds(mn + Vector(0,0,128), mx, 0)
end

function ENT:DrawTranslucent()
function ENT:DrawTranslucent(flags)
BaseClass.DrawTranslucent(self, flags)
if self.ShouldDraw == 0 or not self:IsOn() then return end

local EffectDraw = WireLib.ThrusterEffectDraw[self:GetEffect()]
Expand All @@ -50,7 +51,7 @@
function ENT:Think()
BaseClass.Think(self)

self.ShouldDraw = GetConVarNumber("cl_drawthrusterseffects")

Check warning on line 54 in lua/entities/gmod_wire_thruster.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead

if self.ShouldDraw == 0 or not self:IsOn() then return end

Expand Down Expand Up @@ -190,7 +191,7 @@

function ENT:TriggerInput(iname, value)
if (iname == "A") then
if ( (self.bidir) and (math.abs(value) > 0.01) and (math.abs(value) > self.force_min) ) or ( (value > 0.01) and (value > self.force_min) ) then

Check warning on line 194 in lua/entities/gmod_wire_thruster.lua

View workflow job for this annotation

GitHub Actions / lint

"Unnecessary parentheses"

Unnecessary parentheses
self:Switch(true, math.min(value, self.force_max))
else
self:Switch(false, 0)
Expand Down Expand Up @@ -242,7 +243,7 @@


if (on) then
if (changed) and self.soundname then

Check warning on line 246 in lua/entities/gmod_wire_thruster.lua

View workflow job for this annotation

GitHub Actions / lint

"Unnecessary parentheses"

Unnecessary parentheses
self:StopSound( self.soundname )
self:EmitSound( self.soundname )
end
Expand Down
3 changes: 2 additions & 1 deletion lua/entities/gmod_wire_vectorthruster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
self:SetRenderBounds(mn + Vector(0,0,128), mx, 0)
end

function ENT:DrawTranslucent()
function ENT:DrawTranslucent(flags)
BaseClass.DrawTranslucent(self, flags)
if self.ShouldDraw == 0 or not self:IsOn() then return end

local EffectDraw = WireLib.ThrusterEffectDraw[self:GetEffect()]
Expand All @@ -71,7 +72,7 @@
function ENT:Think()
BaseClass.Think(self)

self.ShouldDraw = GetConVarNumber("cl_drawthrusterseffects")

Check warning on line 75 in lua/entities/gmod_wire_vectorthruster.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead

if self.ShouldDraw == 0 or not self:IsOn() then return end

Expand Down
Loading