X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qc;h=f118a04667f39c181eb0dee13eede8cc59d42973;hb=a692581c23cc689f1f695dd04b6b2a2b27a567f0;hp=898889149a0ef1fccceb6613e468ae42c92f7107;hpb=5aedfa18d17168daaf01162c2c4c6798be6d59d5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 898889149..f118a0466 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -194,9 +194,8 @@ string W_FixWeaponOrder_ForceComplete(string order) return W_FixWeaponOrder(order, 1); } -void W_RandomWeapons(entity e, int n) +WepSet W_RandomWeapons(entity e, WepSet remaining, int n) { - WepSet remaining = e.weapons; WepSet result = '0 0 0'; for (int j = 0; j < n; ++j) { @@ -209,7 +208,7 @@ void W_RandomWeapons(entity e, int n) result |= WepSet_FromWeapon(w); remaining &= ~WepSet_FromWeapon(w); } - e.weapons = result; + return result; } string GetAmmoPicture(int ammotype)