mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix NPC voice and mount sound managers not initializing in online mode
The cachedAssetManager was only set in loadTestTerrain() for single-player mode. In online mode (loadTerrainArea), it was never set, so NPC voice and mount sound managers never initialized. Now gets asset manager from Application instance if not already cached. This will enable file probing and voice/sound loading.
This commit is contained in:
parent
ec457a37c8
commit
b8375627e9
1 changed files with 6 additions and 1 deletions
|
|
@ -2168,7 +2168,12 @@ bool Renderer::loadTerrainArea(const std::string& mapName, int centerX, int cent
|
|||
|
||||
terrainLoaded = true;
|
||||
|
||||
// Initialize music manager with asset manager (if available from loadTestTerrain)
|
||||
// Get asset manager from Application if not cached yet
|
||||
if (!cachedAssetManager) {
|
||||
cachedAssetManager = core::Application::getInstance().getAssetManager();
|
||||
}
|
||||
|
||||
// Initialize music manager with asset manager
|
||||
if (musicManager && cachedAssetManager) {
|
||||
if (!musicManager->isInitialized()) {
|
||||
musicManager->initialize(cachedAssetManager);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue