fix crash when sending HELI to FIX
This commit is contained in:
@@ -60,8 +60,8 @@ namespace OpenRa.Game.Traits
|
|||||||
if (res != null)
|
if (res != null)
|
||||||
reservation = res.Reserve(self);
|
reservation = res.Reserve(self);
|
||||||
|
|
||||||
var productionInfo = order.TargetActor.Info.Traits.Get<ProductionInfo>();
|
var productionInfo = order.TargetActor.Info.Traits.GetOrDefault<ProductionInfo>();
|
||||||
var offset = productionInfo.SpawnOffset;
|
var offset = productionInfo != null ? productionInfo.SpawnOffset : null;
|
||||||
var offsetVec = offset != null ? new float2(offset[0], offset[1]) : float2.Zero;
|
var offsetVec = offset != null ? new float2(offset[0], offset[1]) : float2.Zero;
|
||||||
|
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
|
|||||||
Reference in New Issue
Block a user