Traitormode won't choose the first client as the target, admin can be traitor/target, banlist & removing IPs, environment dust particles, clients are responsible for the KillCharacter message of their own character, moar backgroundfish, syncing item FixRequirement states, longer gameserver tickrate

This commit is contained in:
Regalis
2015-10-24 17:00:58 +03:00
parent 6736f1dd82
commit 3335f87f64
30 changed files with 268 additions and 102 deletions
@@ -274,11 +274,17 @@ namespace Barotrauma
infoFrame.RemoveChild(infoFrame.children.Find(c => c.UserData as string == "startButton"));
playerList.Parent.RemoveChild(playerList.Parent.children.Find(c => c.UserData as string == "banListButton"));
if (IsServer && GameMain.Server != null)
{
GUIButton startButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Start", Alignment.BottomRight, GUI.Style, infoFrame);
startButton.OnClicked = GameMain.Server.StartGameClicked;
startButton.UserData = "startButton";
var banListButton = new GUIButton(new Rectangle(0, 30, 100, 20), "Banned IPs", Alignment.BottomRight, GUI.Style, playerList.Parent);
banListButton.OnClicked = GameMain.Server.BanList.ToggleBanFrame;
banListButton.UserData = "banListButton";
//mapList.OnSelected = new GUIListBox.OnSelectedHandler(Game1.server.UpdateNetLobby);
modeList.OnSelected += GameMain.Server.UpdateNetLobby;
@@ -544,6 +550,11 @@ namespace Barotrauma
{
autoRestartTimer = Math.Max(autoRestartTimer - (float)deltaTime, 0.0f);
}
if (GameMain.Server != null && GameMain.Server.BanList != null)
{
if (GameMain.Server.BanList.BanFrame != null) GameMain.Server.BanList.BanFrame.Update((float)deltaTime);
}
//durationBar.BarScroll = Math.Max(durationBar.BarScroll, 1.0f / 60.0f);
}
@@ -564,6 +575,11 @@ namespace Barotrauma
if (playerFrame != null) playerFrame.Draw(spriteBatch);
if (GameMain.Server!=null && GameMain.Server.BanList!=null)
{
if (GameMain.Server.BanList.BanFrame != null) GameMain.Server.BanList.BanFrame.Draw(spriteBatch);
}
GUI.Draw((float)deltaTime, spriteBatch, null);
spriteBatch.End();