Added straightforward hover behavior for all units. Give a unit a nonzero Altitude: in its Mobile: block and the WithShadow: trait to make it hover.
This commit is contained in:
@@ -95,6 +95,14 @@ namespace OpenRA.Mods.RA.Move
|
||||
public override Activity Tick( Actor self )
|
||||
{
|
||||
var mobile = self.Trait<Mobile>();
|
||||
var info = self.Info.Traits.Get<MobileInfo>();
|
||||
|
||||
if (mobile.Altitude != info.Altitude)
|
||||
{
|
||||
if (mobile.Altitude < info.Altitude)
|
||||
++mobile.Altitude;
|
||||
return this;
|
||||
}
|
||||
|
||||
if (destination == mobile.toCell)
|
||||
return NextActivity;
|
||||
|
||||
Reference in New Issue
Block a user