This commit is contained in:
Chris Forbes
2009-12-28 14:25:36 +13:00
10 changed files with 97 additions and 98 deletions

View File

@@ -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) { }

View File

@@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -181,9 +181,9 @@
<Compile Include="Traits\Fake.cs" />
<Compile Include="Traits\Harvester.cs" />
<Compile Include="Traits\Helicopter.cs" />
<Compile Include="Traits\Infantry.cs" />
<Compile Include="Traits\InvisibleToOthers.cs" />
<Compile Include="Traits\Minelayer.cs" />
<Compile Include="Traits\SquishByTank.cs" />
<Compile Include="Traits\Plane.cs" />
<Compile Include="Traits\ProductionQueue.cs" />
<Compile Include="Traits\ProductionSurround.cs" />
@@ -258,11 +258,11 @@
<None Include="Graphics\Graphics.cd" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -81,7 +81,7 @@ namespace OpenRa.Game.Traits.Activities
var nextCell = PopPath( self, mobile );
if( nextCell == null )
return NextActivity;
return this;
int2 dir = nextCell.Value - mobile.fromCell;
var firstFacing = Util.GetFacing( dir, unit.Facing );

View File

@@ -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;