}
//Bullets timer
- if (this.shotgun_timer) {
+ if (this.pointblank_checker) {
- if (this.shotgun_inc_pointblank) {
+ if (this.pointblank_increase) {
- entity attaker = this.shotgun_bullets_received_from;
- entity achv = attaker.achievements;
+ entity achv = this.achievements;
achv.inc_achievement(achv, "pointblank");
- achv.announce(achv, attaker, "Point Blank!", "pointblank");
+ achv.announce(achv, this, "Point Blank!", "pointblank");
}
- this.shotgun_timer = 0;
- this.shotgun_inc_pointblank = 0;
+ this.pointblank_checker = 0;
+ this.pointblank_increase = 0;
}
//Check suicide
ATTRIB(Player, prevstrengthsoundattempt, float, this.prevstrengthsoundattempt);
ATTRIB(Player, buff_shield, float, this.buff_shield);
- ATTRIB(Player, shotgun_timer, bool, this.shotgun_timer);
- ATTRIB(Player, shotgun_bullets_received_from, entity, this.shotgun_bullets_received_from);
- ATTRIB(Player, shotgun_inc_pointblank, bool, this.shotgun_inc_pointblank);
+ ATTRIB(Player, pointblank_checker, bool, this.pointblank_checker);
+ ATTRIB(Player, pointblank_attacker, entity, this.pointblank_attacker);
+ ATTRIB(Player, pointblank_increase, bool, this.pointblank_increase);
ATTRIB(Player, check_suicide, bool, this.check_suicide);
ATTRIB(Player, suicide, bool, this.suicide);
float distance = vlen(targ.origin-attacker.origin);
- targ.shotgun_timer = 1;
- targ.shotgun_bullets_received_from = attacker;
+ attacker.pointblank_checker = 1;
//Add condition to look at, not only for distance
if (distance < 65 && targ != attacker) {
- targ.shotgun_inc_pointblank = 1;
+ attacker.pointblank_increase = 1;
}
}
if (IS_DEAD(targ) && IS_PLAYER(attacker)) {
if (targ != attacker) {
attacker.check_suicide = 1;
+ attacker.suicide = 0;
} else {
attacker.suicide = 1;
}