Closed wrefgtzweve closed 9 months ago
This again falls under mods allowing users to do this. The default material tool does not allow to do this.
Should be fixed on Dev beta, and in the future updates.
If you are interested in what the fix is: https://github.com/Facepunch/garrysmod/commit/a423d32b892dec58a05da0d8793832846931e560
@robotboy655 It still happens for translucent entities. The lower the alpha, the stronger the effect.
local ent = LocalPlayer():GetEyeTrace().Entity
if ent and ent:IsValid() then
ent:SetRenderMode(RENDERMODE_TRANSCOLOR)
ent:SetColor(Color(0, 0, 0, 1))
ent:SetMaterial("pp/copy")
end
Linux on the 64-bit branch.
Should be fixed on dev
, same fix as last time, just also sets $alpha
to 1
.
Details
Using ENT:SetMaterial or ENT:SetSubMaterial to set any material that starts with "pp/" will turn players screens to the color of the entity, Example: ENT:SetMaterial "pp/copy" on a prop with a black color, whenever a halo is drawn player screens will turn black. This only fixes itself until the player rejoins or a new pp material has been set with the color white. This bug is exploited by people, some addons allow for custom material input and allow players to turn everyones screen on the server black. There's a fix made by https://github.com/brandonsturgeon, https://github.com/CFC-Servers/cfc_restrict_materials. It would be great to see a fix like this in the game itself to prevent people from abusing this.
Steps to reproduce