Skip to content

Commit

Permalink
[world] fixed an issue where upon re-loading worlds, the game would n…
Browse files Browse the repository at this point in the history
…ot shutdown
  • Loading branch information
PanosK92 committed Jan 29, 2025
1 parent a42eaf2 commit f29ed53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,13 @@ namespace spartan

void Game::Load(DefaultWorld default_world)
{
// shutdown current world/logic
Game::Shutdown();

// clear all entities and their resources (and memory)
World::Clear();

// load whatever needs to be loaded
ThreadPool::AddTask([default_world]()
{
ProgressTracker::SetGlobalLoadingState(true);
Expand Down

0 comments on commit f29ed53

Please sign in to comment.