View Single Post
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-13-2013 , 10:10   Re: [TF2] Building Size Randomizer
Reply With Quote #23

The code in here is quite inefficient.

OnConfigsExecuted is called a huge number of times, reading every cvar each time, completely negating the benefit from caching the values.

The building type checks are ALL run every time with no early exit, and the code could be cleaned up by only having one call to SetEntProp at the end.
__________________
asherkin is offline