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
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_expression2/core/ranger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ end

__e2setcost(20) -- temporary

--- Equivalent to rangerOffset(16384, <this>:shootPos(), <this>:eye()), but faster (causing less lag)
--- Equivalent to rangerOffset(32768, <this>:shootPos(), <this>:eye()), but faster (causing less lag)
e2function ranger entity:eyeTrace()
if not IsValid(this) then return nil end
if not this:IsPlayer() then return nil end
Expand Down
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_gpu/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
self.VM.QuotaOverrunFunc = self.VM.SyncQuotaOverrun
self.VM.ASYNC = 0
end
local function getCode(self)

Check warning on line 177 in lua/entities/gmod_wire_gpu/cl_init.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: getCode
local mem = {}
for i=0,16 do
mem[i] = self.VM:ReadCell(i)
Expand Down Expand Up @@ -337,8 +337,8 @@
local ply = LocalPlayer()
local trace = ply:GetEyeTraceNoCursor()
if (trace.Entity and trace.Entity:IsValid() and trace.Entity == self) then
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*(-16384)
dist = math.max(dist, trace.Fraction*16384-self:BoundingRadius())
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*(-32768)
dist = math.max(dist, trace.Fraction*32768-self:BoundingRadius())

if (dist < 256) then
local pos = WorldToLocal( trace.HitPos, Angle(), pos, ang )
Expand Down
4 changes: 2 additions & 2 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 @@ -361,8 +361,8 @@
local trace = player:GetEyeTraceNoCursor()
local ent = trace.Entity
if ent:IsValid() then
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*(-16384)
dist = math.max(dist, trace.Fraction*16384-ent:BoundingRadius())
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*(-32768)
dist = math.max(dist, trace.Fraction*32768-ent:BoundingRadius())

if dist < 64 and ent == self then
if player:KeyDown(IN_ATTACK) or player:KeyDown(IN_USE) then
Expand All @@ -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 Down
8 changes: 4 additions & 4 deletions lua/entities/gmod_wire_graphics_tablet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

ENT.workingDistance = 64

local SCREEN_CURSOR = false -- (0, 0) is top left, (1, 1) is bottom right

Check warning on line 10 in lua/entities/gmod_wire_graphics_tablet.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: SCREEN_CURSOR
local GRAPH_CURSOR = true -- (0, 0) is center, (1, 1) is top right

function ENT:SetupDataTables()
Expand Down Expand Up @@ -37,7 +37,7 @@
function ENT:Draw(flags)
self:DrawModel(flags)

local draw_background = self:GetDrawBackground()

