#pragma once
#include "pickup.qh"
+#ifdef SVQC
+PROPERTY(float, g_pickup_ammo_anyway);
+#endif
+
CLASS(Ammo, Pickup)
#ifdef SVQC
ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), ammo_pickupevalfunc);
ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo));
ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo));
+ ATTRIB(Ammo, m_pickupanyway, float(), GET(g_pickup_ammo_anyway));
#endif
ENDCLASS(Ammo)
MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
SOUND(ArmorSmall, Item_Sound("armor1"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_armorsmall_anyway);
+#endif
REGISTER_ITEM(ArmorSmall, Armor) {
#ifdef GAMEQC
this.m_itemid = IT_ARMOR_SHARD;
this.m_respawntime = GET(g_pickup_respawntime_short);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
+ this.m_pickupanyway = GET(g_pickup_armorsmall_anyway);
#endif
}
MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
SOUND(ArmorMedium, Item_Sound("armor10"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_armormedium_anyway);
+#endif
REGISTER_ITEM(ArmorMedium, Armor) {
#ifdef GAMEQC
this.m_itemid = IT_ARMOR;
this.m_respawntime = GET(g_pickup_respawntime_medium);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium);
+ this.m_pickupanyway = GET(g_pickup_armormedium_anyway);
#endif
}
MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3"));
SOUND(ArmorBig, Item_Sound("armor17_5"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_armorbig_anyway);
+#endif
REGISTER_ITEM(ArmorBig, Armor) {
#ifdef GAMEQC
this.m_itemid = IT_ARMOR;
this.m_respawntime = GET(g_pickup_respawntime_long);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
+ this.m_pickupanyway = GET(g_pickup_armorbig_anyway);
#endif
}
MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
SOUND(ArmorMega, Item_Sound("armor25"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_armormega_anyway);
+#endif
REGISTER_ITEM(ArmorMega, Armor) {
#ifdef GAMEQC
this.m_itemid = IT_ARMOR;
this.m_respawntime = GET(g_pickup_respawntime_long);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
+ this.m_pickupanyway = GET(g_pickup_armormega_anyway);
#endif
}
MODEL(HealthSmall_ITEM, Item_Model("g_h1.md3"));
SOUND(HealthSmall, Item_Sound("minihealth"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_healthsmall_anyway);
+#endif
REGISTER_ITEM(HealthSmall, Health) {
#ifdef GAMEQC
this.m_itemid = IT_5HP;
this.m_respawntime = GET(g_pickup_respawntime_short);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
+ this.m_pickupanyway = GET(g_pickup_healthsmall_anyway);
#endif
}
MODEL(HealthMedium_ITEM, Item_Model("g_h25.md3"));
SOUND(HealthMedium, Item_Sound("mediumhealth"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_healthmedium_anyway);
+#endif
REGISTER_ITEM(HealthMedium, Health) {
#ifdef GAMEQC
this.m_itemid = IT_25HP;
this.m_respawntime = GET(g_pickup_respawntime_short);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
+ this.m_pickupanyway = GET(g_pickup_healthmedium_anyway);
#endif
}
MODEL(HealthBig_ITEM, Item_Model("g_h50.md3"));
SOUND(HealthBig, Item_Sound("mediumhealth"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_healthbig_anyway);
+#endif
REGISTER_ITEM(HealthBig, Health) {
#ifdef GAMEQC
this.m_itemid = IT_25HP;
this.m_respawntime = GET(g_pickup_respawntime_medium);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium);
+ this.m_pickupanyway = GET(g_pickup_healthbig_anyway);
#endif
}
MODEL(HealthMega_ITEM, Item_Model("g_h100.md3"));
SOUND(HealthMega, Item_Sound("megahealth"));
#endif
+#ifdef SVQC
+PROPERTY(float, g_pickup_healthmega_anyway);
+#endif
REGISTER_ITEM(HealthMega, Health) {
#ifdef GAMEQC
this.m_itemid = IT_HEALTH;
this.m_respawntime = GET(g_pickup_respawntime_long);
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
+ this.m_pickupanyway = GET(g_pickup_healthmega_anyway);
#endif
}
ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc);
ATTRIB(Pickup, m_respawntime, float());
ATTRIB(Pickup, m_respawntimejitter, float());
+ ATTRIB(Pickup, m_pickupanyway, float());
float Item_GiveTo(entity item, entity player);
METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player))
{
this.respawntimejitter = defaultrespawntimejitter;
}
+ if(!this.pickup_anyway && def.m_pickupanyway)
+ this.pickup_anyway = def.m_pickupanyway();
+
int itemid = def.m_itemid;
this.items = itemid;
int weaponid = def.instanceOfWeaponPickup ? def.m_weapon.m_id : 0;
{
if(!this.ammo_rockets)
this.ammo_rockets = g_pickup_rockets;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_ammo_anyway;
StartItem(this, ITEM_Rockets);
}
if(!this.ammo_nails)
this.ammo_nails = g_pickup_nails;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_ammo_anyway;
StartItem(this, ITEM_Bullets);
}
{
if(!this.ammo_cells)
this.ammo_cells = g_pickup_cells;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_ammo_anyway;
StartItem(this, ITEM_Cells);
}
{
if(!this.ammo_plasma)
this.ammo_plasma = g_pickup_plasma;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_ammo_anyway;
StartItem(this, ITEM_Plasma);
}
if(!this.ammo_shells)
this.ammo_shells = g_pickup_shells;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_ammo_anyway;
StartItem(this, ITEM_Shells);
}
this.armorvalue = g_pickup_armorsmall;
if(!this.max_armorvalue)
this.max_armorvalue = g_pickup_armorsmall_max;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_armorsmall_anyway;
StartItem(this, ITEM_ArmorSmall);
}
this.armorvalue = g_pickup_armormedium;
if(!this.max_armorvalue)
this.max_armorvalue = g_pickup_armormedium_max;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_armormedium_anyway;
StartItem(this, ITEM_ArmorMedium);
}
this.armorvalue = g_pickup_armorbig;
if(!this.max_armorvalue)
this.max_armorvalue = g_pickup_armorbig_max;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_armorbig_anyway;
StartItem(this, ITEM_ArmorBig);
}
this.armorvalue = g_pickup_armormega;
if(!this.max_armorvalue)
this.max_armorvalue = g_pickup_armormega_max;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_armormega_anyway;
StartItem(this, ITEM_ArmorMega);
}
this.max_health = g_pickup_healthsmall_max;
if(!this.health)
this.health = g_pickup_healthsmall;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_healthsmall_anyway;
StartItem(this, ITEM_HealthSmall);
}
this.max_health = g_pickup_healthmedium_max;
if(!this.health)
this.health = g_pickup_healthmedium;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_healthmedium_anyway;
StartItem(this, ITEM_HealthMedium);
}
this.max_health = g_pickup_healthbig_max;
if(!this.health)
this.health = g_pickup_healthbig;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_healthbig_anyway;
StartItem(this, ITEM_HealthBig);
}
this.max_health = g_pickup_healthmega_max;
if(!this.health)
this.health = g_pickup_healthmega;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_healthmega_anyway;
StartItem(this, ITEM_HealthMega);
}
{
if(!this.ammo_fuel)
this.ammo_fuel = g_pickup_fuel;
- if(!this.pickup_anyway)
- this.pickup_anyway = g_pickup_ammo_anyway;
StartItem(this, ITEM_JetpackFuel);
}
float g_pickup_fuel_max;
float g_pickup_armorsmall;
float g_pickup_armorsmall_max;
-float g_pickup_armorsmall_anyway;
float g_pickup_armormedium;
float g_pickup_armormedium_max;
-float g_pickup_armormedium_anyway;
float g_pickup_armorbig;
float g_pickup_armorbig_max;
-float g_pickup_armorbig_anyway;
float g_pickup_armormega;
float g_pickup_armormega_max;
-float g_pickup_armormega_anyway;
float g_pickup_healthsmall;
float g_pickup_healthsmall_max;
-float g_pickup_healthsmall_anyway;
float g_pickup_healthmedium;
float g_pickup_healthmedium_max;
-float g_pickup_healthmedium_anyway;
float g_pickup_healthbig;
float g_pickup_healthbig_max;
-float g_pickup_healthbig_anyway;
float g_pickup_healthmega;
float g_pickup_healthmega_max;
-float g_pickup_healthmega_anyway;
-float g_pickup_ammo_anyway;
float g_pickup_weapons_anyway;
float g_weaponarena;
WepSet g_weaponarena_weapons;