]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
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 88020455cd82e0d970a3cf92ad8d94cdf20d5b95..b12a10744861fcedceac01aee5a47beca471ea4d 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
 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
        GlobalSound(sample, chan, voicetype);\r
+       self = oldself;\r
 }\r
 \r
 void VoiceMessage(string type, string msg)\r
 }\r
 \r
 void VoiceMessage(string type, string msg)\r