]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge branches 'TimePath/weaponsys' and 'Mario/modpack'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index f8b29d2d4fc0946b1bdbbd3cdd8757ce31fb681b..d77728215137fd0cae0754c2bd89335767a0546a 100644 (file)
@@ -303,11 +303,11 @@ string formatmessage(string msg)
                                wep = self.cnt;
                        replacement = WEP_NAME(wep);
                } else if (escape == "W") {
-                       if (self.items & IT_SHELLS) replacement = "shells";
-                       else if (self.items & IT_NAILS) replacement = "bullets";
-                       else if (self.items & IT_ROCKETS) replacement = "rockets";
-                       else if (self.items & IT_CELLS) replacement = "cells";
-                       else if (self.items & IT_PLASMA) replacement = "plasma";
+                       if (self.items & ITEM_Shells.m_itemid) replacement = "shells";
+                       else if (self.items & ITEM_Bullets.m_itemid) replacement = "bullets";
+                       else if (self.items & ITEM_Rockets.m_itemid) replacement = "rockets";
+                       else if (self.items & ITEM_Cells.m_itemid) replacement = "cells";
+                       else if (self.items & ITEM_Plasma.m_itemid) replacement = "plasma";
                        else replacement = "batteries"; // ;)
                } else if (escape == "x") {
                        replacement = cursor_ent.netname;
@@ -427,7 +427,6 @@ void GetCvars(float f)
 
        get_cvars_f = f;
        get_cvars_s = s;
-
        MUTATOR_CALLHOOK(GetCvars);
 
        Notification_GetCvars();
@@ -725,13 +724,13 @@ void readplayerstartcvars()
        }
 
        if (g_jetpack)
-               start_items |= IT_JETPACK;
+               start_items |= ITEM_Jetpack.m_itemid;
 
        MUTATOR_CALLHOOK(SetStartItems);
 
-       if ((start_items & IT_JETPACK) || (g_grappling_hook && (start_weapons & WEPSET_HOOK)))
+       if ((start_items & ITEM_Jetpack.m_itemid) || (g_grappling_hook && (start_weapons & WEPSET_HOOK)))
        {
-               start_items |= IT_FUEL_REGEN;
+               start_items |= ITEM_JetpackRegen.m_itemid;
                start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
                warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
        }