38f1ddb...178a853: v0.8.9.1, removed content folder

This commit is contained in:
Joonas Rikkonen
2019-03-18 19:46:58 +02:00
parent 38f1ddb6fe
commit 6c0679c297
1054 changed files with 151673 additions and 144931 deletions
@@ -44,7 +44,8 @@ namespace Barotrauma
base.Deselect();
#if CLIENT
Sounds.SoundManager.LowPassHFGain = 1.0f;
GameMain.SoundManager.SetCategoryMuffle("default", false);
GUI.ClearMessages();
#endif
}
@@ -57,7 +58,7 @@ namespace Barotrauma
#if DEBUG && CLIENT
if (GameMain.GameSession != null && GameMain.GameSession.Level != null && GameMain.GameSession.Submarine != null &&
!DebugConsole.IsOpen && GUIComponent.KeyboardDispatcher.Subscriber == null)
!DebugConsole.IsOpen && GUI.KeyboardDispatcher.Subscriber == null)
{
var closestSub = Submarine.FindClosest(cam.WorldViewCenter);
if (closestSub == null) closestSub = GameMain.GameSession.Submarine;
@@ -78,31 +79,66 @@ namespace Barotrauma
e.IsHighlighted = false;
}
#if CLIENT
if (GameMain.GameSession != null) GameMain.GameSession.Update((float)deltaTime);
#if CLIENT
var sw = new System.Diagnostics.Stopwatch();
sw.Start();
GameMain.ParticleManager.Update((float)deltaTime);
GameMain.ParticleManager.Update((float)deltaTime);
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("ParticleUpdate", sw.ElapsedTicks);
sw.Restart();
GameMain.LightManager.Update((float)deltaTime);
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("LightUpdate", sw.ElapsedTicks);
sw.Restart();
#endif
if (Level.Loaded != null) Level.Loaded.Update((float)deltaTime, cam);
#if CLIENT
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("LevelUpdate", sw.ElapsedTicks);
if (Character.Controlled != null && Character.Controlled.SelectedConstruction != null && Character.Controlled.CanInteractWith(Character.Controlled.SelectedConstruction))
{
Character.Controlled.SelectedConstruction.UpdateHUD(cam, Character.Controlled);
Character.Controlled.SelectedConstruction.UpdateHUD(cam, Character.Controlled, (float)deltaTime);
}
sw.Restart();
#endif
Character.UpdateAll((float)deltaTime, cam);
#if CLIENT
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("CharacterUpdate", sw.ElapsedTicks);
sw.Restart();
#endif
StatusEffect.UpdateAll((float)deltaTime);
#if CLIENT
if (Character.Controlled != null && Lights.LightManager.ViewTarget != null)
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("StatusEffectUpdate", sw.ElapsedTicks);
sw.Restart();
if (Character.Controlled != null &&
Lights.LightManager.ViewTarget != null)
{
cam.TargetPos = Lights.LightManager.ViewTarget.WorldPosition;
Vector2 targetPos = Lights.LightManager.ViewTarget.WorldPosition;
if (Lights.LightManager.ViewTarget == Character.Controlled && CharacterHealth.OpenHealthWindow != null)
{
Vector2 screenTargetPos = CharacterHealth.OpenHealthWindow.Alignment == Alignment.Left ?
new Vector2(GameMain.GraphicsWidth * 0.75f, GameMain.GraphicsHeight * 0.5f) :
new Vector2(GameMain.GraphicsWidth * 0.25f, GameMain.GraphicsHeight * 0.5f);
Vector2 screenOffset = screenTargetPos - new Vector2(GameMain.GraphicsWidth / 2, GameMain.GraphicsHeight / 2);
screenOffset.Y = -screenOffset.Y;
targetPos -= screenOffset / cam.Zoom;
}
cam.TargetPos = targetPos;
}
#endif
@@ -117,19 +153,41 @@ namespace Barotrauma
{
pb.SetPrevTransform(pb.SimPosition, pb.Rotation);
}
MapEntity.UpdateAll((float)deltaTime, cam);
#if CLIENT
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("MapEntityUpdate", sw.ElapsedTicks);
sw.Restart();
#endif
Character.UpdateAnimAll((float)deltaTime);
Ragdoll.UpdateAll((float)deltaTime, cam);
#if CLIENT
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("AnimUpdate", sw.ElapsedTicks);
sw.Restart();
#endif
foreach (Submarine sub in Submarine.Loaded)
{
sub.Update((float)deltaTime);
}
#if CLIENT
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("SubmarineUpdate", sw.ElapsedTicks);
sw.Restart();
#endif
GameMain.World.Step((float)deltaTime);
#if CLIENT
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("Physics", sw.ElapsedTicks);
#endif
#if CLIENT
if (!PlayerInput.LeftButtonHeld())
{
@@ -1,4 +1,5 @@
using Barotrauma.Networking;
using Microsoft.Xna.Framework;
using System;
namespace Barotrauma
@@ -22,6 +23,19 @@ namespace Barotrauma
}
private string levelSeed = "";
public void SetLevelDifficulty(float difficulty)
{
difficulty = MathHelper.Clamp(difficulty, 0.0f, 100.0f);
if (GameMain.Server != null)
{
GameMain.Server.SelectedLevelDifficulty = difficulty;
lastUpdateID++;
}
#if CLIENT
levelDifficultyScrollBar.BarScroll = difficulty / 100.0f;
#endif
}
public void ToggleTraitorsEnabled(int dir)
{
@@ -36,6 +50,33 @@ namespace Barotrauma
SetTraitorsEnabled((YesNoMaybe)index);
}
public void SetBotCount(int botCount)
{
if (GameMain.Server != null)
{
if (botCount < 0) botCount = GameMain.Server.MaxBotCount;
if (botCount > GameMain.Server.MaxBotCount) botCount = 0;
GameMain.Server.BotCount = botCount;
lastUpdateID++;
}
#if CLIENT
(botCountText as GUITextBlock).Text = botCount.ToString();
#endif
}
public void SetBotSpawnMode(BotSpawnMode botSpawnMode)
{
if (GameMain.Server != null)
{
GameMain.Server.BotSpawnMode = botSpawnMode;
lastUpdateID++;
}
#if CLIENT
(botSpawnModeText as GUITextBlock).Text = botSpawnMode.ToString();
#endif
}
public void SetTraitorsEnabled(YesNoMaybe enabled)
{
if (GameMain.Server != null) GameMain.Server.TraitorsEnabled = enabled;
@@ -24,7 +24,12 @@
{
selected.Deselect();
#if CLIENT
GUIComponent.KeyboardDispatcher.Subscriber = null;
//make sure any textbox in the previously selected screen doesn't stay selected
if (GUI.KeyboardDispatcher.Subscriber != DebugConsole.TextBox)
{
GUI.KeyboardDispatcher.Subscriber = null;
GUI.ScreenChanged = true;
}
#endif
}
selected = this;