Skip to content

Commit

Permalink
load waterRendering information before the map; fix #5562
Browse files Browse the repository at this point in the history
  • Loading branch information
gajop committed May 16, 2017
1 parent b7bdead commit 2863b24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion rts/Game/Game.cpp
Expand Up @@ -35,6 +35,7 @@
#include "ExternalAI/SkirmishAIHandler.h"
#include "Rendering/WorldDrawer.h"
#include "Rendering/Env/IWater.h"
#include "Rendering/Env/WaterRendering.h"
#include "Rendering/Fonts/CFontTexture.h"
#include "Rendering/Fonts/glFont.h"
#include "Rendering/CommandDrawer.h"
Expand Down Expand Up @@ -463,6 +464,7 @@ void CGame::LoadMap(const std::string& mapName)
// simulation components
helper = new CGameHelper();

waterRendering->Init();
readMap = CReadMap::LoadMap(mapName);
groundBlockingObjectMap = new CGroundBlockingObjectMap(mapDims.mapSquares);
buildingMaskMap = new BuildingMaskMap();
Expand Down Expand Up @@ -2219,4 +2221,3 @@ bool CGame::ActionPressed(unsigned int key, const Action& action, bool isRepeat)

return (commandConsole.ExecuteAction(action));
}

2 changes: 0 additions & 2 deletions rts/Rendering/WorldDrawer.cpp
Expand Up @@ -8,7 +8,6 @@
#include "Rendering/Env/IGroundDecalDrawer.h"
#include "Rendering/Env/ISky.h"
#include "Rendering/Env/SunLighting.h"
#include "Rendering/Env/WaterRendering.h"
#include "Rendering/Env/ITreeDrawer.h"
#include "Rendering/Env/IWater.h"
#include "Rendering/CommandDrawer.h"
Expand Down Expand Up @@ -98,7 +97,6 @@ void CWorldDrawer::LoadPre() const

sky = ISky::GetSky();
sunLighting->Init();
waterRendering->Init();
}

void CWorldDrawer::LoadPost() const
Expand Down

0 comments on commit 2863b24

Please sign in to comment.