1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-14 00:54:05 +02:00

fix minor bugs

This commit is contained in:
XProger
2018-10-28 23:13:03 +03:00
parent 0b19529e4f
commit 8f6f2a2a76
3 changed files with 8 additions and 7 deletions

View File

@@ -560,9 +560,9 @@ struct Inventory {
inv->skipVideo();
}
Inventory() : itemsCount(0) {
Inventory() : game(NULL), itemsCount(0) {
memset(background, 0, sizeof(background));
reset(NULL);
reset();
}
~Inventory() {
@@ -581,9 +581,8 @@ struct Inventory {
}
}
void reset(IGame *game) {
void reset() {
clear();
this->game = game;
active = false;
chosen = false;
index = targetIndex = 0;

View File

@@ -862,8 +862,10 @@ struct Level : IGame {
}
*/
inventory->game = this;
if (!level.isCutsceneLevel()) {
inventory->reset(this);
inventory->reset();
memset(&saveStats, 0, sizeof(saveStats));
saveStats.level = level.id;
}

View File

@@ -17,9 +17,9 @@ enum StringID {
, STR_HINT_SAVING_ERROR
, STR_OFF
, STR_ON
, STR_SPLIT
, STR_YES
, STR_NO
, STR_SPLIT
, STR_VR
, STR_QUALITY_LOW
, STR_QUALITY_MEDIUM
@@ -144,9 +144,9 @@ const char *STR[STR_MAX] = {
, "SAVING ERROR!"
, "Off"
, "On"
, "Split Screen"
, "YES"
, "NO"
, "Split Screen"
, "VR"
, "Low"
, "Medium"