#ifdef SVQC
.float invisibility_finished;
-bool autocvar_g_powerups_invisibility = 1;
-float autocvar_g_balance_powerup_invisibility_alpha = 0.15;
-float autocvar_g_balance_powerup_invisibility_time = 30;
-void powerup_invisibility_init(Pickup this, entity item)
+bool autocvar_g_powerups_invisibility;
+float autocvar_g_balance_powerup_invisibility_alpha;
+float autocvar_g_balance_powerup_invisibility_time;
+void powerup_invisibility_init(Pickup def, entity item)
{
- if(autocvar_g_powerups_invisibility)
- this.spawnflags = ITEM_FLAG_NORMAL;
- else
- this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+ if(!autocvar_g_powerups || !autocvar_g_powerups_invisibility)
+ def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
if(!item.invisibility_finished)
item.invisibility_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invisibility_time;
this.m_iteminit = powerup_invisibility_init;
#endif
#ifdef GAMEQC
+ this.spawnflags = ITEM_FLAG_NORMAL;
this.m_itemid = IT_INVISIBILITY;
this.m_model = MDL_BUFF; // TODO: MDL_Invisibility_ITEM when new model available
this.m_skin = 12;
#endif
#ifdef SVQC
-bool autocvar_g_powerups_shield = 1;
+bool autocvar_g_powerups_shield;
float autocvar_g_balance_powerup_invincible_takedamage;
-float autocvar_g_balance_powerup_invincible_takeforce = 0.33;
+float autocvar_g_balance_powerup_invincible_takeforce;
float autocvar_g_balance_powerup_invincible_time;
-void powerup_shield_init(Pickup this, entity item)
+void powerup_shield_init(Pickup def, entity item)
{
- if(autocvar_g_powerups_shield)
- this.spawnflags = ITEM_FLAG_NORMAL;
- else
- this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+ if(!autocvar_g_powerups || !autocvar_g_powerups_shield)
+ def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
if(!item.invincible_finished)
item.invincible_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invincible_time;
this.m_iteminit = powerup_shield_init;
#endif
#ifdef GAMEQC
+ this.spawnflags = ITEM_FLAG_NORMAL;
this.m_itemid = IT_INVINCIBLE;
this.m_model = MDL_Shield_ITEM;
this.m_sound = SND_Shield;
#ifdef SVQC
.float speed_finished;
-bool autocvar_g_powerups_speed = 1;
-float autocvar_g_balance_powerup_speed_attackrate = 0.8;
-float autocvar_g_balance_powerup_speed_highspeed = 1.5;
-float autocvar_g_balance_powerup_speed_time = 30;
-void powerup_speed_init(Pickup this, entity item)
+bool autocvar_g_powerups_speed;
+float autocvar_g_balance_powerup_speed_attackrate;
+float autocvar_g_balance_powerup_speed_highspeed;
+float autocvar_g_balance_powerup_speed_time;
+void powerup_speed_init(Pickup def, entity item)
{
- if(autocvar_g_powerups_speed)
- this.spawnflags = ITEM_FLAG_NORMAL;
- else
- this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+ if(!autocvar_g_powerups || !autocvar_g_powerups_speed)
+ def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
if(!item.speed_finished)
item.speed_finished = (item.count) ? item.count : autocvar_g_balance_powerup_speed_time;
this.m_iteminit = powerup_speed_init;
#endif
#ifdef GAMEQC
+ this.spawnflags = ITEM_FLAG_NORMAL;
this.m_itemid = IT_SPEED;
this.m_model = MDL_BUFF; // TODO: MDL_Speed_ITEM when new model available
this.m_skin = 9;
#endif
#ifdef SVQC
-bool autocvar_g_powerups_strength = 1;
+bool autocvar_g_powerups_strength;
float autocvar_g_balance_powerup_strength_damage;
float autocvar_g_balance_powerup_strength_force;
float autocvar_g_balance_powerup_strength_selfdamage;
float autocvar_g_balance_powerup_strength_selfforce;
float autocvar_g_balance_powerup_strength_time;
-void powerup_strength_init(Pickup this, entity item)
+void powerup_strength_init(Pickup def, entity item)
{
- if(autocvar_g_powerups_strength)
- this.spawnflags = ITEM_FLAG_NORMAL;
- else
- this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
+ if(!autocvar_g_powerups || !autocvar_g_powerups_strength)
+ def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
if(!item.strength_finished)
item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
this.m_iteminit = powerup_strength_init;
#endif
#ifdef GAMEQC
+ this.spawnflags = ITEM_FLAG_NORMAL;
this.m_itemid = IT_STRENGTH;
this.m_model = MDL_Strength_ITEM;
this.m_sound = SND_Strength;
if (this.itemdef.spawnflags & ITEM_FLAG_MUTATORBLOCKED)
return false;
- if(this.itemdef.instanceOfPowerup)
- {
- if(autocvar_g_powerups > 0)
- return true;
- if(autocvar_g_powerups == 0)
- return false;
- }
- else
+ if(!this.itemdef.instanceOfPowerup)
{
if(autocvar_g_pickup_items > 0)
return true;