Fix Cargo>EjectOnDeath crash with multipile INotifyBlockingMove
This commit is contained in:
committed by
abcdefg30
parent
c983dda077
commit
1977e64e07
@@ -384,8 +384,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!inAir && positionable.CanEnterCell(self.Location, self, false))
|
||||
{
|
||||
self.World.AddFrameEndTask(w => w.Add(passenger));
|
||||
var nbm = passenger.TraitOrDefault<INotifyBlockingMove>();
|
||||
if (nbm != null)
|
||||
var nbms = passenger.TraitsImplementing<INotifyBlockingMove>();
|
||||
foreach (var nbm in nbms)
|
||||
nbm.OnNotifyBlockingMove(passenger, passenger);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user