mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +01:00
Remove game.door_left/right/up/down variables
These don't do anything, and in fact are actively harmful by disabling room transitions if your roomx/roomy is glitched.
This commit is contained in:
parent
a345cf93b8
commit
1924ca53ac
3 changed files with 11 additions and 20 deletions
|
@ -211,10 +211,6 @@ public:
|
|||
const char* saveFilePath;
|
||||
|
||||
|
||||
int door_left;
|
||||
int door_right;
|
||||
int door_up;
|
||||
int door_down;
|
||||
int roomx, roomy;
|
||||
int prevroomx, prevroomy;
|
||||
|
||||
|
|
|
@ -994,7 +994,7 @@ void gamelogic(void)
|
|||
obj.customwarpmodevon = false;
|
||||
|
||||
int i = obj.getplayer();
|
||||
if (INBOUNDS_VEC(i, obj.entities) && ((game.door_down > -2 && obj.entities[i].yp >= 226-16) || (game.door_up > -2 && obj.entities[i].yp < -2+16) || (game.door_left > -2 && obj.entities[i].xp < -14+16) || (game.door_right > -2 && obj.entities[i].xp >= 308-16))){
|
||||
if (INBOUNDS_VEC(i, obj.entities) && (obj.entities[i].yp >= 226-16 || obj.entities[i].yp < -2+16 || obj.entities[i].xp < -14+16 || obj.entities[i].xp >= 308-16)){
|
||||
//Player is leaving room
|
||||
obj.customwarplinecheck(i);
|
||||
}
|
||||
|
@ -1134,12 +1134,12 @@ void gamelogic(void)
|
|||
{
|
||||
//Normal! Just change room
|
||||
int player = obj.getplayer();
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_down > -2 && obj.entities[player].yp >= 238)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp >= 238)
|
||||
{
|
||||
obj.entities[player].yp -= 240;
|
||||
GOTOROOM(game.roomx, game.roomy + 1);
|
||||
}
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_up > -2 && obj.entities[player].yp < -2)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp < -2)
|
||||
{
|
||||
obj.entities[player].yp += 240;
|
||||
GOTOROOM(game.roomx, game.roomy - 1);
|
||||
|
@ -1150,12 +1150,12 @@ void gamelogic(void)
|
|||
{
|
||||
//Normal! Just change room
|
||||
int player = obj.getplayer();
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14)
|
||||
{
|
||||
obj.entities[player].xp += 320;
|
||||
GOTOROOM(game.roomx - 1, game.roomy);
|
||||
}
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308)
|
||||
{
|
||||
obj.entities[player].xp -= 320;
|
||||
GOTOROOM(game.roomx + 1, game.roomy);
|
||||
|
@ -1169,12 +1169,12 @@ void gamelogic(void)
|
|||
{
|
||||
//This is minitower 1!
|
||||
int player = obj.getplayer();
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14)
|
||||
{
|
||||
obj.entities[player].xp += 320;
|
||||
GOTOROOM(48, 52);
|
||||
}
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308)
|
||||
{
|
||||
obj.entities[player].xp -= 320;
|
||||
obj.entities[player].yp -= (71*8);
|
||||
|
@ -1185,7 +1185,7 @@ void gamelogic(void)
|
|||
{
|
||||
//This is minitower 2!
|
||||
int player = obj.getplayer();
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14)
|
||||
{
|
||||
if (obj.entities[player].yp > 300)
|
||||
{
|
||||
|
@ -1199,7 +1199,7 @@ void gamelogic(void)
|
|||
GOTOROOM(50, 53);
|
||||
}
|
||||
}
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308)
|
||||
{
|
||||
obj.entities[player].xp -= 320;
|
||||
GOTOROOM(52, 53);
|
||||
|
@ -1229,13 +1229,13 @@ void gamelogic(void)
|
|||
{
|
||||
//Do not wrap! Instead, go to the correct room
|
||||
int player = obj.getplayer();
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_left > -2 && obj.entities[player].xp < -14)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14)
|
||||
{
|
||||
obj.entities[player].xp += 320;
|
||||
obj.entities[player].yp -= (671 * 8);
|
||||
GOTOROOM(108, 109);
|
||||
}
|
||||
if (INBOUNDS_VEC(player, obj.entities) && game.door_right > -2 && obj.entities[player].xp >= 308)
|
||||
if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308)
|
||||
{
|
||||
obj.entities[player].xp -= 320;
|
||||
GOTOROOM(110, 104);
|
||||
|
|
|
@ -956,11 +956,6 @@ void mapclass::gotoroom(int rx, int ry)
|
|||
}
|
||||
}
|
||||
|
||||
game.door_up = rx + ((ry - 1) * 100);
|
||||
game.door_down = rx + ((ry + 1) * 100);
|
||||
game.door_right = rx + 1 + (ry * 100);
|
||||
game.door_left = rx -1 + (ry * 100);
|
||||
|
||||
if (rx < game.roomx)
|
||||
{
|
||||
roomchangedir = 0;
|
||||
|
|
Loading…
Reference in a new issue