Md5 hashes for maps, enemy AI changes HumanoidAnimController bugfixes, HitArmor sounds

This commit is contained in:
Regalis
2015-06-06 14:38:25 +03:00
parent 1f42e4a4db
commit 95c8e0f486
28 changed files with 411 additions and 137 deletions
+10 -3
View File
@@ -225,8 +225,15 @@ namespace Subsurface.Networking
int seed = inc.ReadInt32();
Game1.random = new Random(seed);
string mapFile = inc.ReadString();
Map.Load(mapFile);
string mapName = inc.ReadString();
string mapHash = inc.ReadString();
Game1.netLobbyScreen.TrySelectMap(mapName, mapHash);
//Map.Load(mapFile);
double durationMinutes = inc.ReadDouble();
@@ -316,7 +323,7 @@ namespace Subsurface.Networking
public void EndGame(string endMessage)
{
Map.Clear();
Map.Unload();
Game1.netLobbyScreen.Select();
+7 -3
View File
@@ -271,7 +271,9 @@ namespace Subsurface.Networking
int seed = DateTime.Now.Millisecond;
Game1.random = new Random(seed);
Map.Load(Game1.netLobbyScreen.SelectedMap);
Map selectedMap = Game1.netLobbyScreen.SelectedMap as Map;
selectedMap.Load();
Game1.gameSession = new GameSession("", false, Game1.netLobbyScreen.GameDuration, Game1.netLobbyScreen.SelectedMode);
Game1.gameSession.StartShift(1);
@@ -305,7 +307,9 @@ namespace Subsurface.Networking
msg.Write(seed);
msg.Write(Game1.netLobbyScreen.SelectedMap);
msg.Write(Game1.netLobbyScreen.SelectedMap.Name);
msg.Write(Game1.netLobbyScreen.SelectedMap.MapHash.MD5Hash);
msg.Write(Game1.netLobbyScreen.GameDuration.TotalMinutes);
WriteCharacterData(msg, client.name, client.character);
@@ -336,7 +340,7 @@ namespace Subsurface.Networking
public void EndGame(string endMessage)
{
Map.Clear();
Map.Unload();
gameStarted = false;