mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Unit Motion - make sure units that die while moving don't keep their obstruction
Introduced by 70e22e2923. PositionChanged messages sent between
MT_Destroy handling in CmpObstruction and the actual destruction of the
component could re-recreate an obstruction, which would then live
forever in the obstruction manager.
This prevents that by de-activating the obstruction when it is
destroyed, so that further PositionChanged messages do nothing.
Differential Revision: https://code.wildfiregames.com/D2060
This was SVN commit r22451.
This commit is contained in:
parent
bbc2e84160
commit
54f7a09a54
1 changed files with 2 additions and 0 deletions
|
|
@ -363,6 +363,8 @@ public:
|
|||
if (!cmpObstructionManager)
|
||||
break; // error
|
||||
|
||||
// Deactivate the obstruction in case PositionChanged messages are sent after this.
|
||||
m_Active = false;
|
||||
cmpObstructionManager->RemoveShape(m_Tag);
|
||||
m_Tag = tag_t();
|
||||
if(m_Type == CLUSTER)
|
||||
|
|
|
|||
Loading…
Reference in a new issue