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
7 changes: 3 additions & 4 deletions lua/entities/gmod_wire_gpu/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end

function ENT:UpdateClientMonitorState()
umsg.Start("wire_gpu_monitorstate")

Check warning on line 39 in lua/entities/gmod_wire_gpu/init.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use net messages.
umsg.Long(self:EntIndex())
umsg.Short(#self.Monitors)
for idx=1,#self.Monitors do
Expand Down Expand Up @@ -65,7 +65,7 @@
function()
if not self:IsValid() then return end

umsg.Start("wire_gpu_memorymodel")

Check warning on line 68 in lua/entities/gmod_wire_gpu/init.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use net messages.
umsg.Long(self:EntIndex())
umsg.Long (self.RAMSize)
umsg.Float(self.SerialNo)
Expand All @@ -81,7 +81,7 @@
function()
if not self:IsValid() then return end

umsg.Start("wire_gpu_extensions")

Check warning on line 84 in lua/entities/gmod_wire_gpu/init.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use net messages.
umsg.Long(self:EntIndex())
umsg.String(self.ZVMExtensions)
umsg.End()
Expand Down Expand Up @@ -370,7 +370,7 @@
end
local cpos = WorldToLocal(trace.HitPos, Angle(), pos, ang)
local cx = 0.5+cpos.x/(monitor.RS*(512/monitor.RatioX))
local cy = 0.5-cpos.y/(monitor.RS*(512))

Check warning on line 373 in lua/entities/gmod_wire_gpu/init.lua

View workflow job for this annotation

GitHub Actions / lint

"Unnecessary parentheses"

Unnecessary parentheses

self.Memory[65505] = cx
self.Memory[65504] = cy
Expand All @@ -388,12 +388,11 @@
--------------------------------------------------------------------------------
concommand.Add("wgm", function(player, command, args)
-- Find the referenced GPU
local GPU = ents.GetByIndex(args[1])
if not GPU then return end
if not GPU:IsValid() then return end
local GPU = Entity(args[1])
if not GPU:IsValid() or GPU:GetClass() ~= "gmod_wire_gpu" then return end

-- Must be a valid GPU, and belong to the caller
-- if GPU.player ~= player then return end
if GPU:GetPlayer() ~= player then return end

-- Write on membus
local Address = tonumber(args[2]) or 0
Expand Down
Loading