mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 03:06:29 +00:00
Delete rally point marker entity when entity is destroyed. Fixes #1254.
This was SVN commit r11409.
This commit is contained in:
@@ -80,6 +80,7 @@ public:
|
||||
componentManager.SubscribeToMessageType(MT_RenderSubmit);
|
||||
componentManager.SubscribeToMessageType(MT_OwnershipChanged);
|
||||
componentManager.SubscribeToMessageType(MT_TurnStart);
|
||||
componentManager.SubscribeToMessageType(MT_Destroy);
|
||||
// TODO: should probably also listen to movement messages (unlikely to happen in-game, but might occur inside atlas)
|
||||
}
|
||||
|
||||
@@ -239,6 +240,15 @@ public:
|
||||
UpdateOverlayLines(); // check for changes to the SoD and update the overlay lines accordingly
|
||||
}
|
||||
break;
|
||||
case MT_Destroy:
|
||||
{
|
||||
if (m_MarkerEntityId != INVALID_ENTITY)
|
||||
{
|
||||
GetSimContext().GetComponentManager().DestroyComponentsSoon(m_MarkerEntityId);
|
||||
m_MarkerEntityId = INVALID_ENTITY;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user