]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qc
Merge branch 'master' into terencehill/menu_listbox_changes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qc
index 36f08eff9017bd322cea18f6fc36f8590c714a81..72c92471a9c537435aaeb29ed20072303c7700a3 100644 (file)
@@ -91,6 +91,16 @@ void WepSet_AddStat()
 #endif
 #endif
 }
+void WepSet_AddStat_InMap()
+{
+       addstat(STAT_WEAPONSINMAP, AS_INT, weaponsinmap_x);
+#if WEP_MAXCOUNT > 24
+       addstat(STAT_WEAPONSINMAP2, AS_INT, weaponsinmap_y);
+#if WEP_MAXCOUNT > 48
+       addstat(STAT_WEAPONSINMAP3, AS_INT, weaponsinmap_z);
+#endif
+#endif
+}
 void WriteWepSet(float dst, WepSet w)
 {
 #if WEP_MAXCOUNT > 48
@@ -115,6 +125,18 @@ WepSet WepSet_GetFromStat()
 #endif
        return w;
 }
+WepSet WepSet_GetFromStat_InMap()
+{
+       WepSet w = '0 0 0';
+       w_x = getstati(STAT_WEAPONSINMAP);
+#if WEP_MAXCOUNT > 24
+       w_y = getstati(STAT_WEAPONSINMAP2);
+#if WEP_MAXCOUNT > 48
+       w_z = getstati(STAT_WEAPONSINMAP3);
+#endif
+#endif
+       return w;
+}
 WepSet ReadWepSet()
 {
 #if WEP_MAXCOUNT > 48