From b730aeae9a2f20c3364bf10a1afb760e10f47753 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Mon, 11 Apr 2011 14:07:41 +0300 Subject: [PATCH] Create two stats for the hagar loading feature. Will be used for the crosshair inner ring, to show how many rockets have been loaded. --- qcsrc/common/constants.qh | 2 ++ qcsrc/server/cl_client.qc | 2 ++ qcsrc/server/defs.qh | 3 +++ qcsrc/server/g_world.qc | 3 +++ 4 files changed, 10 insertions(+) diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 419ab73e8..22fa7c262 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -317,6 +317,8 @@ const float STAT_NEX_CHARGEPOOL = 53; const float STAT_HIT_TIME = 54; const float STAT_TYPEHIT_TIME = 55; const float STAT_LAYED_MINES = 56; +const float STAT_HAGAR_LOAD = 57; +const float STAT_HAGAR_MAXLOAD = 58; // see DP source, quakedef.h const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index a1047ea9d..48c2d43e7 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2369,6 +2369,8 @@ void SpectateCopy(entity spectatee) { self.weapon = spectatee.weapon; self.nex_charge = spectatee.nex_charge; self.nex_chargepool_ammo = spectatee.nex_chargepool_ammo; + self.hagar_load = spectatee.hagar_load; + self.hagar_maxload = spectatee.hagar_maxload; self.minelayer_mines = spectatee.minelayer_mines; self.punchangle = spectatee.punchangle; self.view_ofs = spectatee.view_ofs; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index d7179fafe..27b908a58 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -658,6 +658,9 @@ string deathmessage; .float nex_charge_rottime; .float nex_chargepool_ammo; +.float hagar_load; +.float hagar_maxload; + float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended) float serverflags; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index c45ad96e2..c83ddd821 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -833,6 +833,9 @@ void spawnfunc_worldspawn (void) addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge); addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo); + addstat(STAT_HAGAR_LOAD, AS_FLOAT, hagar_load); + addstat(STAT_HAGAR_MAXLOAD, AS_FLOAT, hagar_maxload); + if(g_ca || g_freezetag) { addstat(STAT_REDALIVE, AS_INT, redalive_stat); -- 2.39.2