Garry's Mod

Garry's Mod

Shrinkinator - Player Resizer
Code Smell / Lag
Hey there. First, I'd like to say that this is a wonderful mod and you've created something very cool!

Next, I'd like to move forward with the reason for my thread and it's because of a code smell that I've identified in the mod.

Specifically, in the "shrinkinator_PlayerUpdateSize" PlayerTick hook, under "Crush Tiny People/NPCs", there is a usage of table.HasValue which can be laggy, in addition to the usage of ents.FindInSphere, which is another expensive function. Running these functions on every PlayerTick can cause lag.

I hope you'll find this information useful to update this mod! Thank You!