View Single Post
eat1k
Senior Member
Join Date: Apr 2018
Old 03-12-2019 , 16:38   Re: Time info v1.1 [HUD+Narrator]
Reply With Quote #12

Quote:
Originally Posted by thEsp View Post
I feel better with booleans like that, I meant to use iLag as a shortening to isLagging (Since I find this the only reason to hide hud text ). ResetHUD and get_cvar_num are easier to understand, I'll look forward for any bugs in this case. But dont know why should I use 33 instead of 32 boolean(s)?
So I think it's better to rename it to isLag or g_isLag. As someone said "Opinions don't make code better". So think about it. get_cvar_num is nothing optimized when you can use get_pcvar_num. ResetHUD the same. Regarding the 33, because the maximum number of players is 32 (the constant MAX_PLAYERS, I recommend you to use constants and not magic numbers so MAX_PLAYER+1). The last cell has to be 32 (32 player).
__________________

Last edited by eat1k; 03-12-2019 at 16:39.
eat1k is offline