X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qc;h=214f0d2c5c88e9c13d3737d3b2200fc6fd28c24a;hb=229104225e03b92717b3b2760e6b6d2c5a2cddfe;hp=6315808e06ad45b47d845fc673b0db7cb6e8c08e;hpb=231b40d1f5019f6011f1fd42a042b9a13b914459;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 6315808e0..214f0d2c5 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -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() {