Skip to content

Commit

Permalink
Fix cargo ejecting when player loses.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Jan 30, 2018
1 parent 7ea6805 commit 5004e81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Traits/Cargo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void INotifyKilled.Killed(Actor self, AttackInfo e)
var positionable = passenger.Trait<IPositionable>();
positionable.SetPosition(passenger, self.Location);

if (!inAir && positionable.CanEnterCell(self.Location, self, false))
if (self.Owner.WinState != WinState.Lost && !inAir && positionable.CanEnterCell(self.Location, self, false))
{
self.World.AddFrameEndTask(w => w.Add(passenger));
var nbm = passenger.TraitOrDefault<INotifyBlockingMove>();
Expand Down

0 comments on commit 5004e81

Please sign in to comment.