diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 19fa0256..e8aeffe8 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1402,7 +1402,6 @@ void gamelogic() } } - int j; if (game.roomchange) { //We've changed room? Let's bring our companion along! @@ -1414,14 +1413,16 @@ void gamelogic() switch(game.companion) { case 6: + { obj.createentity(obj.entities[i].xp, 121.0f, 15.0f,1); //Y=121, the floor in that particular place! - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; obj.entities[j].dir = obj.entities[i].dir; } break; + } case 7: if (game.roomy <= 105) //don't jump after him! { @@ -1433,7 +1434,7 @@ void gamelogic() { obj.createentity(obj.entities[i].xp, 86.0f, 16.0f, 1); //Y=86, the ROOF in that particular place! } - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; @@ -1447,7 +1448,7 @@ void gamelogic() if (game.roomx == 102) { obj.createentity(310, 177, 17, 1); - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; @@ -1457,7 +1458,7 @@ void gamelogic() else { obj.createentity(obj.entities[i].xp, 177.0f, 17.0f, 1); - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; @@ -1477,7 +1478,7 @@ void gamelogic() { obj.createentity(obj.entities[i].xp, 185.0f, 18.0f, 15, 0, 1); } - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; @@ -1492,7 +1493,7 @@ void gamelogic() if (!obj.flags[59]) { obj.createentity(225.0f, 169.0f, 18, graphics.crewcolour(game.lastsaved), 0, 10); - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; @@ -1505,7 +1506,7 @@ void gamelogic() if (obj.flags[59]) { obj.createentity(160.0f, 177.0f, 18, graphics.crewcolour(game.lastsaved), 0, 18, 1); - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx; @@ -1516,7 +1517,7 @@ void gamelogic() { obj.flags[59] = true; obj.createentity(obj.entities[i].xp, -20.0f, 18.0f, graphics.crewcolour(game.lastsaved), 0, 10, 0); - j = obj.getcompanion(); + int j = obj.getcompanion(); if (j > -1) { obj.entities[j].vx = obj.entities[i].vx;