int stat_items;
stat_items = getstati(STAT_ITEMS, 0, 24);
- nb_pb_starttime = getstatf(STAT_NB_METERSTART);
+ nb_pb_starttime = STAT(NB_METERSTART);
if (stat_items & IT_KEY1)
mod_active = 1;
#ifdef IMPLEMENTATION
#ifdef SVQC
-.float metertime;
+.float metertime = _STAT(NB_METERSTART);
int autocvar_g_nexball_goalleadlimit;
#define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
if(g_nexball_meter_period <= 0)
g_nexball_meter_period = 2; // avoid division by zero etc. due to silly users
g_nexball_meter_period = rint(g_nexball_meter_period * 32) / 32; //Round to 1/32ths to send as a byte multiplied by 32
- addstat(STAT_NB_METERSTART, AS_FLOAT, metertime);
// General settings
/*
STAT_LAST_VECTOR
};
-const int REGISTERED_STATS = 9;
+const int REGISTERED_STATS = 10;
REGISTER_STAT(KH_KEYS, int)
/** weapon requested to switch to; next WANTED weapon (for HUD) */
/** this stat could later contain some other bits of info, like, more server-side particle config */
REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool)
REGISTER_STAT(FUEL, int)
+REGISTER_STAT(NB_METERSTART, float)
enum {
STAT_FIRST_MAIN = (STAT_LAST_VECTOR - 1) + REGISTERED_STATS,
- STAT_NB_METERSTART,
/** compressShotOrigin */ STAT_SHOTORG,
STAT_LEADLIMIT,
STAT_WEAPON_CLIPLOAD,