don't load map state again when reaching last page of intro

This commit is contained in:
Sebastian Krzyszkowiak 2012-02-22 11:53:26 +01:00
parent b5326270db
commit a715d37be9
2 changed files with 3 additions and 2 deletions

View file

@ -15,7 +15,7 @@ $(ODIR)/%.o: $(SRCDIR)/%.c
$(CC) -c -o $@ $< $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS)
$(OUTPUTDIR)/superderpy: $(OBJ) $(OUTPUTDIR)/superderpy: $(OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
.PHONY: clean .PHONY: clean

View file

@ -25,8 +25,9 @@ void Intro_Draw(struct Game *game) {
else if (game->intro.position<=-4*al_get_display_width(game->display)) { else if (game->intro.position<=-4*al_get_display_width(game->display)) {
PrintConsole(game, "This was the last page."); PrintConsole(game, "This was the last page.");
UnloadGameState(game); UnloadGameState(game);
game->gamestate = GAMESTATE_LOADING;
game->loadstate = GAMESTATE_MAP; game->loadstate = GAMESTATE_MAP;
PrintConsole(game, "Chainloading GAMESTATE_MAP...");
LoadGameState(game);
} }
} }
} }