]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
You know how in some games the crosshair grows and shrinks back when you pickup an...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 30 Oct 2010 13:47:08 +0000 (16:47 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 30 Oct 2010 13:47:08 +0000 (16:47 +0300)
qcsrc/common/constants.qh
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/t_items.qc

index b4b92ff8bd2e72cc41cc07b01bf8a339eb9e1006..4f60c427b657cbc336cb436eecebe24c0fc79566 100644 (file)
@@ -310,7 +310,8 @@ const float STAT_SHOTORG = 46; // compressShotOrigin
 const float STAT_LEADLIMIT = 47;
 const float STAT_BULLETS_LOADED = 48;
 const float STAT_NEX_CHARGE = 49;
-const float STAT_HUD = 50;
+const float    STAT_PICKUP_CROSSHAIR = 50;
+const float STAT_HUD = 51;
 
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
index 5be04141dfce6b62dfc424369323fb7803bd8448..93f1d7bd4941859a8c59567835b865440fe80288 100644 (file)
@@ -603,6 +603,8 @@ string matchid;
 .float stats_hit[WEP_MAXCOUNT];  // for hitscan bullets hit
 .float stats_fired[WEP_MAXCOUNT];  // for hitscan bullets fired
 
+.float stat_pickup_crosshair;
+
 FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_hit);
 FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_fired);
 
index 73ae5605f0c713955d4e5e2760b12f20d41c5507..1226c0d2ee12c77e767e7d6549a61689801bce26 100644 (file)
@@ -641,6 +641,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
+       addstat(STAT_PICKUP_CROSSHAIR, AS_INT, stat_pickup_crosshair);
 
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
 
index ba0cb8bb3e00c9873fcad5ada9cede5d344a61d8..65e9a504485e45f5054b969bb2347f45496073c2 100644 (file)
@@ -489,6 +489,8 @@ void Item_Touch (void)
        if(!Item_GiveTo(self, other))
                return;
 
+       self.stat_pickup_crosshair = time;
+
        pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);
 
        if (self.classname == "droppedweapon")