]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Stats: register ALLOW_OLDVORTEXBEAM
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 7 Nov 2015 04:43:18 +0000 (15:43 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 7 Nov 2015 04:43:18 +0000 (15:43 +1100)
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc

index 31a7ab61885e191355418514070bd06d36158278..1a9a38fc532da6fb8670269c3585e5b9260a0547 100644 (file)
@@ -89,7 +89,7 @@ enum {
     STAT_LAST_VECTOR
 };
 
-const int REGISTERED_STATS = 7;
+const int REGISTERED_STATS = 8;
 
 REGISTER_STAT(KH_KEYS, int)
 /** weapon requested to switch to; next WANTED weapon (for HUD) */
@@ -100,11 +100,12 @@ REGISTER_STAT(INVINCIBLE_FINISHED, float)
 /** arc heat in [0,1] */
 REGISTER_STAT(ARC_HEAT, float)
 REGISTER_STAT(PRESSED_KEYS, int)
+/** this stat could later contain some other bits of info, like, more server-side particle config */
+REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool)
 
 enum {
     STAT_FIRST_MAIN = (STAT_LAST_VECTOR - 1) + REGISTERED_STATS,
 
-    /** this stat could later contain some other bits of info, like, more server-side particle config */ STAT_ALLOW_OLDVORTEXBEAM,
     STAT_FUEL,
     STAT_NB_METERSTART,
     /** compressShotOrigin */ STAT_SHOTORG,
index bae7cca3de0ccb6fbd30086152c9c0f3cb31bedc..072bc1cbee3356264fbde69cc1a2cecc2191e6aa 100644 (file)
@@ -91,7 +91,7 @@ NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
        charge = sqrt(charge); // divide evenly among trail spacing and alpha
        particles_alphamin = particles_alphamax = particles_fade = charge;
 
-       if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
+       if (autocvar_cl_particles_oldvortexbeam && (STAT(ALLOW_OLDVORTEXBEAM) || isdemo()))
                WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
        else
                WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
index afdca0b06cbc685a9a4f14d180599514c9b6982f..90cb409a888976cb7f5e0e9a3cd0b1d85a980308 100644 (file)
@@ -406,7 +406,7 @@ void W_Porto_Remove (entity p);
 
 .string message2;
 
-.float stat_allow_oldvortexbeam;
+.bool stat_allow_oldvortexbeam = _STAT(ALLOW_OLDVORTEXBEAM);
 
 // reset to 0 on weapon switch
 // may be useful to all weapons
index b60eb9c8217a171b51d49553f6229ba1a5e97ea3..eeb6801de1897eb8166e237eb5c4269d82564944 100644 (file)
@@ -759,7 +759,6 @@ spawnfunc(worldspawn)
        WepSet_AddStat_InMap();
        addstat(STAT_SWITCHINGWEAPON, AS_INT, switchingweapon);
        addstat(STAT_ROUNDSTARTTIME, AS_FLOAT, stat_round_starttime);
-       addstat(STAT_ALLOW_OLDVORTEXBEAM, AS_INT, stat_allow_oldvortexbeam);
        Nagger_Init();
 
        addstat(STAT_SUPERWEAPONS_FINISHED, AS_FLOAT, superweapons_finished);