MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / registerWorld

Method registerWorld

src/engine/GameSession.cpp:113–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113Handle::WorldHandle GameSession::registerWorld(std::unique_ptr<World::WorldInstance> pWorldInstance)
114{
115 if (pWorldInstance == nullptr)
116 return Handle::WorldHandle::makeInvalidHandle();
117
118 World::WorldInstance& world = *pWorldInstance;
119
120 m_Engine.onWorldCreated(world.getMyHandle());
121 m_WorldInstances.push_back(std::move(pWorldInstance));
122 m_Worlds.push_back(world.getMyHandle());
123
124 return world.getMyHandle();
125}
126
127void GameSession::removeWorld(Handle::WorldHandle world)
128{

Callers 3

switchToWorldMethod · 0.80
startNewGameMethod · 0.80
loadSaveGameSlotMethod · 0.80

Calls 3

getMyHandleMethod · 0.80
push_backMethod · 0.80
onWorldCreatedMethod · 0.45

Tested by

no test coverage detected