Added a TraitOrDefault for Mobile and with that a check for mobile.IsMoving to RenderLandingCraft.

This commit is contained in:
Taryn
2014-02-22 12:45:25 -06:00
parent dcac88b27b
commit 3d7815d8c1

View File

@@ -10,6 +10,7 @@
using System.Linq;
using OpenRA.Traits;
using OpenRA.Mods.RA.Move;
namespace OpenRA.Mods.RA.Render
{
@@ -39,7 +40,11 @@ namespace OpenRA.Mods.RA.Render
public bool ShouldBeOpen()
{
if (self.CenterPosition.Z > 0)
var mobile = self.TraitOrDefault<Mobile>();
if (mobile == null)
return false;
if (self.CenterPosition.Z > 0 || mobile.IsMoving)
return false;
return cargo.CurrentAdjacentCells