Skip to content
Merged
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
5 changes: 4 additions & 1 deletion lua/weapons/gmod_tool/stools/wire_adv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,9 @@ elseif CLIENT then
end

local _, outputs = self:GetPorts( self.CurrentEntity )
if isTableEmpty(outputs) then
self.CurrentWireIndex = math.Clamp( self.CurrentWireIndex, 1, #outputs )
end

if alt then -- Auto wiring
local notwired = 0
Expand Down Expand Up @@ -859,7 +862,7 @@ elseif CLIENT then
-- Clamp index
local inputs, outputs = self:GetPorts( ent )
local check = self:GetStage() == 0 and inputs or outputs
if check then
if check and #check > 0 then
self.CurrentWireIndex = math.Clamp( self.CurrentWireIndex, 1, #check )

-- Set blinking wire
Expand Down
Loading