From: Mario <zacjardine@y7mail.com>
Date: Thu, 23 Apr 2015 07:33:06 +0000 (+1000)
Subject: Add impressive announcement to vortex
X-Git-Tag: xonotic-v0.8.1~77
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=894ecf46c6cfb838c946403fca851d99f6e97cac;p=xonotic%2Fxonotic-data.pk3dir.git

Add impressive announcement to vortex
---

diff --git a/qcsrc/common/weapons/w_vortex.qc b/qcsrc/common/weapons/w_vortex.qc
index 374256403..67096cb97 100644
--- a/qcsrc/common/weapons/w_vortex.qc
+++ b/qcsrc/common/weapons/w_vortex.qc
@@ -53,6 +53,8 @@ REGISTER_WEAPON(
 
 #ifdef SVQC
 VORTEX_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
+
+.float vortex_lasthit;
 #endif
 #else
 #ifdef SVQC
@@ -107,10 +109,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);