summaryrefslogtreecommitdiff
path: root/src/creditsMgr.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-05-28 23:58:33 +0200
committerTreeki <treeki@gmail.com>2013-05-28 23:58:33 +0200
commit4b378538046b46a17949416d91c996b7d3cef5c2 (patch)
tree8e81bd3607faae3c8ed3536b4c2020ce6722a0b0 /src/creditsMgr.cpp
parenteb45bac5a1255d35bf11997f1217f2ce565118fe (diff)
downloadkamek-4b378538046b46a17949416d91c996b7d3cef5c2.tar.gz
kamek-4b378538046b46a17949416d91c996b7d3cef5c2.zip
credits player positioning fix
Diffstat (limited to 'src/creditsMgr.cpp')
-rw-r--r--src/creditsMgr.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/creditsMgr.cpp b/src/creditsMgr.cpp
index ece7b35..c8ef8c2 100644
--- a/src/creditsMgr.cpp
+++ b/src/creditsMgr.cpp
@@ -557,10 +557,25 @@ void dCreditsMgr_c::positionPlayers() {
playerPositions[2] = playerPositions[0] + diff;
playerPositions[3] = playerPositions[0] + diff + diff;
+ // This is annoying
+ dAcPy_c *players[4];
+ for (int i = 0; i < 4; i++)
+ players[i] = dAcPy_c::findByID(i);
+
+ static const int crap[4] = {0,1,3,2};
+
int whichPos = 0;
for (int i = 0; i < 4; i++) {
- dAcPy_c *player;
- if ((player = dAcPy_c::findByID(i))) {
+ dAcPy_c *player = 0;
+ // Find the player matching this ID
+ for (int j = 0; j < 4; j++) {
+ if (Player_ID[players[j]->settings & 0xF] == crap[i]) {
+ player = players[j];
+ break;
+ }
+ }
+
+ if (player) {
player->pos.x = playerPositions[whichPos];
player->pos.y = -(entrance->yPos + 16);
player->direction = 0;