presence of the trait is enough; don't need to check a legacy flag too.
This commit is contained in:
@@ -68,7 +68,6 @@ namespace OpenRa.Game.GameRules
|
||||
|
||||
public class InfantryInfo : MobileInfo
|
||||
{
|
||||
public readonly bool Crushable = true; // also on VehicleInfo, but with a different default
|
||||
public readonly bool C4 = false;
|
||||
public readonly bool FraidyCat = false;
|
||||
public readonly bool Infiltrate = false;
|
||||
@@ -80,7 +79,6 @@ namespace OpenRa.Game.GameRules
|
||||
|
||||
public class VehicleInfo : MobileInfo
|
||||
{
|
||||
public readonly bool Crushable = false;
|
||||
public readonly bool Tracked = false;
|
||||
|
||||
public VehicleInfo(string name) : base(name) { }
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
<Compile Include="Traits\Fake.cs" />
|
||||
<Compile Include="Traits\Harvester.cs" />
|
||||
<Compile Include="Traits\Helicopter.cs" />
|
||||
<Compile Include="Traits\Infantry.cs" />
|
||||
<Compile Include="Traits\SquishByTank.cs" />
|
||||
<Compile Include="Traits\Plane.cs" />
|
||||
<Compile Include="Traits\ProductionQueue.cs" />
|
||||
<Compile Include="Traits\ProductionSurround.cs" />
|
||||
|
||||
@@ -5,10 +5,10 @@ using OpenRa.Game.GameRules;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class Infantry : ICrushable
|
||||
class SquishByTank : ICrushable
|
||||
{
|
||||
readonly Actor self;
|
||||
public Infantry(Actor self)
|
||||
public SquishByTank(Actor self)
|
||||
{
|
||||
this.self = self;
|
||||
}
|
||||
@@ -26,7 +26,6 @@ namespace OpenRa.Game.Traits
|
||||
public bool IsCrushableBy(UnitMovementType umt, Player player)
|
||||
{
|
||||
if (player == Game.LocalPlayer) return false;
|
||||
if (!(self.Info as InfantryInfo).Crushable) return false;
|
||||
switch (umt)
|
||||
{
|
||||
case UnitMovementType.Track: return true;
|
||||
Reference in New Issue
Block a user