]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Create two stats for the hagar loading feature. Will be used for the crosshair inner...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Apr 2011 11:07:41 +0000 (14:07 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Apr 2011 11:07:41 +0000 (14:07 +0300)
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc

index 419ab73e8fa1b8e14d21f44afca79f7775e0936b..22fa7c26297673be98c67aa1fef9aa384a718277 100644 (file)
@@ -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;
index a1047ea9d07595dae83fcb3fd49953b5b24062c7..48c2d43e77962474ade43527b8e720eddfb5343f 100644 (file)
@@ -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;
index d7179fafebb703f9c8b2d38ebd426d25cb2a3014..27b908a586fe78d20dc5fcf8a3254f7a7d949662 100644 (file)
@@ -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;
index c45ad96e298d3a379dbd5b7c6bf4ec0a2253435b..c83ddd82112984904d8312fa1ed6b691234be77c 100644 (file)
@@ -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);