Play hit sound when the grabber links to a player.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 2 Mar 2011 14:56:27 +0000 (16:56 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 2 Mar 2011 14:56:27 +0000 (16:56 +0200)
data/qcsrc/server/g_grabber.qc

index 4ea53d3..e9b405f 100644 (file)
@@ -264,6 +264,14 @@ void GrabberTouch (void)
        if(other)\r
                if(other.movetype != MOVETYPE_NONE)\r
                {\r
+                       if(other.classname == "player")\r
+                       {\r
+                               if(other.BUTTON_CHAT)\r
+                                       self.owner.typehitsound += 1;\r
+                               else\r
+                                       self.owner.hitsound += 1;\r
+                       }\r
+\r
                        SetMovetypeFollow(self, other);\r
                        W_Grabber_UpdateStats(self.owner, FALSE, TRUE); // count this as a hit\r
                        WarpZone_RefSys_BeginAddingIncrementally(self, self.aiment);\r