]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add pointblank for CryLink, replace variable names, fix Immolation's bug with killing...
authorAriosJentu <darthpoezd@gmail.com>
Sun, 25 Aug 2019 15:48:56 +0000 (01:48 +1000)
committerAriosJentu <darthpoezd@gmail.com>
Sun, 25 Aug 2019 15:48:56 +0000 (01:48 +1000)
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/g_damage.qc

index e7ff14c1c057f33bd1b775a87ae734720b6f3a21..ddb6bbe565df358fcae35d13c987085b4d8a6ea1 100644 (file)
@@ -2598,19 +2598,18 @@ void PlayerPreThink (entity this)
        }
 
        //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
index 478c4d24c091e607b559942e8392363b550637b1..ea3cb89b62ab61bdfd03f03cc1b3325b1f9c2e52 100644 (file)
@@ -199,9 +199,9 @@ CLASS(Player, Client)
     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);
 
index 0d7a1e604025296a8ee0cbbe20f8a875058bfc11..d9dcc32a483a506b2239c34ae175abdef89942e7 100644 (file)
@@ -879,18 +879,18 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de
 
                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;
                }