]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qc
Rename AmmoNameFromWeaponentity to GetAmmoName and move it out of miscfunctions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qc
index f2fdf4407fb6307494ba7201e009c3c21f36091c..ef7a38c4e27bb7979e16e3c7e547aaccbc025fe3 100644 (file)
@@ -225,6 +225,20 @@ string GetAmmoPicture(int ammotype)
        }
 }
 
+string GetAmmoName(int ammotype)
+{
+       switch (ammotype)
+       {
+               case RES_SHELLS:  return ITEM_Shells.m_name;
+               case RES_BULLETS: return ITEM_Bullets.m_name;
+               case RES_ROCKETS: return ITEM_Rockets.m_name;
+               case RES_CELLS:   return ITEM_Cells.m_name;
+               case RES_PLASMA:  return ITEM_Plasma.m_name;
+               case RES_FUEL:    return ITEM_JetpackFuel.m_name;
+               default:          return "batteries";
+       }
+}
+
 #ifdef CSQC
 int GetAmmoTypeFromNum(int i)
 {