Ingame syncing kinda works

Reminder to self: Submarines must spawn attached shuttles in Dedicated Server, must've been something I missed when moving over client-specific code
This commit is contained in:
juanjp600
2017-06-20 22:28:18 -03:00
parent 7003214847
commit 0740579f62
25 changed files with 109 additions and 43 deletions
@@ -26,7 +26,7 @@ namespace Barotrauma
private void InitProjSpecific(XDocument doc)
{
//do nothing
keys = null;
}
private void UpdateControlled(float deltaTime)
+14
View File
@@ -43,6 +43,20 @@ namespace Barotrauma
if (Screen.Selected == GameMain.NetLobbyScreen) break;
GameMain.Server.EndGame();
break;
case "entitydata":
Entity ent = Entity.FindEntityByID(Convert.ToUInt16(commands[1]));
if (ent != null)
{
NewMessage(ent.ToString(), Color.Lime);
}
break;
case "eventdata":
ServerEntityEvent ev = GameMain.Server.EntityEventManager.Events[Convert.ToUInt16(commands[1])];
if (ev != null)
{
NewMessage(ev.StackTrace, Color.Lime);
}
break;
default:
return false;
break;
+1 -1
View File
@@ -103,7 +103,7 @@ namespace Barotrauma
while (true)
{
DebugConsole.Update();
NetLobbyScreen.Update((float)Timing.Step);
if (Screen.Selected != null) Screen.Selected.Update((float)Timing.Step);
Server.Update((float)Timing.Step);
CoroutineManager.Update((float)Timing.Step, (float)Timing.Step);
@@ -11,6 +11,20 @@ namespace Barotrauma.Networking
{
abstract partial class NetworkMember
{
protected const CharacterInfo characterInfo = null;
protected const Character myCharacter = null;
public CharacterInfo CharacterInfo
{
get { return null; }
}
public Character Character
{
get { return null; }
}
private void InitProjSpecific()
{
//do nothing
+5 -1
View File
@@ -29,17 +29,19 @@ namespace Barotrauma
static void Main()
{
GameMain game = null;
Thread inputThread = null;
try
{
game = new GameMain();
Thread inputThread = new Thread(new ThreadStart(game.ProcessInput));
inputThread = new Thread(new ThreadStart(game.ProcessInput));
inputThread.Start();
game.Run();
}
catch (Exception e)
{
CrashDump(game, "servercrashreport.txt", e);
//inputThread.Abort(); inputThread.Join();
}
}
@@ -84,6 +86,8 @@ namespace Barotrauma
sb.AppendLine(" "+DebugConsole.Messages[i].Time+" - "+DebugConsole.Messages[i].Text);
}
Console.ForegroundColor = ConsoleColor.Red;
Console.Write(sb.ToString());
sw.WriteLine(sb.ToString());
sw.Close();
@@ -53,7 +53,7 @@ namespace Barotrauma
}
private List<Submarine> subs = new List<Submarine>();
private List<Submarine> subs;
public List<Submarine> GetSubList()
{
return subs;
@@ -27,6 +27,7 @@ namespace Barotrauma
dictionary.Add(Color.Cyan, ConsoleColor.Cyan);
dictionary.Add(Color.DarkBlue, ConsoleColor.DarkBlue);
dictionary.Add(Color.Pink, ConsoleColor.Magenta);
dictionary.Add(Color.Magenta, ConsoleColor.Magenta);
}
ConsoleColor val = ConsoleColor.White;