]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Same as above
authorMario <zacjardine@y7mail.com>
Thu, 23 Apr 2015 07:35:13 +0000 (17:35 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 23 Apr 2015 07:35:13 +0000 (17:35 +1000)
qcsrc/common/weapons/w_vortex.qc

index 65e431effb911e6977edf92b6aacbebd9c36afc6..c306b41b8a849f4cd0e5d3dda3773cae79ee745e 100644 (file)
@@ -53,6 +53,8 @@ REGISTER_WEAPON(
 
 #ifdef SVQC
 VORTEX_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
+
+.float vortex_lasthit;
 #endif
 #else
 #ifdef SVQC
@@ -109,10 +111,18 @@ void W_Vortex_Attack(float issecondary)
        }
 
        yoda = 0;
+       damage_goodhits = 0;
        FireRailgunBullet(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX);
 
        if(yoda && flying)
                Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
+       if(damage_goodhits && self.vortex_lasthit)
+       {
+               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
+               damage_goodhits = 0; // only every second time
+       }
+
+       self.vortex_lasthit = damage_goodhits;
 
        //beam and muzzle flash done on client
        SendCSQCVortexBeamParticle(charge);