View Single Post
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-14-2015 , 21:37   Re: [CS:GO] Random Team Icons 1.0
Reply With Quote #2

You should use PLATFORM_MAX_PATH rather than picking arbitrary sizes for path buffers.
filename[strlen(filename) - 3] = '\0' is a slightly quicker hack than copying to a new buffer.
While it doesn't really matter, might want to cache the mp_teamlogo_* handles in OnPluginStart().
Not hardcoding the default logos would be better (SM's filesystem functions can read inside the VPK).
__________________
asherkin is offline