mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fixed mirrors on savegame reloading
This commit is contained in:
parent
22460e0edf
commit
a6687654b0
2 changed files with 3 additions and 2 deletions
|
@ -980,7 +980,6 @@ void FreeLevel(bool partial)
|
||||||
g_Level.VolumeEventSets.resize(0);
|
g_Level.VolumeEventSets.resize(0);
|
||||||
g_Level.GlobalEventSets.resize(0);
|
g_Level.GlobalEventSets.resize(0);
|
||||||
g_Level.LoopedEventSetIndices.resize(0);
|
g_Level.LoopedEventSetIndices.resize(0);
|
||||||
g_Level.Mirrors.resize(0);
|
|
||||||
|
|
||||||
g_GameScript->FreeLevelScripts();
|
g_GameScript->FreeLevelScripts();
|
||||||
g_GameScriptEntities->FreeEntities();
|
g_GameScriptEntities->FreeEntities();
|
||||||
|
@ -1010,6 +1009,7 @@ void FreeLevel(bool partial)
|
||||||
g_Level.Commands.resize(0);
|
g_Level.Commands.resize(0);
|
||||||
g_Level.Frames.resize(0);
|
g_Level.Frames.resize(0);
|
||||||
g_Level.Sprites.resize(0);
|
g_Level.Sprites.resize(0);
|
||||||
|
g_Level.Mirrors.resize(0);
|
||||||
g_Level.SoundDetails.resize(0);
|
g_Level.SoundDetails.resize(0);
|
||||||
g_Level.SoundMap.resize(0);
|
g_Level.SoundMap.resize(0);
|
||||||
g_Level.FloorData.resize(0);
|
g_Level.FloorData.resize(0);
|
||||||
|
@ -1525,6 +1525,7 @@ void LoadMirrors()
|
||||||
|
|
||||||
TENLog("Mirror count: " + std::to_string(mirrorCount), LogLevel::Info);
|
TENLog("Mirror count: " + std::to_string(mirrorCount), LogLevel::Info);
|
||||||
g_Level.Mirrors.reserve(mirrorCount);
|
g_Level.Mirrors.reserve(mirrorCount);
|
||||||
|
|
||||||
for (int i = 0; i < mirrorCount; i++)
|
for (int i = 0; i < mirrorCount; i++)
|
||||||
{
|
{
|
||||||
auto& mirror = g_Level.Mirrors.emplace_back();
|
auto& mirror = g_Level.Mirrors.emplace_back();
|
||||||
|
|
|
@ -136,7 +136,7 @@ struct LEVEL
|
||||||
std::vector<int> LoopedEventSetIndices = {};
|
std::vector<int> LoopedEventSetIndices = {};
|
||||||
std::vector<AI_OBJECT> AIObjects = {};
|
std::vector<AI_OBJECT> AIObjects = {};
|
||||||
std::vector<SPRITE> Sprites = {};
|
std::vector<SPRITE> Sprites = {};
|
||||||
std::vector<MirrorInfo> Mirrors = {};
|
std::vector<MirrorInfo> Mirrors = {};
|
||||||
|
|
||||||
// Texture data
|
// Texture data
|
||||||
TEXTURE SkyTexture = {};
|
TEXTURE SkyTexture = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue