code_gs
code_gs
You pack the table ({...}) twice instead of caching it, and you use pairs instead of ipairs.
Oh I got write perms to the repo and I didn't "approve" the changes, so it was still flagged as needing changes.
Conflicts resolved and added PLAYERANIMEVENT_CANCEL_RELOAD support, so the dev branch is the best place to test the PR (but it'll still work on live).
At least fulfilling the requests would make testing this PR properly possible.
animations.lua, specifically ``MouthMoveAnimation`` is still the biggest abuser of ``__index`` calls of any addon or gamemode I've profiled. It's being called more than 10,000 times a second in default code,...
@thegrb93 https://github.com/Facepunch/garrysmod/pull/1191 hasn't been merged either.
I do not see the convinence of the default args, especially with an already-present color_white const, and the constructor additions have been done more efficiently and cohesively here: https://github.com/Facepunch/garrysmod/pull/1312
The 4th already defaults to 255, the 1st thru 3rd should not be optional.
Vector() works as a single constructor because it's a C func which can handle multiple Lua types. Adding this same functionality to Color in Lua is going to significantly slow...
String indicies are slower after benchmarking. @neico That's not what magic numbers are, grb and meep's uses were just numerical structs in Lua. Magic numbers imply some mathematical/equational constant, not...