]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_grabber.qc
Play hit sound when the grabber links to a player.
[voretournament/voretournament.git] / data / qcsrc / server / g_grabber.qc
index 4ea53d329f61a9b3ea5fa57af3defbfaa947b9e3..e9b405f62c13ceb0f10429e8add751ae94dd421f 100644 (file)
@@ -264,6 +264,14 @@ void GrabberTouch (void)
        if(other)\r
                if(other.movetype != MOVETYPE_NONE)\r
                {\r
        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
                        SetMovetypeFollow(self, other);\r
                        W_Grabber_UpdateStats(self.owner, FALSE, TRUE); // count this as a hit\r
                        WarpZone_RefSys_BeginAddingIncrementally(self, self.aiment);\r