]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/compat/quake3.qc
Reduce name space of resource constants and variables (RESOURCE_* --> RES_*, resour...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / compat / quake3.qc
index ff74d2ddb4ce1591c164ed81f99d07ea3d802564..e13fffa01dee1ca64b29ca1b6f123800c197f123 100644 (file)
@@ -88,25 +88,25 @@ void target_init_use(entity this, entity actor, entity trigger)
 {
        if (!(this.spawnflags & 1))
        {
-               SetResourceAmount(actor, RESOURCE_ARMOR, start_armorvalue);
+               SetResourceAmount(actor, RES_ARMOR, start_armorvalue);
                actor.pauserotarmor_finished = time + autocvar_g_balance_pause_armor_rot;
        }
 
        if (!(this.spawnflags & 2))
        {
-               SetResourceAmount(actor, RESOURCE_HEALTH, start_health);
+               SetResourceAmount(actor, RES_HEALTH, start_health);
                actor.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot;
                actor.pauseregen_finished = time + autocvar_g_balance_pause_health_regen;
        }
 
        if (!(this.spawnflags & 4))
        {
-               SetResourceAmount(actor, RESOURCE_SHELLS, start_ammo_shells);
-               SetResourceAmount(actor, RESOURCE_BULLETS, start_ammo_nails);
-               SetResourceAmount(actor, RESOURCE_ROCKETS, start_ammo_rockets);
-               SetResourceAmount(actor, RESOURCE_CELLS, start_ammo_cells);
-               SetResourceAmount(actor, RESOURCE_PLASMA, start_ammo_plasma);
-               SetResourceAmount(actor, RESOURCE_FUEL, start_ammo_fuel);
+               SetResourceAmount(actor, RES_SHELLS, start_ammo_shells);
+               SetResourceAmount(actor, RES_BULLETS, start_ammo_nails);
+               SetResourceAmount(actor, RES_ROCKETS, start_ammo_rockets);
+               SetResourceAmount(actor, RES_CELLS, start_ammo_cells);
+               SetResourceAmount(actor, RES_PLASMA, start_ammo_plasma);
+               SetResourceAmount(actor, RES_FUEL, start_ammo_fuel);
 
                STAT(WEAPONS, actor) = start_weapons;
                if (this.spawnflags & 32)
@@ -142,33 +142,33 @@ void target_give_init(entity this)
        IL_EACH(g_items, it.targetname == this.target,
        {
                if (it.classname == "weapon_devastator") {
-                       SetResourceAmount(this, RESOURCE_ROCKETS, GetResourceAmount(this, RESOURCE_ROCKETS) + it.count * WEP_CVAR_PRI(devastator, ammo)); // WEAPONTODO
+                       SetResourceAmount(this, RES_ROCKETS, GetResourceAmount(this, RES_ROCKETS) + it.count * WEP_CVAR_PRI(devastator, ammo)); // WEAPONTODO
                        this.netname = cons(this.netname, "devastator");
                }
                else if (it.classname == "weapon_vortex") {
-                       SetResourceAmount(this, RESOURCE_CELLS, GetResourceAmount(this, RESOURCE_CELLS) + it.count * WEP_CVAR_PRI(vortex, ammo)); // WEAPONTODO
+                       SetResourceAmount(this, RES_CELLS, GetResourceAmount(this, RES_CELLS) + it.count * WEP_CVAR_PRI(vortex, ammo)); // WEAPONTODO
                        this.netname = cons(this.netname, "vortex");
                }
                else if (it.classname == "weapon_electro") {
-                       SetResourceAmount(this, RESOURCE_CELLS, GetResourceAmount(this, RESOURCE_CELLS) + it.count * WEP_CVAR_PRI(electro, ammo)); // WEAPONTODO
+                       SetResourceAmount(this, RES_CELLS, GetResourceAmount(this, RES_CELLS) + it.count * WEP_CVAR_PRI(electro, ammo)); // WEAPONTODO
                        this.netname = cons(this.netname, "electro");
                }
                else if (it.classname == "weapon_hagar") {
-                       SetResourceAmount(this, RESOURCE_ROCKETS, GetResourceAmount(this, RESOURCE_ROCKETS) + it.count * WEP_CVAR_PRI(hagar, ammo)); // WEAPONTODO
+                       SetResourceAmount(this, RES_ROCKETS, GetResourceAmount(this, RES_ROCKETS) + it.count * WEP_CVAR_PRI(hagar, ammo)); // WEAPONTODO
                        this.netname = cons(this.netname, "hagar");
                }
                else if (it.classname == "weapon_crylink") {
-                       SetResourceAmount(this, RESOURCE_CELLS, GetResourceAmount(this, RESOURCE_CELLS) + it.count * WEP_CVAR_PRI(crylink, ammo)); // WEAPONTODO
+                       SetResourceAmount(this, RES_CELLS, GetResourceAmount(this, RES_CELLS) + it.count * WEP_CVAR_PRI(crylink, ammo)); // WEAPONTODO
                        this.netname = cons(this.netname, "crylink");
                }
                else if (it.classname == "weapon_mortar") {
-                       SetResourceAmount(this, RESOURCE_ROCKETS, GetResourceAmount(this, RESOURCE_ROCKETS) + it.count * WEP_CVAR_PRI(mortar, ammo)); // WEAPONTODO
+                       SetResourceAmount(this, RES_ROCKETS, GetResourceAmount(this, RES_ROCKETS) + it.count * WEP_CVAR_PRI(mortar, ammo)); // WEAPONTODO
                        this.netname = cons(this.netname, "mortar");
                }
                else if (it.classname == "item_armor_mega")
-                       SetResourceAmount(this, RESOURCE_ARMOR, 100);
+                       SetResourceAmount(this, RES_ARMOR, 100);
                else if (it.classname == "item_health_mega")
-                       SetResourceAmount(this, RESOURCE_HEALTH, 200);
+                       SetResourceAmount(this, RES_HEALTH, 200);
                //remove(it); // removing ents in init functions causes havoc, workaround:
         setthink(it, SUB_Remove);
         it.nextthink = time;