X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qc;h=e1efeb02e933c4559f5455d8e1691fd1a42f7ecc;hb=5ad35ed58c9eb8f52afd13db42f712d308d807df;hp=7ef3cc1e8d7a5ee18ff37591f899d635d8e0ee6d;hpb=5dc828e3b59c65f75c870d4a57e34c023cdbdb86;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 7ef3cc1e8..e1efeb02e 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -202,7 +202,8 @@ WepSet W_RandomWeapons(entity e, WepSet remaining, int n) return result; } -string GetAmmoPicture(int ammotype) +// TODO: registry handles for below functions +string GetAmmoPicture(Resource ammotype) { switch (ammotype) { @@ -216,7 +217,7 @@ string GetAmmoPicture(int ammotype) } } -string GetAmmoName(int ammotype) +string GetAmmoName(Resource ammotype) { switch (ammotype) { @@ -230,7 +231,7 @@ string GetAmmoName(int ammotype) } } -entity GetAmmoItem(int ammotype) +entity GetAmmoItem(Resource ammotype) { switch (ammotype) { @@ -241,14 +242,14 @@ entity GetAmmoItem(int ammotype) case RES_PLASMA: return ITEM_Plasma; case RES_FUEL: return ITEM_JetpackFuel; } - LOG_WARNF("Invalid ammo type %d ", ammotype); + LOG_WARNF("Invalid ammo type %d ", ammotype.m_id); return NULL; // WEAPONTODO: use this generic func to reduce duplication ? // GetAmmoPicture GetAmmoName notif_arg_item_wepammo ammo_pickupevalfunc ? } #ifdef CSQC -int GetAmmoTypeFromNum(int i) +Resource GetAmmoTypeFromNum(int i) { switch (i) { @@ -262,7 +263,7 @@ int GetAmmoTypeFromNum(int i) } } -int GetAmmoStat(int ammotype) +int GetAmmoStat(Resource ammotype) { switch (ammotype) {