split bridges to use different actor types for the various bridge types

This commit is contained in:
Chris Forbes
2010-01-19 12:37:11 +13:00
parent eb81076bce
commit df8f37c5e4
5 changed files with 57 additions and 19 deletions

View File

@@ -50,7 +50,7 @@ namespace OpenRa
if (replacedTiles.Any())
{
var a = w.CreateActor("Bridge", new int2(ni, nj), null);
var a = w.CreateActor(template.Bridge, new int2(ni, nj), null);
var br = a.traits.Get<Bridge>();
br.SetTiles(w, template, replacedTiles);
}
@@ -58,7 +58,7 @@ namespace OpenRa
static bool IsBridge(World w, ushort t)
{
return w.TileSet.walk[t].IsBridge;
return w.TileSet.walk[t].Bridge != null;
}
}
}