1
0
forked from 0ad/0ad

Fix pathfinding and territories not being recomputed when water height changes.

This was SVN commit r15227.
This commit is contained in:
Ykkrosh 2014-05-26 13:45:10 +00:00
parent 41f62cd3ff
commit 1871daab0d
3 changed files with 4 additions and 0 deletions

View File

@ -218,6 +218,7 @@ void CCmpPathfinder::HandleMessage(const CMessage& msg, bool UNUSED(global))
break;
}
case MT_TerrainChanged:
case MT_WaterChanged:
{
// TODO: we ought to only bother updating the dirtied region
m_TerrainDirty = true;

View File

@ -174,6 +174,7 @@ public:
componentManager.SubscribeToMessageType(MT_Update);
componentManager.SubscribeToMessageType(MT_RenderSubmit); // for debug overlays
componentManager.SubscribeToMessageType(MT_TerrainChanged);
componentManager.SubscribeToMessageType(MT_WaterChanged);
componentManager.SubscribeToMessageType(MT_TurnStart);
}

View File

@ -68,6 +68,7 @@ public:
componentManager.SubscribeGloballyToMessageType(MT_PositionChanged);
componentManager.SubscribeGloballyToMessageType(MT_ValueModification);
componentManager.SubscribeToMessageType(MT_TerrainChanged);
componentManager.SubscribeToMessageType(MT_WaterChanged);
componentManager.SubscribeToMessageType(MT_Update);
componentManager.SubscribeToMessageType(MT_Interpolate);
componentManager.SubscribeToMessageType(MT_RenderSubmit);
@ -173,6 +174,7 @@ public:
break;
}
case MT_TerrainChanged:
case MT_WaterChanged:
{
MakeDirty();
break;