mirror of
https://github.com/XProger/OpenLara.git
synced 2025-07-31 10:20:27 +02:00
add forced quick load
This commit is contained in:
@@ -226,8 +226,9 @@ namespace Game {
|
|||||||
|
|
||||||
if (slot > -1) {
|
if (slot > -1) {
|
||||||
if (forced) {
|
if (forced) {
|
||||||
|
level->loadGame(slot);
|
||||||
level->loadLevel(saveSlots[slot].getLevelID());
|
level->loadLevel(saveSlots[slot].getLevelID());
|
||||||
level->loadNextLevel();
|
level->loadNextLevelData();
|
||||||
} else {
|
} else {
|
||||||
level->loadGame(slot);
|
level->loadGame(slot);
|
||||||
}
|
}
|
||||||
|
14
src/level.h
14
src/level.h
@@ -2051,6 +2051,14 @@ struct Level : IGame {
|
|||||||
controller->render(camera->frustum, mesh, type, room.flags.water);
|
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() {
|
void update() {
|
||||||
if (isEnded) return;
|
if (isEnded) return;
|
||||||
|
|
||||||
@@ -2121,11 +2129,7 @@ struct Level : IGame {
|
|||||||
showStats = false;
|
showStats = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isEnded = true;
|
loadNextLevelData();
|
||||||
char buf[64];
|
|
||||||
TR::getGameLevelFile(buf, level.version, nextLevel);
|
|
||||||
nextLevel = TR::LVL_MAX;
|
|
||||||
new Stream(buf, loadLevelAsync);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user