Fix an issue with PlayerSound
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 2 Sep 2010 18:53:13 +0000 (21:53 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 2 Sep 2010 18:53:13 +0000 (21:53 +0300)
data/qcsrc/server/cl_player.qc

index 8802045..b12a107 100644 (file)
@@ -1307,8 +1307,13 @@ void GlobalSound(string sample, float chan, float voicetype)
 void PlayerSound(entity player, .string samplefield, float chan, float voicetype)\r
 {\r
        string sample;\r
-       sample = player.samplefield;\r
+       entity oldself;\r
+\r
+       oldself = self;\r
+       self = player;\r
+       sample = self.samplefield;\r
        GlobalSound(sample, chan, voicetype);\r
+       self = oldself;\r
 }\r
 \r
 void VoiceMessage(string type, string msg)\r