Add MPSpawnUnits>BaseActorOffset

This commit is contained in:
Mustafa Alperen Seki
2018-10-29 19:58:23 +03:00
committed by reaperrr
parent d46e47d16d
commit 5a0c1459b2
2 changed files with 5 additions and 2 deletions

View File

@@ -26,9 +26,12 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Only available when selecting one of these factions.", "Leave empty for no restrictions.")]
public readonly HashSet<string> Factions = new HashSet<string>();
[Desc("The mobile construction vehicle.")]
[Desc("The actor at the center, usually the mobile construction vehicle.")]
public readonly string BaseActor = null;
[Desc("Offset from the spawn point, BaseActor will spawn at.")]
public readonly CVec BaseActorOffset = CVec.Zero;
[Desc("A group of units ready to defend or scout.")]
public readonly string[] SupportActors = { };

View File

@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits
{
w.CreateActor(unitGroup.BaseActor.ToLowerInvariant(), new TypeDictionary
{
new LocationInit(sp),
new LocationInit(sp + unitGroup.BaseActorOffset),
new OwnerInit(p),
new SkipMakeAnimsInit(),
new FacingInit(unitGroup.BaseActorFacing < 0 ? w.SharedRandom.Next(256) : unitGroup.BaseActorFacing),