1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-03-18 18:19:39 +01:00

add forced quick load

This commit is contained in:
XProger 2020-01-31 21:11:56 +03:00
parent c6d409f860
commit 7ea08f75b2
2 changed files with 11 additions and 6 deletions

View File

@ -226,8 +226,9 @@ namespace Game {
if (slot > -1) {
if (forced) {
level->loadGame(slot);
level->loadLevel(saveSlots[slot].getLevelID());
level->loadNextLevel();
level->loadNextLevelData();
} else {
level->loadGame(slot);
}

View File

@ -2051,6 +2051,14 @@ struct Level : IGame {
controller->render(camera->frustum, mesh, type, room.flags.water);
}
void loadNextLevelData() {
isEnded = true;
char buf[64];
TR::getGameLevelFile(buf, level.version, nextLevel);
nextLevel = TR::LVL_MAX;
new Stream(buf, loadLevelAsync);
}
void update() {
if (isEnded) return;
@ -2121,11 +2129,7 @@ struct Level : IGame {
showStats = false;
return;
}
isEnded = true;
char buf[64];
TR::getGameLevelFile(buf, level.version, nextLevel);
nextLevel = TR::LVL_MAX;
new Stream(buf, loadLevelAsync);
loadNextLevelData();
return;
}