LogNB("stole", attacker);
_sound(toucher, CH_TRIGGER, ball.noise2, VOL_BASE, ATTEN_NORM);
- if(SAME_TEAM(attacker, toucher) && time > attacker.teamkill_complain)
+ if(SAME_TEAM(attacker, toucher) && time > CS(attacker).teamkill_complain)
{
- attacker.teamkill_complain = time + 5;
- attacker.teamkill_soundtime = time + 0.4;
- attacker.teamkill_soundsource = toucher;
+ CS(attacker).teamkill_complain = time + 5;
+ CS(attacker).teamkill_soundtime = time + 0.4;
+ CS(attacker).teamkill_soundsource = toucher;
}
GiveBall(attacker, toucher.ballcarried);
SetZoomState(this, PHYS_INPUT_BUTTON_ZOOM(this) || PHYS_INPUT_BUTTON_ZOOMSCRIPT(this) || wep_zoomed);
}
- if (this.teamkill_soundtime && time > this.teamkill_soundtime)
+ if (CS(this).teamkill_soundtime && time > CS(this).teamkill_soundtime)
{
- this.teamkill_soundtime = 0;
+ CS(this).teamkill_soundtime = 0;
- entity e = this.teamkill_soundsource;
+ entity e = CS(this).teamkill_soundsource;
entity oldpusher = e.pusher;
e.pusher = this;
PlayerSound(e, playersound_teamshoot, CH_VOICE, VOL_BASEVOICE, VOICETYPE_LASTATTACKER_ONLY);
ATTRIB(Client, pressedkeys, int, this.pressedkeys);
ATTRIB(Client, movement_old, vector, this.movement_old);
ATTRIB(Client, buttons_old, int, this.buttons_old);
+ ATTRIB(Client, teamkill_complain, float, this.teamkill_complain);
+ ATTRIB(Client, teamkill_soundtime, float, this.teamkill_soundtime);
+ ATTRIB(Client, teamkill_soundsource, entity, this.teamkill_soundsource);
METHOD(Client, m_unwind, bool(Client this));
}
}
}
- else
+ else if(IS_PLAYER(attacker))
{
if(deathtype != DEATH_FIRE.m_id)
{
attacker.typehitsound += 1;
}
if(complainteamdamage > 0)
- if(time > attacker.teamkill_complain)
+ if(time > CS(attacker).teamkill_complain)
{
- attacker.teamkill_complain = time + 5;
- attacker.teamkill_soundtime = time + 0.4;
- attacker.teamkill_soundsource = targ;
+ CS(attacker).teamkill_complain = time + 5;
+ CS(attacker).teamkill_soundtime = time + 0.4;
+ CS(attacker).teamkill_soundsource = targ;
}
}
}