Pac exploit breaks maps

http://pastebin.com/raw.php?i=Gkhe0BYF

[img_thumb]http://i.imgur.com/6CwdBWl.jpg[/img_thumb]

Metastruct devs insulted and shunned me when I tried to give them a fix for this so here. Feel free to add more parts to destroy more parts of the map.
I’d also like to point out that a few days ago they had an exploit that allowed people to set the collision group of anything to anything they wanted.

I’d be really careful about using pac on your server. They are really nooby coders and they clearly stated they won’t fix this.

Once I cool down a bit I may release the fix publicly.

So it breaks displacements and random brushwork, the exploit I mean?

It is screwing up the map’s materials. It’s very easy to prevent but they still haven’t made an effort to do so because they think the GarrysMod devs should fix it.

Seems like its the old exploit of coloring world materials, but instead of coloring, bring the alpha down to 0.01 ? I don’t think this was ever really fixed, just the material tool now uses a whitelist so you normally can’t do it. Would be interesting to see OPs fix.

EDIT: Late, I should refresh before posting.

You just block the LightMapped shaders, the world geometry doesn’t ever reset the color values in the shader so any color values left over from pac get sent to the world rendering…
My server uses this and it works perfectly.

[lua]
local shader_whitelist =
{
UnlitGeneric = true,
VertexLitGeneric = true
}

function pac.Material(str, part)
if str ~= “” then
for key, part in pairs(pac.GetParts()) do
if part.GetRawMaterial and str == part.Name then
return part:GetRawMaterial()
end
end
end

local material = Material(str)

if shader_whitelist[material:GetShader()] then
	return material
end

return Material("")

end
[/lua]

I’m pretty sure wiremod/expression2 will suffer the same exploit, the only blacklisted material there is pp/copy

Yeah I didn’t think about expression2 setMaterial.

I think all global materials are blacklisted in E2, as far as I know.

Well, at least you can see some of the map unlike the tesla gun exploit in Metastruct.

Just disable allowcslua and you’ll be fine.

Context: https://github.com/Metastruct/pac3/pull/19#issuecomment-90370581

https://dl.dropboxusercontent.com/u/7290193/Screenshots/Garrysmod/PAC/Drama/0/1.png

  1. Only Noiwex insulted you. You were shunned when you responded with more insults.

  2. Noiwex and Suchipi do not represent the entire team of Metastruct developers. They only represent themselves.

  3. Noiwex is a cunt and an all around asshole. The only reason he is still on the team is because the rest of the devs are either apathetic or want to get in his pants.
    Flood Python1320’s inbox with messages to get him to actually do something about it for once. http://facepunch.com/members/97162-Python1320

Then the fix is to reset the colors and alpha to what they were, and not to block shaders like you’re doing.

  1. Devs are reluctant to touch PAC code because any time PAC outfits break, pac users hunt down and harass anyone on the Metastruct dev team who they think can code more than two lines of Lua.

  2. Devs are reluctant to touch PAC code because the PAC codebase is a total clusterfuck of bad code and spaghetti logic.
    Eg. the editor lags hard when you close and reopen it because it gets completely destroyed and recreated each time
    AND it parses all outfits in your pac folder recursively each time it gets created.

  3. The PAC editor is unusable to me and not only for the reason above.
    If you have a bug you want fixed, posting an outfit that reproduces the issue will increase the chances of it getting looked at.
    Thanks for actually posting an outfit that reproduces the issue here, unlike in your Github issue.

TL;DR
To fix the issue: Metastruct/pac3, active branch https://github.com/Metastruct/pac3/commit/36cabd61483b399b37a74bc5ff98cc7009357aa0
**To get rid of developers that shouldn’t be on the Metastruct dev team: ** Send your messages here http://facepunch.com/members/97162-Python1320

No, they do not represent the entire team of Metastruct developers, but the fact they are on it gives an impression of the team. The fact Suchipi defended Noiwex makes him just as bad. I don’t care about metastruct so don’t expect me to go crying to the leader, but I do care about the general garrysmod public, which is why I created the issue here instead of there. And as a result, the issue became huge and thanks to you, there is finally a fix. I doubt it covers all cases though. I’ll do some testing on it and see if it can still be broken.

[editline]9th April 2015[/editline]

LightMappedGeneric don’t render correctly on models anyway so I don’t see why you fixed it this way. You should check and if the material is LightMappedGeneric then create a new material that is VertexLitGeneric and uses the same textures.

Oh, so that’s why I freeze for 2 minutes every time I open the editor

[sp]Though, the 942 files I have in my sessions folder probably isn’t helping[/sp]

It really doesn’t look like it, unless they’ve overridden ENTITY:SetMaterial somewhere else. https://github.com/wiremod/wire/blob/d4d5135ca25d354ea69477e9f1187638e679268b/lua/entities/gmod_wire_expression2/core/entity.lua#L377

I assume it has been fixed, as this was an exploit that was kicking around about three years ago. I’m surprised that PAC fell into the same hole.

Yeah wiremod doesn’t have this issue. There’s still an exploit using e2 that lets people make everything invisible though which I don’t know the cause of. Emitters seem to do this too sometimes.

[editline]9th April 2015[/editline]

Seems to be some sort of a rendering bug, but it breaks everything except the world…

ACF can have that effect too if you fire like 15 203mm howitzers with HE dud rounds (rounds filled with a fuck ton of explosive that fly at 80 m/s or less)

Yeah smoke particles do it then.

Particle spam overflows something, every time it does that, this gets printed to console:

(number at the end may vary)

It can happen in any Source game as I’ve found out.
I don’t even know what a CUtlLinkedList is

CUtlLinkedList is (as name suggests) a linked list. As far as I know Source stores what to render in a couple of them (models, particles etc). If you spam too much crap like particles it’ll exhaust limited capacity of one of these render lists and you’ll get this error.

By the looks of the particle emitter source, it normally closes the game with an error message, but I guess Team Garry changed that. But now it is broken and screws up entity rendering.