=============
*/
.float last_vehiclecheck;
-.int shotgun_timer_time;
void PlayerPreThink (entity this)
{
//Bullets timer
if (this.shotgun_timer) {
-
- if (this.shotgun_timer_time < 2) { //2 frames for reloading weapon
- this.shotgun_timer_time++;
-
- } else {
-
- if (this.shotgun_inc_pointblank) {
- entity attaker = this.shotgun_bullets_received_from;
- entity achv = attaker.achievements;
-
- achv.inc_achievement(achv, "pointblank");
- achv.announce(achv, attaker, "Point Blank!", "pointblank");
- }
+ if (this.shotgun_inc_pointblank) {
- this.shotgun_timer = 0;
- this.shotgun_timer_time = 0;
- this.shotgun_inc_pointblank = 0;
+ entity attaker = this.shotgun_bullets_received_from;
+ entity achv = attaker.achievements;
+
+ achv.inc_achievement(achv, "pointblank");
+ achv.announce(achv, attaker, "Point Blank!", "pointblank");
}
+
+ this.shotgun_timer = 0;
+ this.shotgun_inc_pointblank = 0;
}
//Check suicide
//Weapons achievements
- if (DEATH_ISWEAPON(deathtype, WEP_SHOTGUN)) {
+ if (DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) || DEATH_ISWEAPON(deathtype, WEP_CRYLINK)) {
float distance = vlen(targ.origin-attacker.origin);
targ.shotgun_bullets_received_from = attacker;
//Add condition to look at, not only for distance
- if (distance < 65) {
+ if (distance < 65 && targ != attacker) {
targ.shotgun_inc_pointblank = 1;
}
}