if (achieve == "selfimmolation") this.selfimmolation = value;
if (achieve == "telefrag") this.telefrag = value;
if (achieve == "surprise") this.surprise = value;
+ if (achieve == "bitchslap") this.bitchslap = value;
return;
}
if (achieve == "selfimmolation") return this.selfimmolation;
if (achieve == "telefrag") return this.telefrag;
if (achieve == "surprise") return this.surprise;
+ if (achieve == "bitchslap") return this.bitchslap;
return 0;
}
if (achieve == "selfimmolation") return "Self-Immolation!";
if (achieve == "telefrag") return "Unexpected Kill!";
if (achieve == "surprise") return "Surprise!";
+ if (achieve == "bitchslap") return "Bitch Slap!";
return "";
}
ATTRIB(Achievements, selfimmolation, int, 0);
ATTRIB(Achievements, telefrag, int, 0);
ATTRIB(Achievements, surprise, int, 0);
+ ATTRIB(Achievements, bitchslap, int, 0);
//Getters and setters for achievements
//Weapons achievements
if (DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) || DEATH_ISWEAPON(deathtype, WEP_CRYLINK)) {
- float distance = vlen(targ.origin-attacker.origin);
-
- attacker.pointblank_checker = 1;
+ if (deathtype != WEP_SHOTGUN.m_id && !DEATH_ISWEAPON(deathtype, WEP_CRYLINK)) {
+ //It means melee attack
- //Add condition to look at, not only for distance
- if (distance < 65 && targ != attacker) {
- attacker.pointblank_increase = 1;
+ if (IS_DEAD(targ)) {
+
+ entity achv = attacker.achievements;
+ achv.inc_achievement(achv, "bitchslap");
+ achv.announce(achv, attacker, "bitchslap");
+ }
+
+ } else {
+ float distance = vlen(targ.origin-attacker.origin);
+
+ attacker.pointblank_checker = 1;
+
+ //Add condition to look at, not only for distance
+ if (distance < 65 && targ != attacker) {
+ attacker.pointblank_increase = 1;
+ }
}
+
}
if (IS_DEAD(targ) && IS_PLAYER(attacker)) {