diff options
author | Simon Howard | 2007-08-27 19:31:30 +0000 |
---|---|---|
committer | Simon Howard | 2007-08-27 19:31:30 +0000 |
commit | 693fb386fc1ca8551dcea553e3dd667f2f458f61 (patch) | |
tree | c941e1b6dab1b80634998b9ea3b93ff4b72cd94b /src/am_map.c | |
parent | eef2733d509c77f6803da1393aceaf21c204cb0f (diff) | |
download | chocolate-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.c | 10 |
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]) |