if (achieve == "electrobitch") this.electrobitch = value;
if (achieve == "impressive") this.impressive = value;
if (achieve == "flyingyoda") this.flyingyoda = value;
+
if (achieve == "multirailed") this.multirailed = value;
+ if (achieve == "pointblank") this.pointblank = value;
return;
}
if (achieve == "electrobitch") return this.electrobitch;
if (achieve == "impressive") return this.impressive;
if (achieve == "flyingyoda") return this.flyingyoda;
+
if (achieve == "multirailed") return this.multirailed;
+ if (achieve == "pointblank") return this.pointblank;
return 0;
}
ATTRIB(Achievements, electrobitch, int, 0);
ATTRIB(Achievements, impressive, int, 0);
ATTRIB(Achievements, flyingyoda, int, 0); //In Yoda maybe incorrect conditions
+
+ //New achievements
ATTRIB(Achievements, multirailed, int, 0);
+ ATTRIB(Achievements, pointblank, int, 0);
//Getters and setters for achievements
METHOD(Achievements, set_achievement_value, void(Achievements this, string achieve, int value));
force = normalize(attacker.origin + attacker.view_ofs - hitloc) * mirrorforce;
Damage(attacker, inflictor, attacker, mirrordamage, DEATH_MIRRORDAMAGE.m_id, weaponentity, attacker.origin, force);
}
+
+
+ //Weapons achievements
+ entity attacker_achv = attacker_save.achievements;
+ if (DEATH_ISWEAPON(deathtype, WEP_SHOTGUN)) {
+
+ float distance = vlen(targ.origin-attacker.origin);
+
+ //Add condition to look at, not only for distance
+ if (distance < 60) {
+ attacker_achv.inc_achievement(attacker_achv, "pointblank");
+ attacker_achv.announce(attacker_achv, attacker_save, "Point Blank!", "pointblank");
+ }
+ }
}
float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,