mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 07:47:57 +03:00
Move particle init to proper function, always reinit objects on level reload
This commit is contained in:
parent
74e13fc678
commit
cb37bda329
3 changed files with 5 additions and 6 deletions
|
@ -208,6 +208,8 @@ void CustomObjects()
|
|||
|
||||
void InitializeObjects()
|
||||
{
|
||||
TENLog("Initializing objects...", LogLevel::Info);
|
||||
|
||||
AllocTR4Objects();
|
||||
AllocTR5Objects();
|
||||
|
||||
|
@ -250,9 +252,6 @@ void InitializeObjects()
|
|||
// User defined objects
|
||||
CustomObjects();
|
||||
|
||||
HairEffect.Initialize();
|
||||
InitializeSpecialEffects();
|
||||
|
||||
NumRPickups = 0;
|
||||
CurrentSequence = 0;
|
||||
SequenceResults[0][1][2] = 0;
|
||||
|
|
|
@ -389,6 +389,7 @@ GameStatus DoLevel(int levelIndex, bool loadGame)
|
|||
InitializeCamera();
|
||||
InitializeSpotCamSequences(isTitle);
|
||||
InitializeItemBoxData();
|
||||
InitializeSpecialEffects();
|
||||
|
||||
// Initialize scripting.
|
||||
InitializeScripting(levelIndex, loadGame);
|
||||
|
|
|
@ -219,6 +219,8 @@ std::string ReadString()
|
|||
|
||||
void LoadItems()
|
||||
{
|
||||
InitializeObjects();
|
||||
|
||||
g_Level.NumItems = ReadCount();
|
||||
TENLog("Moveables: " + std::to_string(g_Level.NumItems), LogLevel::Info);
|
||||
|
||||
|
@ -454,9 +456,6 @@ void LoadObjects()
|
|||
Objects[objNum].animIndex = ReadInt32();
|
||||
}
|
||||
|
||||
TENLog("Initializing objects...", LogLevel::Info);
|
||||
InitializeObjects();
|
||||
|
||||
int staticCount = ReadCount();
|
||||
TENLog("Statics: " + std::to_string(staticCount), LogLevel::Info);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue