summaryrefslogtreecommitdiff
path: root/src/am_map.c
diff options
context:
space:
mode:
authorSimon Howard2007-08-27 19:31:30 +0000
committerSimon Howard2007-08-27 19:31:30 +0000
commit693fb386fc1ca8551dcea553e3dd667f2f458f61 (patch)
treec941e1b6dab1b80634998b9ea3b93ff4b72cd94b /src/am_map.c
parenteef2733d509c77f6803da1393aceaf21c204cb0f (diff)
downloadchocolate-doom-693fb386fc1ca8551dcea553e3dd667f2f458f61.tar.gz
chocolate-doom-693fb386fc1ca8551dcea553e3dd667f2f458f61.tar.bz2
chocolate-doom-693fb386fc1ca8551dcea553e3dd667f2f458f61.zip
Fix bug where the automap always follows player 1 in multiplayer mode
(thanks Janizdreg!) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 959
Diffstat (limited to 'src/am_map.c')
-rw-r--r--src/am_map.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/am_map.c b/src/am_map.c
index cad46a70..30d140f8 100644
--- a/src/am_map.c
+++ b/src/am_map.c
@@ -472,11 +472,15 @@ void AM_initVariables(void)
m_w = FTOM(f_w);
m_h = FTOM(f_h);
- plr = &players[0];
-
// find player to center on initially
- if (!playeringame[pnum = consoleplayer])
+ if (playeringame[consoleplayer])
{
+ plr = &players[consoleplayer];
+ }
+ else
+ {
+ plr = &players[0];
+
for (pnum=0;pnum<MAXPLAYERS;pnum++)
{
if (playeringame[pnum])