X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmiscfunctions.qc;h=39c42a55695f3e585ecf9f440fe89435d382342b;hp=d2aff2ae7bbc53d7378372b3aac05033ecb826a7;hb=dd75397d78ae84967ab1e646e82b15c6a30f7911;hpb=936e07981f6ca4beacadd708ca991895f4f74596 diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index d2aff2ae7b..39c42a5569 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -229,10 +229,15 @@ string formatmessage(entity this, string msg) n = 7; ammoitems = "batteries"; - if(this.items & ITEM_Plasma.m_itemid) ammoitems = ITEM_Plasma.m_name; - if(this.items & ITEM_Cells.m_itemid) ammoitems = ITEM_Cells.m_name; - if(this.items & ITEM_Rockets.m_itemid) ammoitems = ITEM_Rockets.m_name; - if(this.items & ITEM_Shells.m_itemid) ammoitems = ITEM_Shells.m_name; + switch((PS(this).m_weapon).ammo_field) + { + case ammo_shells: ammoitems = ITEM_Shells.m_name; break; + case ammo_nails: ammoitems = ITEM_Bullets.m_name; break; + case ammo_rockets: ammoitems = ITEM_Rockets.m_name; break; + case ammo_cells: ammoitems = ITEM_Cells.m_name; break; + case ammo_plasma: ammoitems = ITEM_Plasma.m_name; break; + case ammo_fuel: ammoitems = ITEM_JetpackFuel.m_name; break; + } WarpZone_crosshair_trace(this); cursor = trace_endpos;