View Single Post
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-30-2024 , 14:56   Re: [L4D2] Unlimited Chainsaw
Reply With Quote #5

char classname[32];

could be

char classname[16];

since the classname itself is 15 chars long, no need for excessive bytes being nulled

and to optimize further make it "static char".

@BloodyBlade: checking if (event.GetInt("weaponid") == 20) { would optimize it further, just because it's shorter code doesn't make it more efficient.

weapon_fire event is triggered constantly when holding down the fire button, so should be optimized as best as possible to prevent unnecessary checks.
__________________
Silvers is offline