Thread: [Solved] Optimized Plugin?
View Single Post
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 06-13-2018 , 20:02   Re: Optimized Plugin?
Reply With Quote #8

Quote:
Originally Posted by Crasher_3637 View Post
Yeah you really don't need to assign all the convar changes to booleans, cells, etc.

This:
PHP Code:
bool g_bEnabled;
ConVar g_cvEnabled[5];
g_bEnabled g_cvEnabled[0].BoolValue;
...
if (
g_bEnabled
Can be simplified to:
PHP Code:
ConVar g_cvEnabled[5];
...
if (
g_cvEnabled[0].BoolValue
As said on psychonic's post that ddhoward linked, convar values are already cached internally and do not need to be recached when their values are changed.
Thanks!
ThatKidWhoGames is offline