fix license headers; fix crate spawn for non-128x128 maps

This commit is contained in:
Chris Forbes
2010-03-18 13:40:29 +13:00
parent 07b0c77db4
commit a7c22804cb
10 changed files with 172 additions and 36 deletions

View File

@@ -212,6 +212,13 @@ namespace OpenRA
: (edge ? w.Map.YOffset : w.Map.YOffset + w.Map.Height));
}
public static int2 ChooseRandomCell(this World w, Thirdparty.Random r)
{
return new int2(
r.Next(w.Map.XOffset, w.Map.XOffset + w.Map.Width),
r.Next(w.Map.YOffset, w.Map.YOffset + w.Map.Height));
}
public static IEnumerable<CountryInfo> GetCountries(this World w)
{
return w.WorldActor.Info.Traits.WithInterface<CountryInfo>();