mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
chore: Speed up and cleanup level and zone loading; Add safer asset buffer reading (#1314)
* Remove std::couts littered throughout the base * working End of optimizations for now going faster * Remove extraneous compare function std::less<LWOSCENEID> already does this in a map. * gaming * Update Zone.cpp * dlu is moving to bitbucket again * Update Level.cpp --------- Co-authored-by: Jettford <mrjettbradford@gmail.com>
This commit is contained in:
@@ -94,33 +94,6 @@ void dZoneManager::LoadZone(const LWOZONEID& zoneID) {
|
||||
m_pZone = new Zone(zoneID.GetMapID(), zoneID.GetInstanceID(), zoneID.GetCloneID());
|
||||
}
|
||||
|
||||
void dZoneManager::NotifyZone(const dZoneNotifier& notifier, const LWOOBJID& objectID) {
|
||||
switch (notifier) {
|
||||
case dZoneNotifier::SpawnedObjectDestroyed:
|
||||
break;
|
||||
case dZoneNotifier::SpawnedChildObjectDestroyed:
|
||||
break;
|
||||
case dZoneNotifier::ReloadZone:
|
||||
LOG("Forcing reload of zone %i", m_ZoneID.GetMapID());
|
||||
LoadZone(m_ZoneID);
|
||||
|
||||
m_pZone->Initalize();
|
||||
break;
|
||||
case dZoneNotifier::UserJoined:
|
||||
break;
|
||||
case dZoneNotifier::UserMoved:
|
||||
break;
|
||||
case dZoneNotifier::PrintAllGameObjects:
|
||||
m_pZone->PrintAllGameObjects();
|
||||
break;
|
||||
case dZoneNotifier::InvalidNotifier:
|
||||
LOG("Got an invalid zone notifier.");
|
||||
break;
|
||||
default:
|
||||
LOG("Unknown zone notifier: %i", int(notifier));
|
||||
}
|
||||
}
|
||||
|
||||
void dZoneManager::AddSpawner(LWOOBJID id, Spawner* spawner) {
|
||||
m_Spawners.insert_or_assign(id, spawner);
|
||||
}
|
||||
|
Reference in New Issue
Block a user