|| (STAT(FROZEN, toucher))
|| (toucher.vehicle)
|| (!this.buffdef) // TODO: error out or maybe reset type if this occurs?
- || (time < PS(toucher).buff_shield)
+ || (time < toucher.buff_shield)
)
{
// can't touch this
}
else if(removal_type == STATUSEFFECT_REMOVE_NORMAL && !IS_INDEPENDENT_PLAYER(actor))
Send_Notification(NOTIF_ALL_EXCEPT, actor, MSG_INFO, INFO_ITEM_BUFF_LOST, actor.netname, buffid);
- entity store = IS_PLAYER(actor) ? PS(actor) : actor;
- store.buff_shield = time + max(0, autocvar_g_buffs_pickup_delay); // always put in a delay, even if small
+ actor.buff_shield = time + max(0, autocvar_g_buffs_pickup_delay); // always put in a delay, even if small
}
if(IS_PLAYER(actor))
actor.effects &= ~EF_NOSHADOW;
Send_Notification(NOTIF_ALL_EXCEPT, player, MSG_INFO, INFO_ITEM_BUFF_LOST, player.netname, buffid);
buff_RemoveAll(player, STATUSEFFECT_REMOVE_NORMAL);
- PS(player).buff_shield = time + max(0, autocvar_g_buffs_pickup_delay);
+ player.buff_shield = time + max(0, autocvar_g_buffs_pickup_delay);
sound(player, CH_TRIGGER, SND_BUFF_LOST, VOL_BASE, ATTN_NORM);
return true;
}
MUTATOR_HOOKFUNCTION(powerups, W_PlayStrengthSound)
{
entity player = M_ARGV(0, entity);
- entity store = IS_PLAYER(player) ? PS(player) : player; // because non-player entities can fire weapons
if(StatusEffects_active(STATUSEFFECT_Strength, player)
- && ((time > store.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam
- || (time > store.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)))
+ && ((time > player.prevstrengthsound + autocvar_sv_strengthsound_antispam_time) // prevent insane sound spam
+ || (time > player.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)))
{
sound(player, CH_TRIGGER, SND_STRENGTH_FIRE, VOL_BASE, ATTEN_NORM);
- store.prevstrengthsound = time;
+ player.prevstrengthsound = time;
}
- store.prevstrengthsoundattempt = time;
+ player.prevstrengthsoundattempt = time;
}
MUTATOR_HOOKFUNCTION(powerups, LogDeath_AppendItemCodes)
ATTRIB(Player, dual_weapons, vector, this.dual_weapons); // TODO: actually WepSet!
ATTRIB(Player, itemkeys, int, this.itemkeys);
ATTRIB(Player, ballistics_density, float, this.ballistics_density);
- ATTRIB(Player, prevstrengthsound, float, this.prevstrengthsound);
- ATTRIB(Player, prevstrengthsoundattempt, float, this.prevstrengthsoundattempt);
- ATTRIB(Player, buff_shield, float, this.buff_shield);
INIT(Player) {
this.classname = STR_PLAYER;