mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Store TerrainType by havlue and handle by reference
This commit is contained in:
@@ -95,7 +95,7 @@ void CDrawTerrainOperation::execute()
|
||||
for(const auto & pos : terrainSel.getSelectedItems())
|
||||
{
|
||||
auto & tile = map->getTile(pos);
|
||||
tile.terType = VLC->terrainTypeHandler->terrains()[terType];
|
||||
tile.terType = const_cast<TerrainType*>(&VLC->terrainTypeHandler->terrains()[terType]);
|
||||
invalidateTerrainViews(pos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user