"seed" command
This commit is contained in:
@@ -57,6 +57,9 @@ namespace Barotrauma
|
|||||||
case "servermsg":
|
case "servermsg":
|
||||||
GameMain.NetLobbyScreen.ChangeServerMessage(string.Join(" ", commands.Skip(1)));
|
GameMain.NetLobbyScreen.ChangeServerMessage(string.Join(" ", commands.Skip(1)));
|
||||||
break;
|
break;
|
||||||
|
case "seed":
|
||||||
|
GameMain.NetLobbyScreen.LevelSeed = string.Join(" ", commands.Skip(1));
|
||||||
|
break;
|
||||||
case "gamemode":
|
case "gamemode":
|
||||||
{
|
{
|
||||||
int index = -1;
|
int index = -1;
|
||||||
@@ -129,6 +132,7 @@ namespace Barotrauma
|
|||||||
NewMessage(ent.ToString(), Color.Lime);
|
NewMessage(ent.ToString(), Color.Lime);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#if DEBUG
|
||||||
case "eventdata":
|
case "eventdata":
|
||||||
ServerEntityEvent ev = GameMain.Server.EntityEventManager.Events[Convert.ToUInt16(commands[1])];
|
ServerEntityEvent ev = GameMain.Server.EntityEventManager.Events[Convert.ToUInt16(commands[1])];
|
||||||
if (ev != null)
|
if (ev != null)
|
||||||
@@ -136,6 +140,7 @@ namespace Barotrauma
|
|||||||
NewMessage(ev.StackTrace, Color.Lime);
|
NewMessage(ev.StackTrace, Color.Lime);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (levelSeed == value) return;
|
if (levelSeed == value) return;
|
||||||
|
|
||||||
|
lastUpdateID++;
|
||||||
levelSeed = value;
|
levelSeed = value;
|
||||||
LocationType.Random(levelSeed); //call to sync up with clients
|
LocationType.Random(levelSeed); //call to sync up with clients
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,6 +309,7 @@ namespace Barotrauma
|
|||||||
break;
|
break;
|
||||||
case "kickid":
|
case "kickid":
|
||||||
if (GameMain.Server == null || commands.Length < 2) break;
|
if (GameMain.Server == null || commands.Length < 2) break;
|
||||||
|
|
||||||
{
|
{
|
||||||
int id = 0;
|
int id = 0;
|
||||||
int.TryParse(commands[1], out id);
|
int.TryParse(commands[1], out id);
|
||||||
@@ -317,6 +318,7 @@ namespace Barotrauma
|
|||||||
break;
|
break;
|
||||||
case "banid":
|
case "banid":
|
||||||
if (GameMain.Server == null || commands.Length < 2) break;
|
if (GameMain.Server == null || commands.Length < 2) break;
|
||||||
|
|
||||||
{
|
{
|
||||||
int id = 0;
|
int id = 0;
|
||||||
int.TryParse(commands[1], out id);
|
int.TryParse(commands[1], out id);
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
public bool Sent;
|
public bool Sent;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
public string StackTrace;
|
public string StackTrace;
|
||||||
|
#endif
|
||||||
|
|
||||||
private double createTime;
|
private double createTime;
|
||||||
public double CreateTime
|
public double CreateTime
|
||||||
@@ -79,7 +81,9 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
createTime = Timing.TotalTime;
|
createTime = Timing.TotalTime;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
StackTrace = Environment.StackTrace.ToString();
|
StackTrace = Environment.StackTrace.ToString();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write(NetBuffer msg, Client recipient)
|
public void Write(NetBuffer msg, Client recipient)
|
||||||
|
|||||||
Reference in New Issue
Block a user