7 if(StatusEffects_active(STATUSEFFECT_Strength, player)
12 player.prevstrengthsound =
time;
14 player.prevstrengthsoundattempt =
time;
21 if(StatusEffects_active(STATUSEFFECT_Strength, player))
24 if(StatusEffects_active(STATUSEFFECT_Shield, player))
36 if(StatusEffects_active(STATUSEFFECT_Strength, attacker))
40 M_ARGV(4,
float) =
M_ARGV(4,
float) * autocvar_g_balance_powerup_strength_selfdamage;
45 M_ARGV(4,
float) =
M_ARGV(4,
float) * autocvar_g_balance_powerup_strength_damage;
51 if(StatusEffects_active(STATUSEFFECT_Shield, targ))
53 M_ARGV(4,
float) =
M_ARGV(4,
float) * autocvar_g_balance_powerup_invincible_takedamage;
66 entity e = WaypointSprite_getviewentity(player);
70 if(
IS_CLIENT(wp.owner) && (e == player) &&
DIFF_TEAM(wp.owner, e) && StatusEffects_active(STATUSEFFECT_Invisibility, wp.owner))
77 return StatusEffects_active(STATUSEFFECT_Invisibility, targ);
85 WaypointSprite_Kill(this.waypointsprite_attached);
100 float t = StatusEffects_gettime(effect,
this);
101 float timeleft = t -
time;
104 if(timeleft <= 1 || !item)
120 case ITEM_Strength: e.strength_finished = finished; maxtime = autocvar_g_balance_powerup_strength_time;
break;
121 case ITEM_Shield: e.invincible_finished = finished; maxtime = autocvar_g_balance_powerup_invincible_time;
break;
122 case ITEM_Invisibility: e.invisibility_finished = finished; maxtime = autocvar_g_balance_powerup_invincible_time;
break;
123 case ITEM_Speed: e.speed_finished = finished; maxtime = autocvar_g_balance_powerup_speed_time;
break;
134 entity wp = WaypointSprite_Spawn(WP_Item, 0, 0, e,
'0 0 1' * e.maxs.z,
NULL, 0, e, waypointsprite_attached,
true, RADARICON_Item);
135 wp.wp_extra = item.m_id;
136 WaypointSprite_UpdateMaxHealth(e.waypointsprite_attached, maxtime);
137 WaypointSprite_UpdateHealth(e.waypointsprite_attached, timeleft);
141 e.nextthink = time + 1;
147 if(e.waypointsprite_attached)
148 WaypointSprite_Kill(e.waypointsprite_attached);
158 FOREACH(StatusEffect, it.instanceOfPowerups,
160 if(StatusEffects_active(it, frag_target))
161 powerups_DropItem(frag_target, it);
170 if(StatusEffects_active(STATUSEFFECT_Speed, player))
171 STAT(MOVEVARS_HIGHSPEED, player) *= autocvar_g_balance_powerup_speed_highspeed;
178 if(StatusEffects_active(STATUSEFFECT_Speed, player))
179 M_ARGV(0,
float) *= autocvar_g_balance_powerup_speed_attackrate;
194 if(StatusEffects_active(STATUSEFFECT_Invisibility, targ))
float autocvar_sv_strengthsound_antispam_time
float autocvar_sv_strengthsound_antispam_refire_threshold
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
entity Item_DefinitionFromInternalName(string item_name)
Returns the item definition corresponding to the given internal name.
bool Item_InitializeLoot(entity item, string class_name, vector position, vector vel, float time_to_live)
Initializes the loot item.
int autocvar_g_powerups_drop_ondeath
void powerups_DropItem(entity this, StatusEffects effect)
MUTATOR_HOOKFUNCTION(powerups, W_PlayStrengthSound)
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
void W_PlayStrengthSound(entity player)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void powerups_DropItem_Think(entity this)
float autocvar_g_items_dropped_lifetime
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
#define sound(e, c, s, v, a)
void Item_SetExpiring(entity item, bool expiring)
Sets the item expiring status (i.e.
#define FOREACH(list, cond, body)