Skip to content

Commit

Permalink
perf (ToolGun): reduce useless network usage
Browse files Browse the repository at this point in the history
A "Color" value was set on `ToolGun` instances and broadcasted to everyone while it wasn't used anywhere
  • Loading branch information
Timmy-the-nobody authored and gtnardy committed Aug 4, 2023
1 parent ff0c759 commit 0fde95f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Server/Tools/BaseToolGun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function ToolGun:Constructor(location, rotation, color)
self:SetCrosshairMaterial("nanos-world::MI_Crosshair_Dot")
self:SetUsageSettings(false, false)

self:SetValue("Color", color, true)
self:SetMaterialColorParameter("Emissive", color * 100)
end

Expand All @@ -40,4 +39,4 @@ function ToolGun:OnDrop(character)
end

ToolGun.Subscribe("PickUp", ToolGun.OnPickUp)
ToolGun.Subscribe("Drop", ToolGun.OnDrop)
ToolGun.Subscribe("Drop", ToolGun.OnDrop)

0 comments on commit 0fde95f

Please sign in to comment.