shithub: patch

ref: aa01a19cd7d467949d02c557591b9d9c5a11a66d
dir: /doom-spy/

View raw version
diff -Naur a/sys/src/games/doom/g_game.c b/sys/src/games/doom/g_game.c
--- a/sys/src/games/doom/g_game.c	Mon Aug 31 01:13:18 2015
+++ b/sys/src/games/doom/g_game.c	Wed Sep 16 08:16:55 2015
@@ -510,6 +510,9 @@
 	    displayplayer++; 
 	    if (displayplayer == MAXPLAYERS) 
 		displayplayer = 0; 
+		/* FIXME */
+		extern player_t *plyr;
+		plyr = &players[displayplayer];
 	} while (!playeringame[displayplayer] && displayplayer != consoleplayer); 
 	return true; 
     }
diff -Naur a/sys/src/games/doom/s_sound.c b/sys/src/games/doom/s_sound.c
--- a/sys/src/games/doom/s_sound.c	Sun Jul 29 23:01:33 2012
+++ b/sys/src/games/doom/s_sound.c	Wed Sep 16 08:16:08 2015
@@ -38,6 +38,7 @@
 
 #include "doomstat.h"
 
+extern player_t *plyr;
 
 // Purpose?
 const char snd_prefixen[]
@@ -281,16 +282,16 @@
 
   // Check to see if it is audible,
   //  and if not, modify the params
-  if (origin && origin != players[consoleplayer].mo)
+  if (origin && origin != plyr->mo)
   {
-    rc = S_AdjustSoundParams(players[consoleplayer].mo,
+    rc = S_AdjustSoundParams(plyr->mo,
 			     origin,
 			     &volume,
 			     &sep,
 			     &pitch);
 	
-    if ( origin->x == players[consoleplayer].mo->x
-	 && origin->y == players[consoleplayer].mo->y)
+    if ( origin->x == plyr->mo->x
+	 && origin->y == plyr->mo->y)
     {	
       sep = NORM_SEP;
     }
diff -Naur a/sys/src/games/doom/st_stuff.c b/sys/src/games/doom/st_stuff.c
--- a/sys/src/games/doom/st_stuff.c	Mon Aug 17 23:00:05 2015
+++ b/sys/src/games/doom/st_stuff.c	Wed Sep 16 08:14:48 2015
@@ -264,7 +264,7 @@
 
 	    
 // main player in game
-static player_t*	plyr; 
+player_t*	plyr; 
 
 // ST_Start() has just been called
 static boolean		st_firsttime;