Mod version validation

- Game.CurrentMods property to query the current mods when no orderManager accessible
- Server sends mod versions to master server on ping
- Client sends mod versions on handshake response
- Validate match on server side of handshake, not client side
This commit is contained in:
alzeih
2011-01-08 00:25:30 +13:00
committed by Chris Forbes
parent 8264c6c8dc
commit 5c343caeaf
5 changed files with 57 additions and 50 deletions

View File

@@ -194,6 +194,11 @@ namespace OpenRA
{
get { return orderManager.Connection.LocalClientId == 0; }
}
public static Dictionary<String, Mod> CurrentMods
{
get { return Mod.AllMods.Where( k => orderManager.LobbyInfo.GlobalSettings.Mods.Contains( k.Key )).ToDictionary( k => k.Key, k => k.Value ); }
}
static Modifiers modifiers;
public static Modifiers GetModifierKeys() { return modifiers; }