movement can be null here and lead to a crash

This commit is contained in:
Matthias Mailänder
2014-02-09 18:20:22 +01:00
parent 449fe81bf0
commit 35bf03aade

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Move
public override Activity Tick(Actor self)
{
var positionable = self.Trait<IPositionable>();
var movement = self.Trait<IMove>();
var movement = self.TraitOrDefault<IMove>();
var pos = length > 1
? WPos.Lerp(start, end, ticks, length - 1)