Move dZoneManager to game namespace (#1143)

* convert zone manager to game namespace

* Destroy logger last
This commit is contained in:
David Markowitz
2023-07-17 15:55:33 -07:00
committed by GitHub
parent 080a833144
commit 3e3148e910
55 changed files with 169 additions and 175 deletions

View File

@@ -170,7 +170,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
// After we've done our thing, tell the client they're ready
GameMessages::SendPlayerReady(entity, sysAddr);
GameMessages::SendPlayerReady(dZoneManager::Instance()->GetZoneControlObject(), sysAddr);
GameMessages::SendPlayerReady(Game::zoneManager->GetZoneControlObject(), sysAddr);
break;
}

View File

@@ -2355,13 +2355,13 @@ void GameMessages::HandleStartBuildingWithItem(RakNet::BitStream* inStream, Enti
void GameMessages::HandlePropertyEditorBegin(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
PropertyManagementComponent::Instance()->OnStartBuilding();
dZoneManager::Instance()->GetZoneControlObject()->OnZonePropertyEditBegin();
Game::zoneManager->GetZoneControlObject()->OnZonePropertyEditBegin();
}
void GameMessages::HandlePropertyEditorEnd(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
PropertyManagementComponent::Instance()->OnFinishBuilding();
dZoneManager::Instance()->GetZoneControlObject()->OnZonePropertyEditEnd();
Game::zoneManager->GetZoneControlObject()->OnZonePropertyEditEnd();
}
void GameMessages::HandlePropertyContentsFromClient(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
@@ -2373,7 +2373,7 @@ void GameMessages::HandlePropertyContentsFromClient(RakNet::BitStream* inStream,
}
void GameMessages::HandlePropertyModelEquipped(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
dZoneManager::Instance()->GetZoneControlObject()->OnZonePropertyModelEquipped();
Game::zoneManager->GetZoneControlObject()->OnZonePropertyModelEquipped();
}
void GameMessages::HandlePlacePropertyModel(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
@@ -2599,7 +2599,7 @@ void GameMessages::HandleBBBSaveRequest(RakNet::BitStream* inStream, Entity* ent
GeneralUtils::SetBit(blueprintID, eObjectBits::PERSISTENT);
//We need to get the propertyID: (stolen from Wincent's propertyManagementComp)
const auto& worldId = dZoneManager::Instance()->GetZone()->GetZoneID();
const auto& worldId = Game::zoneManager->GetZone()->GetZoneID();
const auto zoneId = worldId.GetMapID();
const auto cloneId = worldId.GetCloneID();
@@ -4137,7 +4137,7 @@ void GameMessages::HandleRacingClientReady(RakNet::BitStream* inStream, Entity*
return;
}
auto* racingControlComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent<RacingControlComponent>();
auto* racingControlComponent = Game::zoneManager->GetZoneControlObject()->GetComponent<RacingControlComponent>();
if (racingControlComponent == nullptr) {
return;
@@ -4185,7 +4185,7 @@ void GameMessages::HandleRequestDie(RakNet::BitStream* inStream, Entity* entity,
inStream->Read(lootOwnerID);
}
auto* zoneController = dZoneManager::Instance()->GetZoneControlObject();
auto* zoneController = Game::zoneManager->GetZoneControlObject();
auto* racingControlComponent = zoneController->GetComponent<RacingControlComponent>();
@@ -4228,7 +4228,7 @@ void GameMessages::HandleRacingPlayerInfoResetFinished(RakNet::BitStream* inStre
return;
}
auto* zoneController = dZoneManager::Instance()->GetZoneControlObject();
auto* zoneController = Game::zoneManager->GetZoneControlObject();
auto* racingControlComponent = zoneController->GetComponent<RacingControlComponent>();
@@ -4258,7 +4258,7 @@ void GameMessages::HandleUpdatePropertyPerformanceCost(RakNet::BitStream* inStre
if (performanceCost == 0.0f) return;
auto zone = dZoneManager::Instance()->GetZone();
auto zone = Game::zoneManager->GetZone();
const auto& worldId = zone->GetZoneID();
const auto cloneId = worldId.GetCloneID();
const auto zoneId = worldId.GetMapID();
@@ -4990,7 +4990,7 @@ void GameMessages::HandleFireEventServerSide(RakNet::BitStream* inStream, Entity
}
if (mapId == 0) {
mapId = dZoneManager::Instance()->GetZoneID().GetMapID(); // Fallback to sending the player back to the same zone.
mapId = Game::zoneManager->GetZoneID().GetMapID(); // Fallback to sending the player back to the same zone.
}
Game::logger->Log("FireEventServerSide", "Player %llu has requested zone transfer to (%i, %i).", sender->GetObjectID(), (int)mapId, (int)cloneId);