Quests, new sounds, explosives, bugfixes, asdfasdf
This commit is contained in:
@@ -161,6 +161,10 @@ namespace Subsurface.Networking
|
||||
if (packetType == (byte)PacketTypes.LoggedIn)
|
||||
{
|
||||
myID = inc.ReadInt32();
|
||||
if (inc.ReadBoolean())
|
||||
{
|
||||
new GUIMessageBox("Please wait", "A round is already running. You will have to wait for a new round to start.");
|
||||
}
|
||||
|
||||
Game1.NetLobbyScreen.ClearPlayers();
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@ namespace Subsurface.Networking
|
||||
|
||||
Client myClient;
|
||||
|
||||
public GameServer()
|
||||
public GameServer(string name, int port)
|
||||
{
|
||||
var endRoundButton = new GUIButton(new Rectangle(Game1.GraphicsWidth - 170-120, 20, 150, 25), "End round", Alignment.TopLeft, GUI.style, inGameHUD);
|
||||
var endRoundButton = new GUIButton(new Rectangle(Game1.GraphicsWidth - 290, 20, 150, 25), "End round", Alignment.TopLeft, GUI.style, inGameHUD);
|
||||
endRoundButton.OnClicked = EndButtonHit;
|
||||
|
||||
name = "Server";
|
||||
this.name = name;
|
||||
|
||||
Config = new NetPeerConfiguration("subsurface");
|
||||
|
||||
Config.Port = 14242;
|
||||
Config.Port = port;
|
||||
|
||||
//Config.SimulatedLoss = 0.2f;
|
||||
//Config.SimulatedMinimumLatency = 0.25f;
|
||||
@@ -215,6 +215,8 @@ namespace Subsurface.Networking
|
||||
|
||||
outmsg.Write(sender.ID);
|
||||
|
||||
outmsg.Write(gameStarted);
|
||||
|
||||
//notify the client about other clients already logged in
|
||||
outmsg.Write((myClient == null) ? connectedClients.Count - 1 : connectedClients.Count);
|
||||
foreach (Client c in connectedClients)
|
||||
|
||||
@@ -10,7 +10,8 @@ namespace Subsurface.Networking
|
||||
UpdateComponent = 2,
|
||||
DropItem = 3,
|
||||
InventoryUpdate = 4,
|
||||
PickItem = 5
|
||||
PickItem = 5,
|
||||
UpdateProperty = 6
|
||||
}
|
||||
|
||||
class NetworkEvent
|
||||
|
||||
Reference in New Issue
Block a user