TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
179 stars 77 forks source link

Rework the outline library and fix the outstanding issues with it #1628

Open WardenPotato opened 2 months ago

WardenPotato commented 2 months ago

Its finally here, the rework of the outline library which started because of https://github.com/TTT-2/TTT2/issues/1411 Ive spent quite some time on this trying over 50 different approaches, running into various setbacks each time. Some of them got solved: https://github.com/Facepunch/garrysmod-issues/issues/5744 And some didnt: https://github.com/Facepunch/garrysmod-requests/issues/2308

But this is what i consider the best thats possible in gmod today in respect to functionality and performance.

This rework includes(i may have forgotten some, its been a while):

The comments in the code explain a lot so i hope those answer most questions.

TimGoll commented 1 month ago

Okay, I tried tackling some of the warnings here and there is one thing I'd like you to change: List, Lists, ListSize, ListsSize are way too similar and I have no clue what they are about. Maybe make the name a bit more descriptive. I don't know what the performance inpact would be, but it would also make sense to put it into the outline scope imho.

Once you get that done and the workflow errors are fixed, I can merge this PR

WardenPotato commented 1 month ago

Performance impact should be zero because in the worst case i can localise the global anyways, ill get to changing the names then