]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qc
Stats: port vectors
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qc
index 6315808e06ad45b47d845fc673b0db7cb6e8c08e..214f0d2c5c88e9c13d3737d3b2200fc6fd28c24a 100644 (file)
@@ -70,22 +70,6 @@ WepSet WepSet_FromWeapon(int a) {
        return '1 0 0' * power2of(a);
 }
 #ifdef SVQC
-void WepSet_AddStat()
-{
-       addstat(STAT_WEAPONS, AS_INT, weapons_x);
-       if (Weapons_MAX > 24)
-       addstat(STAT_WEAPONS2, AS_INT, weapons_y);
-       if (Weapons_MAX > 48)
-       addstat(STAT_WEAPONS3, AS_INT, weapons_z);
-}
-void WepSet_AddStat_InMap()
-{
-       addstat(STAT_WEAPONSINMAP, AS_INT, weaponsinmap_x);
-       if (Weapons_MAX > 24)
-       addstat(STAT_WEAPONSINMAP2, AS_INT, weaponsinmap_y);
-       if (Weapons_MAX > 48)
-       addstat(STAT_WEAPONSINMAP3, AS_INT, weaponsinmap_z);
-}
 void WriteWepSet(float dst, WepSet w)
 {
        if (Weapons_MAX > 48)
@@ -99,23 +83,11 @@ void WriteWepSet(float dst, WepSet w)
 #ifdef CSQC
 WepSet WepSet_GetFromStat()
 {
-       WepSet w = '0 0 0';
-       w.x = getstati(STAT_WEAPONS);
-       if (Weapons_MAX > 24)
-       w.y = getstati(STAT_WEAPONS2);
-       if (Weapons_MAX > 48)
-       w.z = getstati(STAT_WEAPONS3);
-       return w;
+       return STAT(WEAPONS);
 }
 WepSet WepSet_GetFromStat_InMap()
 {
-       WepSet w = '0 0 0';
-       w_x = getstati(STAT_WEAPONSINMAP);
-       if (Weapons_MAX > 24)
-       w_y = getstati(STAT_WEAPONSINMAP2);
-       if (Weapons_MAX > 48)
-       w_z = getstati(STAT_WEAPONSINMAP3);
-       return w;
+       return STAT(WEAPONSINMAP);
 }
 WepSet ReadWepSet()
 {