Browse Source

More style tweaks

Tomasz Zieliński 3 năm trước cách đây
mục cha
commit
cd3a1a02c2
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      client/battle/CBattleInterface.cpp
  2. 2 2
      lib/mapping/CMap.cpp

+ 2 - 2
client/battle/CBattleInterface.cpp

@@ -456,8 +456,8 @@ CBattleInterface::~CBattleInterface()
 
 	if (adventureInt && adventureInt->selection)
 	{
-		const auto * terrain = LOCPLINT->cb->getTile(adventureInt->selection->visitablePos())->terType;
-		CCS->musich->playMusicFromSet("terrain", terrain->name, true);
+		const auto & terrain = *(LOCPLINT->cb->getTile(adventureInt->selection->visitablePos())->terType);
+		CCS->musich->playMusicFromSet("terrain", terrain.name, true);
 	}
 	animsAreDisplayed.setn(false);
 }

+ 2 - 2
lib/mapping/CMap.cpp

@@ -126,14 +126,14 @@ CCastleEvent::CCastleEvent() : town(nullptr)
 TerrainTile::TerrainTile():
 	terType(nullptr),
 	terView(0),
+	riverType(VLC->terrainTypeHandler->rivers()[0]),
 	riverDir(0),
+	roadType(VLC->terrainTypeHandler->roads()[0]),
 	roadDir(0),
 	extTileFlags(0),
 	visitable(false),
 	blocked(false)
 {
-	riverType = VLC->terrainTypeHandler->rivers()[0];
-	roadType = VLC->terrainTypeHandler->roads()[0];
 }
 
 bool TerrainTile::entrableTerrain(const TerrainTile * from) const