X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qc;h=72c92471a9c537435aaeb29ed20072303c7700a3;hb=a16bfaa11ae87fe6fdab9e6c4504e2c5528ea595;hp=847c8371d6d920956d67b93e00c59dd28be5286b;hpb=cf4d36d9d295ce940e9e9bdf7a711e4036de0b3c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 847c8371d..72c92471a 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -17,7 +17,7 @@ #include "../../client/autocvars.qh" #include "../deathtypes.qh" #include "../../csqcmodellib/interpolate.qh" - #include "../../client/movetypes.qh" + #include "../movetypes/movetypes.qh" #include "../../client/main.qh" #include "../../csqcmodellib/cl_model.qh" #elif defined(MENUQC) @@ -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