engine: client: minor refactoring, turn quake stats into an enum

This commit is contained in:
Alibek Omarov 2024-08-04 02:23:05 +03:00
parent 2a6862ceb9
commit 92dc92379f
1 changed files with 18 additions and 16 deletions

View File

@ -22,22 +22,24 @@ GNU General Public License for more details.
#include "hltv.h"
#include "input.h"
#define STAT_HEALTH 0
#define STAT_FRAGS 1
#define STAT_WEAPON 2
#define STAT_AMMO 3
#define STAT_ARMOR 4
#define STAT_WEAPONFRAME 5
#define STAT_SHELLS 6
#define STAT_NAILS 7
#define STAT_ROCKETS 8
#define STAT_CELLS 9
#define STAT_ACTIVEWEAPON 10
#define STAT_TOTALSECRETS 11
#define STAT_TOTALMONSTERS 12
#define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
#define STAT_MONSTERS 14 // bumped by svc_killedmonster
#define MAX_STATS 32
enum {
STAT_HEALTH = 0,
STAT_FRAGS,
STAT_WEAPON,
STAT_AMMO,
STAT_ARMOR,
STAT_WEAPONFRAME,
STAT_SHELLS,
STAT_NAILS,
STAT_ROCKETS,
STAT_CELLS,
STAT_ACTIVEWEAPON,
STAT_TOTALSECRETS,
STAT_TOTALMONSTERS,
STAT_SECRETS, // bumped on client side by svc_foundsecret
STAT_MONSTERS, // bumped by svc_killedmonster
MAX_STATS = 32,
};
static char cmd_buf[8192];
static char msg_buf[8192];