Search and destroy mission

Featuring ugly code
This commit is contained in:
juanjp600
2016-09-26 22:09:06 -03:00
parent 790212a20b
commit 344947c3c4
16 changed files with 398 additions and 66 deletions

View File

@@ -737,6 +737,7 @@ namespace Barotrauma.Networking
string modeName = inc.ReadString();
bool respawnAllowed = inc.ReadBoolean();
bool loadSecondSub = inc.ReadBoolean();
GameModePreset gameMode = GameModePreset.list.Find(gm => gm.Name == modeName);
@@ -760,7 +761,7 @@ namespace Barotrauma.Networking
//int gameModeIndex = inc.ReadInt32();
GameMain.GameSession = new GameSession(GameMain.NetLobbyScreen.SelectedSub, "", gameMode, Mission.MissionTypes[missionTypeIndex]);
GameMain.GameSession.StartShift(levelSeed);
GameMain.GameSession.StartShift(levelSeed,loadSecondSub);
if (respawnAllowed) respawnManager = new RespawnManager(this, GameMain.NetLobbyScreen.SelectedShuttle);
@@ -1137,6 +1138,7 @@ namespace Barotrauma.Networking
{
bool noInfo = inc.ReadBoolean();
ushort id = inc.ReadUInt16();
byte teamid = inc.ReadByte();
string configPath = inc.ReadString();
Vector2 position = new Vector2(inc.ReadFloat(), inc.ReadFloat());
@@ -1155,6 +1157,7 @@ namespace Barotrauma.Networking
character = Character.Create(configPath, position, null, true);
character.ID = id;
character.TeamID = teamid;
}
else
{
@@ -1179,6 +1182,7 @@ namespace Barotrauma.Networking
character = Character.Create(configPath, position, ch, ownerId != myID, hasAi);
character.ID = id;
character.TeamID = teamid;
if (configPath == Character.HumanConfigFile)
{