mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Fix player being invisible upon loading into game again
When I did #567, I didn't test it. And I should have tested it, because it made the player invisible. This is because map.resetplayer() also sets the invis attribute of the player to true as well, and I only undid it setting game.lifeseq to 10. So instead, I'll just add a flag to map.resetplayer() that by default doesn't set game.lifeseq or the player's invis attribute. And I tested it this time, and it works fine. I tested both respawning after death and exiting to the menu and loading in the game again.
This commit is contained in:
@@ -2675,7 +2675,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -2701,7 +2700,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2742,7 +2740,6 @@ void scriptclass::startgamemode( int t )
|
||||
map.cameramode = 0;
|
||||
map.colsuperstate = 0;
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
graphics.fademode = 4;
|
||||
break;
|
||||
case 3:
|
||||
@@ -2770,7 +2767,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2800,7 +2796,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2830,7 +2825,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2860,7 +2854,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2890,7 +2883,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2926,7 +2918,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -2952,7 +2943,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -2982,7 +2972,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3019,7 +3008,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
music.play(11);
|
||||
@@ -3056,7 +3044,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3093,7 +3080,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3130,7 +3116,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3167,7 +3152,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3201,7 +3185,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3235,7 +3218,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3269,7 +3251,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3303,7 +3284,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3328,7 +3308,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
graphics.fademode = 4;
|
||||
@@ -3365,7 +3344,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
if(ed.levmusic>0){
|
||||
@@ -3404,7 +3382,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
|
||||
@@ -3451,7 +3428,6 @@ void scriptclass::startgamemode( int t )
|
||||
{
|
||||
map.resetplayer();
|
||||
}
|
||||
game.lifeseq = 0;
|
||||
map.gotoroom(game.saverx, game.savery);
|
||||
map.initmapdata();
|
||||
ed.generatecustomminimap();
|
||||
|
||||
Reference in New Issue
Block a user