mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
Fixed deadlock in WaterAdopter
This commit is contained in:
@ -35,7 +35,6 @@ void WaterAdopter::process()
|
||||
void WaterAdopter::init()
|
||||
{
|
||||
//make dependencies
|
||||
DEPENDENCY_ALL(WaterAdopter);
|
||||
DEPENDENCY(TownPlacer);
|
||||
POSTFUNCTION(ConnectionsPlacer);
|
||||
POSTFUNCTION(TreasurePlacer);
|
||||
@ -224,7 +223,10 @@ void WaterAdopter::createWater(EWaterContent::EWaterContent waterContent)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Zone::Lock waterLock(map.getZones()[waterZoneId]->areaMutex);
|
||||
map.getZones()[waterZoneId]->area().unite(waterArea);
|
||||
}
|
||||
Zone::Lock lock(zone.areaMutex);
|
||||
zone.area().subtract(waterArea);
|
||||
zone.areaPossible().subtract(waterArea);
|
||||
|
Reference in New Issue
Block a user