-std=gmqcc \
-O3 -flno \
-Werror -fno-bail-on-werror -Wall \
- -fftepp -fftepp-predefs -Wcpp -futf8 \
+ -fftepp -fftepp-predefs -Wcpp -futf8 -frelaxed-switch \
$(QCCFLAGS_WTFS) \
$(QCCFLAGS_FEATURES) \
$(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
#include "../common/constants.qh"
#include "../common/counting.qh"
#include "../common/deathtypes.qh"
+#include "../common/items/all.qc"
#include "../common/mapinfo.qh"
#include "../common/nades.qh"
return 2;
}
-void HUD_Powerups(void)
+void HUD_Powerups()
{
if(intermission == 2) return;
if(!autocvar_hud_panel_powerups) return;
if(spectatee_status == -1) return;
if(getstati(STAT_HEALTH) <= 0) return;
- if(!(allItems & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON)) && !allBuffs) return;
+ if(!(allItems & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON)) && !allBuffs) return;
strengthTime = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99);
shieldTime = bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 99);
#endif
}
-REGISTER_ITEM(ArmorBig, Armor) {
+REGISTER_ITEM(ArmorLarge, Armor) {
this.m_model = "models/items/item_armor_big.md3";
this.m_sound = "misc/armor17_5.wav";
this.m_name = "50 Armor";
#endif
}
-REGISTER_ITEM(ArmorLarge, Armor) {
+REGISTER_ITEM(ArmorMega, Armor) {
this.m_model = "models/items/item_armor_large.md3";
this.m_sound = "misc/armor25.wav";
this.m_name = "100 Armor";
#include "powerup.qh"
#include "../../../server/t_items.qh"
+#ifndef SVQC
+.int m_itemid;
+#endif
REGISTER_ITEM(Strength, Powerup) {
this.m_model = "models/items/g_strength.md3";
this.m_sound = "misc/powerup.wav";
this.m_name = "Strength Powerup";
-#ifdef SVQC
this.m_itemid = IT_STRENGTH;
-#endif
}
REGISTER_ITEM(Shield, Powerup) {
this.m_model = "models/items/g_invincible.md3";
this.m_sound = "misc/powerup_shield.wav";
this.m_name = "Shield";
-#ifdef SVQC
this.m_itemid = IT_INVINCIBLE;
-#endif
}
return false;
if(!IS_PLAYER(e))
return ((e.flags & FL_MONSTER) && e.health < e.max_health);
- if(e.items & IT_INVINCIBLE)
+ if(e.items & ITEM_Shield.m_itemid)
return false;
switch(self.skin)
float activate = JETPACK_JUMP(self) && air_jump && PHYS_INPUT_BUTTON_JUMP(self) || PHYS_INPUT_BUTTON_JETPACK(self);
float has_fuel = !PHYS_JETPACK_FUEL || PHYS_AMMO_FUEL(self) || ITEMS_STAT(self) & IT_UNLIMITED_WEAPON_AMMO;
- if (!(ITEMS_STAT(self) & IT_JETPACK)) { }
+ if (!(ITEMS_STAT(self) & ITEM_Jetpack.m_itemid)) { }
else if (self.jetpack_stopped) { }
else if (!has_fuel)
{
gren.think = W_Porto_Think;
gren.touch = W_Porto_Touch;
- if(self.items & IT_STRENGTH)
+ if(self.items & ITEM_Strength.m_itemid)
W_SetupProjVelocity_Basic(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed) * autocvar_g_balance_powerup_strength_force, 0);
else
W_SetupProjVelocity_Basic(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed), 0);
#include "../common/net_notice.qh"
#include "../common/physics.qh"
+#include "../common/items/all.qc"
+
#include "../common/triggers/subs.qh"
#include "../common/triggers/triggers.qh"
#include "../common/triggers/trigger/secret.qh"
if (!g_instagib)
{
- if (self.items & IT_STRENGTH)
+ if (self.items & ITEM_Strength.m_itemid)
{
play_countdown(self.strength_finished, "misc/poweroff.wav");
self.effects = self.effects | (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
if (time > self.strength_finished)
{
- self.items = self.items - (self.items & IT_STRENGTH);
+ self.items = self.items - (self.items & ITEM_Strength.m_itemid);
//Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERDOWN_STRENGTH, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_STRENGTH);
}
{
if (time < self.strength_finished)
{
- self.items = self.items | IT_STRENGTH;
+ self.items = self.items | ITEM_Strength.m_itemid;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_STRENGTH, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_STRENGTH);
}
}
- if (self.items & IT_INVINCIBLE)
+ if (self.items & ITEM_Shield.m_itemid)
{
play_countdown(self.invincible_finished, "misc/poweroff.wav");
self.effects = self.effects | (EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
if (time > self.invincible_finished)
{
- self.items = self.items - (self.items & IT_INVINCIBLE);
+ self.items = self.items - (self.items & ITEM_Shield.m_itemid);
//Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERDOWN_SHIELD, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SHIELD);
}
{
if (time < self.invincible_finished)
{
- self.items = self.items | IT_INVINCIBLE;
+ self.items = self.items | ITEM_Shield.m_itemid;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_SHIELD, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SHIELD);
}
minf = autocvar_g_balance_fuel_regenstable;
limitf = autocvar_g_balance_fuel_limit;
- self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
+ self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
}
}
W_WeaponFrame();
self.items_added = 0;
- if(self.items & IT_JETPACK)
- if(self.items & IT_FUEL_REGEN || self.ammo_fuel >= 0.01)
+ if(self.items & ITEM_Jetpack.m_itemid)
+ if(self.items & ITEM_JetpackRegen.m_itemid || self.ammo_fuel >= 0.01)
self.items_added |= IT_FUEL;
self.items |= self.items_added;
if(!g_instagib)
{
// apply strength multiplier
- if (attacker.items & IT_STRENGTH)
+ if (attacker.items & ITEM_Strength.m_itemid)
{
if(targ == attacker)
{
}
// apply invincibility multiplier
- if (targ.items & IT_INVINCIBLE)
+ if (targ.items & ITEM_Shield.m_itemid)
damage = damage * autocvar_g_balance_powerup_invincible_takedamage;
}
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;
}
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"));
}
{
makevectors((player.v_angle.y * '0 1 0') + (bound(autocvar_g_ctf_throw_angle_min, player.v_angle.x, autocvar_g_ctf_throw_angle_max) * '1 0 0'));
- flag_velocity = (('0 0 1' * autocvar_g_ctf_throw_velocity_up) + ((v_forward * autocvar_g_ctf_throw_velocity_forward) * ((player.items & IT_STRENGTH) ? autocvar_g_ctf_throw_strengthmultiplier : 1)));
+ flag_velocity = (('0 0 1' * autocvar_g_ctf_throw_velocity_up) + ((v_forward * autocvar_g_ctf_throw_velocity_forward) * ((player.items & ITEM_Strength.m_itemid) ? autocvar_g_ctf_throw_strengthmultiplier : 1)));
flag.velocity = W_CalculateProjectileVelocity(player.velocity, flag_velocity, false);
ctf_Handle_Drop(flag, player, droptype);
break;
MUTATOR_HOOKFUNCTION(lms_ItemTouch)
{
// give extra lives for mega health
- if(self.items & IT_HEALTH)
+ if (self.items & ITEM_HealthMega.m_itemid)
{
Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
MUTATOR_HOOKFUNCTION(instagib_BotShouldAttack)
{
- if(checkentity.items & IT_STRENGTH)
+ if(checkentity.items & ITEM_Strength.m_itemid)
return true;
return false;
if (!(self.effects & EF_FULLBRIGHT))
self.effects |= EF_FULLBRIGHT;
- if (self.items & IT_STRENGTH)
+ if (self.items & ITEM_Strength.m_itemid)
{
play_countdown(self.strength_finished, "misc/poweroff.wav");
if (time > self.strength_finished)
{
self.alpha = default_player_alpha;
self.exteriorweaponentity.alpha = default_weapon_alpha;
- self.items &= ~IT_STRENGTH;
+ self.items &= ~ITEM_Strength.m_itemid;
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_INVISIBILITY);
}
}
{
self.alpha = autocvar_g_instagib_invis_alpha;
self.exteriorweaponentity.alpha = autocvar_g_instagib_invis_alpha;
- self.items |= IT_STRENGTH;
+ self.items |= ITEM_Strength.m_itemid;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_INVISIBILITY, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_INVISIBILITY);
}
}
- if (self.items & IT_INVINCIBLE)
+ if (self.items & ITEM_Shield.m_itemid)
{
play_countdown(self.invincible_finished, "misc/poweroff.wav");
if (time > self.invincible_finished)
{
- self.items &= ~IT_INVINCIBLE;
+ self.items &= ~ITEM_Shield.m_itemid;
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SPEED);
}
}
{
if (time < self.invincible_finished)
{
- self.items |= IT_INVINCIBLE;
+ self.items |= ITEM_Shield.m_itemid;
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_SPEED, self.netname);
Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SPEED);
}
MUTATOR_HOOKFUNCTION(instagib_PlayerPhysics)
{
- if(self.items & IT_INVINCIBLE)
+ if(self.items & ITEM_Shield.m_itemid)
self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed;
return false;
frag_mirrordamage = 0;
}
- if((frag_target.buffs & BUFF_INVISIBLE) || (frag_target.items & IT_STRENGTH))
+ if((frag_target.buffs & BUFF_INVISIBLE) || (frag_target.items & ITEM_Strength.m_itemid))
yoda = 1;
return false;
// if you have the invisibility powerup, sprites ALWAYS are restricted to your team
// but only apply this to real players, not to spectators
- if((self.owner.flags & FL_CLIENT) && (self.owner.items & IT_STRENGTH) && (e == other))
+ if((self.owner.flags & FL_CLIENT) && (self.owner.items & ITEM_Strength.m_itemid) && (e == other))
if(DIFF_TEAM(self.owner, e))
return true;
MUTATOR_HOOKFUNCTION(instagib_ItemCountdown)
{
- switch(self.items)
+ switch (self.items)
{
- case IT_STRENGTH: item_name = "item-invis"; item_color = '0 0 1'; break;
- case IT_NAILS: item_name = "item-extralife"; item_color = '1 0 0'; break;
- case IT_INVINCIBLE: item_name = "item-speed"; item_color = '1 0 1'; break;
+ case ITEM_Strength.m_itemid: item_name = "item-invis"; item_color = '0 0 1'; break;
+ case ITEM_ExtraLife.m_itemid: item_name = "item-extralife"; item_color = '1 0 0'; break;
+ case ITEM_Shield.m_itemid: item_name = "item-speed"; item_color = '1 0 1'; break;
}
return false;
}
{
switch (self.items)
{
- case IT_5HP:
- case IT_ARMOR_SHARD:
+ case ITEM_HealthSmall.m_itemid:
+ case ITEM_ArmorSmall.m_itemid:
return false;
}
n.classname = "nade";
fn.classname = "fake_nade";
- if(self.items & IT_STRENGTH && autocvar_g_nades_bonus_onstrength)
+ if(self.items & ITEM_Strength.m_itemid && autocvar_g_nades_bonus_onstrength)
n.nade_type = self.nade_type;
else if (self.bonus_nades >= 1)
{
{
switch (self.items)
{
- case IT_HEALTH:
- case IT_5HP:
- case IT_25HP:
- case IT_ARMOR:
- case IT_ARMOR_SHARD:
+ case ITEM_HealthSmall.m_itemid:
+ case ITEM_HealthMedium.m_itemid:
+ case ITEM_HealthLarge.m_itemid:
+ case ITEM_HealthMega.m_itemid:
+ case ITEM_ArmorSmall.m_itemid:
+ case ITEM_ArmorMedium.m_itemid:
+ case ITEM_ArmorLarge.m_itemid:
+ case ITEM_ArmorMega.m_itemid:
if (autocvar_g_nix_with_healtharmor)
return 0;
break;
- case IT_STRENGTH:
- case IT_INVINCIBLE:
+ case ITEM_Strength.m_itemid:
+ case ITEM_Shield.m_itemid:
if (autocvar_g_nix_with_powerups)
return 0;
break;
minf = autocvar_g_balance_fuel_regenstable;
limitf = autocvar_g_balance_fuel_limit;
- self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
+ self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > self.pauseregen_finished) * ((self.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > self.pauserotfuel_finished), limitf);
}
return true; // return true anyway, as frozen uses no regen
}
switch(self.items)
{
- case IT_HEALTH: return !(autocvar_g_overkill_100h_anyway);
- case IT_ARMOR: return !(autocvar_g_overkill_100a_anyway);
+ case ITEM_HealthMega.m_itemid: return !(autocvar_g_overkill_100h_anyway);
+ case ITEM_ArmorMega.m_itemid: return !(autocvar_g_overkill_100a_anyway);
}
return true;
e.ItemStatus &= ~ITS_AVAILABLE;
}
- if (e.items & IT_STRENGTH || e.items & IT_INVINCIBLE)
+ if (e.items & ITEM_Strength.m_itemid || e.items & ITEM_Shield.m_itemid)
e.ItemStatus |= ITS_POWERUP;
if (autocvar_g_nodepthtestitems)
{
Item_Show(self, 1);
// this is ugly...
- if(self.items == IT_STRENGTH)
+ if(self.items == ITEM_Strength.m_itemid)
sound (self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTEN_NORM); // play respawn sound
- else if(self.items == IT_INVINCIBLE)
+ else if(self.items == ITEM_Shield.m_itemid)
sound (self, CH_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTEN_NORM); // play respawn sound
else
sound (self, CH_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTEN_NORM); // play respawn sound
string name;
vector rgb = '1 0 1';
name = string_null;
- switch(self.items)
+ switch (self.items)
{
- case IT_FUEL_REGEN: name = "item-fuelregen"; rgb = '1 0.5 0'; break;
- case IT_JETPACK: name = "item-jetpack"; rgb = '0.5 0.5 0.5'; break;
- case IT_STRENGTH: name = "item-strength"; rgb = '0 0 1'; break;
- case IT_INVINCIBLE: name = "item-shield"; rgb = '1 0 1'; break;
- case IT_HEALTH:
+ case ITEM_JetpackRegen.m_itemid: name = "item-fuelregen"; rgb = '1 0.5 0'; break;
+ case ITEM_Jetpack.m_itemid: name = "item-jetpack"; rgb = '0.5 0.5 0.5'; break;
+ case ITEM_Strength.m_itemid: name = "item-strength"; rgb = '0 0 1'; break;
+ case ITEM_Shield.m_itemid: name = "item-shield"; rgb = '1 0 1'; break;
+ case ITEM_HealthMega.m_itemid:
//if (self.classname == "item_health_mega")
{name = "item_health_mega"; rgb = '1 0 0';}
break;
- case IT_ARMOR:
+ case ITEM_ArmorMega.m_itemid:
if (self.classname == "item_armor_large")
{name = "item_armor_large"; rgb = '0 1 0';}
break;
if (!(player.weapons & WepSet_FromWeapon(i)))
continue;
- if(wi.items & IT_SHELLS)
+ if(wi.items & ITEM_Shells.m_itemid)
need_shells = true;
- else if(wi.items & IT_NAILS)
+ else if(wi.items & ITEM_Bullets.m_itemid)
need_nails = true;
- else if(wi.items & IT_ROCKETS)
+ else if(wi.items & ITEM_Rockets.m_itemid)
need_rockets = true;
- else if(wi.items & IT_CELLS)
+ else if(wi.items & ITEM_Cells.m_itemid)
need_cells = true;
- else if(wi.items & IT_PLASMA)
+ else if(wi.items & ITEM_Plasma.m_itemid)
need_plasma = true;
- else if(wi.items & IT_FUEL)
+ else if(wi.items & ITEM_JetpackFuel.m_itemid)
need_fuel = true;
}
precache_sound (self.item_pickupsound);
precache_sound ("misc/itemrespawncountdown.wav");
- if(itemid == IT_STRENGTH)
+ if(itemid == ITEM_Strength.m_itemid)
precache_sound ("misc/strength_respawn.wav");
- else if(itemid == IT_INVINCIBLE)
+ else if(itemid == ITEM_Shield.m_itemid)
precache_sound ("misc/shield_respawn.wav");
else
precache_sound ("misc/itemrespawn.wav");
self.max_armorvalue = g_pickup_armorbig_max;
if(!self.pickup_anyway)
self.pickup_anyway = g_pickup_armorbig_anyway;
- StartItemA (ITEM_ArmorBig);
+ StartItemA (ITEM_ArmorLarge);
}
void spawnfunc_item_armor_large (void) {
self.max_armorvalue = g_pickup_armorlarge_max;
if(!self.pickup_anyway)
self.pickup_anyway = g_pickup_armorlarge_anyway;
- StartItemA (ITEM_ArmorLarge);
+ StartItemA (ITEM_ArmorMega);
}
void spawnfunc_item_health_small (void) {
if (argv(i) == "unlimited_ammo") self.items |= IT_UNLIMITED_AMMO;
else if(argv(i) == "unlimited_weapon_ammo") self.items |= IT_UNLIMITED_WEAPON_AMMO;
else if(argv(i) == "unlimited_superweapons") self.items |= IT_UNLIMITED_SUPERWEAPONS;
- else if(argv(i) == "strength") self.items |= IT_STRENGTH;
- else if(argv(i) == "invincible") self.items |= IT_INVINCIBLE;
+ else if(argv(i) == "strength") self.items |= ITEM_Strength.m_itemid;
+ else if(argv(i) == "invincible") self.items |= ITEM_Shield.m_itemid;
else if(argv(i) == "superweapons") self.items |= IT_SUPERWEAPON;
- else if(argv(i) == "jetpack") self.items |= IT_JETPACK;
- else if(argv(i) == "fuel_regen") self.items |= IT_FUEL_REGEN;
+ else if(argv(i) == "jetpack") self.items |= ITEM_Jetpack.m_itemid;
+ else if(argv(i) == "fuel_regen") self.items |= ITEM_JetpackRegen.m_itemid;
else
{
for(j = WEP_FIRST; j <= WEP_LAST; ++j)
self.netname = "";
self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.items & IT_UNLIMITED_WEAPON_AMMO), "unlimited_weapon_ammo");
self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.items & IT_UNLIMITED_SUPERWEAPONS), "unlimited_superweapons");
- self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, self.strength_finished * !!(self.items & IT_STRENGTH), "strength");
- self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, self.invincible_finished * !!(self.items & IT_INVINCIBLE), "invincible");
+ self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, self.strength_finished * !!(self.items & ITEM_Strength.m_itemid), "strength");
+ self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, self.invincible_finished * !!(self.items & ITEM_Shield.m_itemid), "invincible");
self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, self.superweapons_finished * !!(self.items & IT_SUPERWEAPON), "superweapons");
- self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.items & IT_JETPACK), "jetpack");
- self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.items & IT_FUEL_REGEN), "fuel_regen");
+ self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.items & ITEM_Jetpack.m_itemid), "jetpack");
+ self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.items & ITEM_JetpackRegen.m_itemid), "fuel_regen");
if(self.ammo_shells != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_shells), "shells");
if(self.ammo_nails != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_nails), "nails");
if(self.ammo_rockets != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_rockets), "rockets");
void spawnfunc_item_fuel_regen(void)
{
- if(start_items & IT_FUEL_REGEN)
+ if(start_items & ITEM_JetpackRegen.m_itemid)
{
spawnfunc_item_fuel();
return;
{
if(!self.ammo_fuel)
self.ammo_fuel = g_pickup_fuel_jetpack;
- if(start_items & IT_JETPACK)
+ if(start_items & ITEM_Jetpack.m_itemid)
{
spawnfunc_item_fuel();
return;
op = OP_MINUS;
continue;
case "ALL":
- got += GiveBit(e, items, IT_FUEL_REGEN, op, val);
+ got += GiveBit(e, items, ITEM_JetpackRegen.m_itemid, op, val);
got += GiveValue(e, strength_finished, op, val);
got += GiveValue(e, invincible_finished, op, val);
got += GiveValue(e, superweapons_finished, op, val);
got += GiveBit(e, items, IT_UNLIMITED_AMMO, op, val);
case "all":
- got += GiveBit(e, items, IT_JETPACK, op, val);
+ got += GiveBit(e, items, ITEM_Jetpack.m_itemid, op, val);
got += GiveValue(e, health, op, val);
got += GiveValue(e, armorvalue, op, val);
case "allweapons":
got += GiveBit(e, items, IT_UNLIMITED_SUPERWEAPONS, op, val);
break;
case "jetpack":
- got += GiveBit(e, items, IT_JETPACK, op, val);
+ got += GiveBit(e, items, ITEM_Jetpack.m_itemid, op, val);
break;
case "fuel_regen":
- got += GiveBit(e, items, IT_FUEL_REGEN, op, val);
+ got += GiveBit(e, items, ITEM_JetpackRegen.m_itemid, op, val);
break;
case "strength":
got += GiveValue(e, strength_finished, op, val);
op = OP_SET;
}
- POSTGIVE_BIT(e, items, IT_FUEL_REGEN, "misc/itempickup.wav", string_null);
+ POSTGIVE_BIT(e, items, ITEM_JetpackRegen.m_itemid, "misc/itempickup.wav", string_null);
POSTGIVE_BIT(e, items, IT_UNLIMITED_SUPERWEAPONS, "misc/powerup.wav", "misc/poweroff.wav");
POSTGIVE_BIT(e, items, IT_UNLIMITED_WEAPON_AMMO, "misc/powerup.wav", "misc/poweroff.wav");
- POSTGIVE_BIT(e, items, IT_JETPACK, "misc/itempickup.wav", string_null);
+ POSTGIVE_BIT(e, items, ITEM_Jetpack.m_itemid, "misc/itempickup.wav", string_null);
for(j = WEP_FIRST; j <= WEP_LAST; ++j)
{
wi = get_weaponinfo(j);
void W_PlayStrengthSound(entity player) // void W_PlayStrengthSound
{
- if((player.items & IT_STRENGTH)
+ if((player.items & ITEM_Strength.m_itemid)
&& ((time > player.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam
|| (time > player.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)))
{