Skip to content

Commit

Permalink
Post rebase AS fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Feb 12, 2024
1 parent 973074f commit 3015bcd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OpenRA.Mods.AS/Traits/Attack/AttackOpenTopped.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public override void DoAttack(Actor self, in Target target)
paxFacing[a.Actor].Facing = muzzleFacing;
paxPos[a.Actor].SetCenterPosition(a.Actor, pos + PortOffset(self, port));

if (!a.CheckFire(a.Actor, facing, target, true))
if (!a.CheckFire(a.Actor, facing, target))
continue;

if (a.Info.MuzzleSequence != null)
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.AS/Traits/Attack/AttackPrismSupported.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public virtual void FireSupportArmament(Actor self, in Target target, Actor buff
var offsetedTarget = Target.FromPos(target.CenterPosition + receiverTrait.info.ReceiverOffset);

var supportArmament = self.TraitsImplementing<Armament>().First(a => a.Info.Name == info.SupportArmament);
supportArmament.CheckFire(self, facing, offsetedTarget, true);
supportArmament.CheckFire(self, facing, offsetedTarget);

// Grant the buff condition
receiverTrait.AddBuffStack(buffReceiver);
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.AS/Traits/PointDefense.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bool IPointDefense.Destroy(WPos position, Player attacker, BitSet<string> types)
self.World.AddFrameEndTask(w =>
{
if (!self.IsDead)
armament.CheckFire(self, null, Target.FromPos(position), true);
armament.CheckFire(self, null, Target.FromPos(position));
});
return true;
}
Expand Down
10 changes: 6 additions & 4 deletions OpenRA.Mods.AS/Traits/SharedPassenger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,23 @@ public class SharedPassengerInfo : TraitInfo
[Desc("Cursor to display when unable to enter target actor.")]
public readonly string EnterBlockedCursor = "enter-blocked";

public override object Create(ActorInitializer init) { return new SharedPassenger(this); }
public override object Create(ActorInitializer init) { return new SharedPassenger(this, init.Self); }
}

public class SharedPassenger : IIssueOrder, IResolveOrder, IOrderVoice, INotifyRemovedFromWorld, INotifyEnteredSharedCargo, INotifyExitedSharedCargo, INotifyKilled, IObservesVariables
{
public readonly SharedPassengerInfo Info;
public Actor Transport;
readonly Actor self;
bool requireForceMove;

int anyCargoToken = Actor.InvalidConditionToken;
int specificCargoToken = Actor.InvalidConditionToken;

public SharedPassenger(SharedPassengerInfo info)
public SharedPassenger(SharedPassengerInfo info, Actor self)
{
Info = info;
this.self = self;
}

public SharedCargo ReservedCargo { get; private set; }
Expand All @@ -79,13 +81,13 @@ IEnumerable<IOrderTargeter> IIssueOrder.Orders
{
get
{
yield return new EnterAlliedActorTargeter<SharedCargoInfo>(
yield return new EnterActorTargeter<SharedCargoInfo>(
"EnterSharedTransport",
5,
Info.EnterCursor,
Info.EnterBlockedCursor,
IsCorrectCargoType,
CanEnter);
target => self.Owner.IsAlliedWith(target.Owner) && CanEnter(target));
}
}

Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void ITick.Tick(Actor self)
}

foreach (var a in activeArmaments)
a.CheckFire(self, facing, target, true);
a.CheckFire(self, facing, target);

ticks++;

Expand Down

0 comments on commit 3015bcd

Please sign in to comment.