#ifdef SVQC
PROPERTY(int, g_pickup_nails);
-void ammo_bullets_init(entity item)
+void ammo_bullets_init(Pickup this, entity item)
{
if(!item.ammo_nails)
item.ammo_nails = g_pickup_nails;
#ifdef SVQC
PROPERTY(int, g_pickup_cells);
-void ammo_cells_init(entity item)
+void ammo_cells_init(Pickup this, entity item)
{
if(!item.ammo_cells)
item.ammo_cells = g_pickup_cells;
#ifdef SVQC
PROPERTY(int, g_pickup_plasma);
-void ammo_plasma_init(entity item)
+void ammo_plasma_init(Pickup this, entity item)
{
if(!item.ammo_plasma)
item.ammo_plasma = g_pickup_plasma;
#ifdef SVQC
PROPERTY(int, g_pickup_rockets);
-void ammo_rockets_init(entity item)
+void ammo_rockets_init(Pickup this, entity item)
{
if(!item.ammo_rockets)
item.ammo_rockets = g_pickup_rockets;
#ifdef SVQC
PROPERTY(int, g_pickup_shells);
-void ammo_shells_init(entity item)
+void ammo_shells_init(Pickup this, entity item)
{
if(!item.ammo_shells)
item.ammo_shells = g_pickup_shells;
PROPERTY(float, g_pickup_armorsmall_anyway);
PROPERTY(int, g_pickup_armorsmall);
PROPERTY(int, g_pickup_armorsmall_max);
-void item_armorsmall_init(entity item)
+void item_armorsmall_init(Pickup this, entity item)
{
if(!item.max_armorvalue)
item.max_armorvalue = g_pickup_armorsmall_max;
PROPERTY(float, g_pickup_armormedium_anyway);
PROPERTY(int, g_pickup_armormedium);
PROPERTY(int, g_pickup_armormedium_max);
-void item_armormedium_init(entity item)
+void item_armormedium_init(Pickup this, entity item)
{
if(!item.max_armorvalue)
item.max_armorvalue = g_pickup_armormedium_max;
PROPERTY(float, g_pickup_armorbig_anyway);
PROPERTY(int, g_pickup_armorbig);
PROPERTY(int, g_pickup_armorbig_max);
-void item_armorbig_init(entity item)
+void item_armorbig_init(Pickup this, entity item)
{
if(!item.max_armorvalue)
item.max_armorvalue = g_pickup_armorbig_max;
PROPERTY(float, g_pickup_armormega_anyway);
PROPERTY(int, g_pickup_armormega);
PROPERTY(int, g_pickup_armormega_max);
-void item_armormega_init(entity item)
+void item_armormega_init(Pickup this, entity item)
{
if(!item.max_armorvalue)
item.max_armorvalue = g_pickup_armormega_max;
PROPERTY(float, g_pickup_healthsmall_anyway);
PROPERTY(int, g_pickup_healthsmall);
PROPERTY(int, g_pickup_healthsmall_max);
-void item_healthsmall_init(entity item)
+void item_healthsmall_init(Pickup this, entity item)
{
if(!item.max_health)
item.max_health = g_pickup_healthsmall_max;
PROPERTY(float, g_pickup_healthmedium_anyway);
PROPERTY(int, g_pickup_healthmedium);
PROPERTY(int, g_pickup_healthmedium_max);
-void item_healthmedium_init(entity item)
+void item_healthmedium_init(Pickup this, entity item)
{
if(!item.max_health)
item.max_health = g_pickup_healthmedium_max;
PROPERTY(float, g_pickup_healthbig_anyway);
PROPERTY(int, g_pickup_healthbig);
PROPERTY(int, g_pickup_healthbig_max);
-void item_healthbig_init(entity item)
+void item_healthbig_init(Pickup this, entity item)
{
if(!item.max_health)
item.max_health = g_pickup_healthbig_max;
PROPERTY(float, g_pickup_healthmega_anyway);
PROPERTY(int, g_pickup_healthmega);
PROPERTY(int, g_pickup_healthmega_max);
-void item_healthmega_init(entity item)
+void item_healthmega_init(Pickup this, entity item)
{
if(!item.max_health)
item.max_health = g_pickup_healthmega_max;
#ifdef SVQC
PROPERTY(int, g_pickup_fuel_jetpack);
-void powerup_jetpack_init(entity item)
+void powerup_jetpack_init(Pickup this, entity item)
{
if(!item.ammo_fuel)
item.ammo_fuel = g_pickup_fuel_jetpack;
#ifdef SVQC
PROPERTY(int, g_pickup_fuel);
-void ammo_fuel_init(entity item)
+void ammo_fuel_init(Pickup this, entity item)
{
if(!item.ammo_fuel)
item.ammo_fuel = g_pickup_fuel;
ATTRIB(Pickup, m_respawntime, float());
ATTRIB(Pickup, m_respawntimejitter, float());
ATTRIB(Pickup, m_pickupanyway, float());
- ATTRIB(Pickup, m_iteminit, void(entity item));
+ ATTRIB(Pickup, m_iteminit, void(Pickup this, entity item));
float Item_GiveTo(entity item, entity player);
METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player));
bool ITEM_HANDLE(Pickup, Pickup this, entity item, entity player);
#ifdef SVQC
float autocvar_g_balance_powerup_strength_time;
-void powerup_strength_init(entity item)
+void powerup_strength_init(Pickup this, entity item)
{
if(!item.strength_finished)
item.strength_finished = autocvar_g_balance_powerup_strength_time;
#ifdef SVQC
float autocvar_g_balance_powerup_invincible_time;
-void powerup_shield_init(entity item)
+void powerup_shield_init(Pickup this, entity item)
{
if(!item.invincible_finished)
item.invincible_finished = autocvar_g_balance_powerup_invincible_time;
#ifdef SVQC
int autocvar_g_instagib_ammo_drop;
-void ammo_vaporizercells_init(entity item)
+void ammo_vaporizercells_init(Pickup this, entity item)
{
if(!item.ammo_cells)
item.ammo_cells = autocvar_g_instagib_ammo_drop;
/// \brief Initializes the invisibility powerup.
/// \param[in,out] item Item to initialize.
/// \return No return.
-void powerup_invisibility_init(entity item);
+void powerup_invisibility_init(Pickup this, entity item);
#endif
REGISTER_ITEM(Invisibility, Powerup) {
/// \brief Initializes the speed powerup.
/// \param[in,out] item Item to initialize.
/// \return No return.
-void powerup_speed_init(entity item);
+void powerup_speed_init(Pickup this, entity item);
#endif
REGISTER_ITEM(Speed, Powerup) {
/// \brief Time of speed powerup in seconds.
float autocvar_g_instagib_speed_time;
-void powerup_invisibility_init(entity item)
+void powerup_invisibility_init(Pickup this, entity item)
{
if(!item.strength_finished)
{
}
-void powerup_speed_init(entity item)
+void powerup_speed_init(Pickup this, entity item)
{
if(!item.invincible_finished)
{
this.item_pickupsound_ent = pickupsound;
if(def.m_iteminit)
- def.m_iteminit(this);
+ def.m_iteminit(def, this);
if(!this.respawntime) // both need to be set
{