Check warning on line 40 in lua/entities/gmod_wire_graphics_tablet.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :GetPaintBackground instead
self.GPU:RenderToWorld(nil, 512, function(x, y, w, h, monitor, pos, ang, res)
if draw_background then
surface.SetDrawColor(0, 0, 0, 255)
Expand All @@ -48,8 +48,8 @@
local trace = ply:GetEyeTraceNoCursor()
local ent = trace.Entity
if ent:IsValid() then
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*-16384
dist = math.max(dist, trace.Fraction*16384-ent:BoundingRadius())
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*-32768
dist = math.max(dist, trace.Fraction*32768-ent:BoundingRadius())

if dist < self.workingDistance and ent == self.GPU.Entity then
local cpos = WorldToLocal(trace.HitPos, Angle(), pos, ang)
Expand Down Expand Up @@ -111,15 +111,15 @@
local pos = GPUEntity:LocalToWorld(monitor.offset)
local h = 1024
local w = h/monitor.RatioX
local x = -w/2

Check warning on line 114 in lua/entities/gmod_wire_graphics_tablet.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: x
local y = -h/2

Check warning on line 115 in lua/entities/gmod_wire_graphics_tablet.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: y

for _,ply in player.Iterator() do
local trace = ply:GetEyeTraceNoCursor()
local ent = trace.Entity
if ent:IsValid() then
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*-16384
dist = math.max(dist, trace.Fraction*16384-ent:BoundingRadius())
local dist = trace.Normal:Dot(trace.HitNormal)*trace.Fraction*-32768
dist = math.max(dist, trace.Fraction*32768-ent:BoundingRadius())

if dist < 64 and ent == GPUEntity then
if ply:KeyDown(IN_ATTACK) or ply:KeyDown(IN_USE) then
Expand Down Expand Up @@ -176,7 +176,7 @@
-- only needed for legacy dupes
function ENT:Setup(gmode, draw_background)
if gmode ~= nil then self:SetCursorMode(gmode) end
if draw_background ~= nil then self:SetDrawBackground(draw_background) end

Check warning on line 179 in lua/entities/gmod_wire_graphics_tablet.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :SetPaintBackground instead
end

duplicator.RegisterEntityClass("gmod_wire_graphics_tablet", WireLib.MakeWireEnt, "Data", "gmode", "draw_background")
2 changes: 1 addition & 1 deletion lua/weapons/laserpointer/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function SWEP:DrawWorldModel(flags)
if IsValid(owner) then
endpos = owner:GetEyeTrace().HitPos
else
local tr = util.TraceLine({ start = startpos, endpos = startpos + att.Ang:Forward() * 16384, filter = self })
local tr = util.TraceLine({ start = startpos, endpos = startpos + att.Ang:Forward() * 32768, filter = self })
endpos = tr.HitPos
end

Expand Down
2 changes: 1 addition & 1 deletion lua/weapons/laserpointer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function SWEP:Think()
trace = owner:GetEyeTrace()
else
local att = self:GetAttachment(self:LookupAttachment("muzzle"))
trace = util.TraceLine({ start = att.Pos, endpos = att.Pos + att.Ang:Forward() * 16384, filter = self })
trace = util.TraceLine({ start = att.Pos, endpos = att.Pos + att.Ang:Forward() * 32768, filter = self })
end

local point = trace.HitPos
Expand Down
2 changes: 1 addition & 1 deletion lua/wire/client/e2descriptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ E2Helper.Descriptions["pos(e:)"] = "Gets the position of the entity"
E2Helper.Descriptions["eye(e:)"] = "Gets a player's view direction or an entity's forward direction"
E2Helper.Descriptions["eyeAngles(e:)"] = "Gets a player's view direction"
E2Helper.Descriptions["eyeAnglesVehicle(e:)"] = "Gets a player's view direction, relative to any vehicle they sit in. This function is needed to reproduce the behavior of cam controller. This is different from Vehicle:toLocal(Ply:eyeAngles())."
E2Helper.Descriptions["eyeTrace(e:)"] = "Performs a quick trace from the player's eye. Equivalent to rangerOffset(16384, E:shootPos(), E:eye()), but faster. Does not respect filters or ranger flags"
E2Helper.Descriptions["eyeTrace(e:)"] = "Performs a quick trace from the player's eye. Equivalent to rangerOffset(32768, E:shootPos(), E:eye()), but faster. Does not respect filters or ranger flags"
E2Helper.Descriptions["eyeTraceCursor(e:)"] = "Same as eyeTrace, except it also works when the player (for example) is holding down C"
E2Helper.Descriptions["shootPos(e:)"] = "Returns a players shoot position"
E2Helper.Descriptions["aimEntity(e:)"] = "Returns the entity that the entity is aiming at"
Expand Down
2 changes: 1 addition & 1 deletion lua/wire/stools/hydraulic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function TOOL:RightClick( trace )

local tr = {}
tr.start = trace.HitPos
tr.endpos = tr.start + (trace.HitNormal * 16384)
tr.endpos = tr.start + (trace.HitNormal * 32768)
tr.filter = {self:GetOwner()}
if IsValid(trace.Entity) then
tr.filter[2] = trace.Entity
Expand Down
Loading