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
+13 -10
View File
@@ -56,23 +56,23 @@ namespace Subsurface
new GUITextBlock(new Rectangle(0, 30, 0, 30), "Selected map:", Color.Transparent, Color.Black, Alignment.Left, menuTabs[(int)Tabs.NewGame]);
mapList = new GUIListBox(new Rectangle(0, 60, 200, 400), Color.White, menuTabs[1]);
string[] mapFilePaths = Map.GetMapFilePaths();
if (mapFilePaths!=null)
{
foreach (string s in mapFilePaths)
//string[] mapFilePaths = Map.GetMapFilePaths();
//if (mapFilePaths!=null)
//{
foreach (Map map in Map.SavedMaps)
{
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0, 0, 0, 25),
Path.GetFileNameWithoutExtension(s),
map.Name,
GUI.style,
Alignment.Left,
Alignment.Left,
mapList);
textBlock.Padding = new Vector4(10.0f, 0.0f, 0.0f, 0.0f);
textBlock.UserData = s;
textBlock.UserData = map;
}
if (mapFilePaths.Length > 0) mapList.Select(mapFilePaths[0]);
}
if (Map.SavedMaps.Count > 0) mapList.Select(Map.SavedMaps[0]);
//}
button = new GUIButton(new Rectangle(0, 0, 100, 30), "Start", GUI.style, Alignment.Right | Alignment.Bottom, menuTabs[(int)Tabs.NewGame]);
button.OnClicked = StartGame;
@@ -146,9 +146,12 @@ namespace Subsurface
private bool StartGame(GUIButton button, object obj)
{
if (mapList.SelectedData == null) return false;
Game1.gameSession = new GameSession(mapList.SelectedData.ToString(), true, TimeSpan.Zero);
Map selectedMap = mapList.SelectedData as Map;
if (selectedMap == null) return false;
Game1.gameSession = new GameSession(selectedMap.FilePath, true, TimeSpan.Zero);
Game1.lobbyScreen.Select();