diff --git a/CrashReporter/CrashReporter.csproj b/CrashReporter/CrashReporter.csproj
index 525989800..eb2db32ee 100644
--- a/CrashReporter/CrashReporter.csproj
+++ b/CrashReporter/CrashReporter.csproj
@@ -56,9 +56,9 @@
-
+
{008c0f83-e914-4966-9135-ea885059edd8}
- Subsurface
+ Barotrauma
diff --git a/CrashReporter/ReporterMain.cs b/CrashReporter/ReporterMain.cs
index a28497c0f..6a019b775 100644
--- a/CrashReporter/ReporterMain.cs
+++ b/CrashReporter/ReporterMain.cs
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-using Subsurface;
+using Barotrauma;
using System.IO;
namespace CrashReporter
diff --git a/Farseer Physics Engine 3.5/Collision/Shapes/PolygonShape.cs b/Farseer Physics Engine 3.5/Collision/Shapes/PolygonShape.cs
index 5d0a4b37d..2480555a2 100644
--- a/Farseer Physics Engine 3.5/Collision/Shapes/PolygonShape.cs
+++ b/Farseer Physics Engine 3.5/Collision/Shapes/PolygonShape.cs
@@ -196,11 +196,6 @@ namespace FarseerPhysics.Collision.Shapes
I += (0.25f * k_inv3 * D) * (intx2 + inty2);
}
- if (area <= Settings.Epsilon)
- {
- int alsmfkldsmfdkasf = 1;
- }
-
//The area is too small for the engine to handle.
Debug.Assert(area > Settings.Epsilon);
diff --git a/Launcher/Form1.cs b/Launcher/Form1.cs
index dcd6df2a7..dc6e37492 100644
--- a/Launcher/Form1.cs
+++ b/Launcher/Form1.cs
@@ -1,5 +1,5 @@
using RestSharp;
-using Subsurface;
+using Barotrauma;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -23,7 +23,7 @@ namespace Launcher
string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString();
private const string configPath = "config.xml";
- private Subsurface.GameSettings settings;
+ private Barotrauma.GameSettings settings;
private string latestVersionFileList, latestVersionFolder;
diff --git a/Launcher/Launcher.csproj b/Launcher/Launcher.csproj
index a19de67a6..cef546adf 100644
--- a/Launcher/Launcher.csproj
+++ b/Launcher/Launcher.csproj
@@ -100,9 +100,9 @@
-
+
{008c0f83-e914-4966-9135-ea885059edd8}
- Subsurface
+ Barotrauma
diff --git a/Launcher/PackageManager.cs b/Launcher/PackageManager.cs
index 420b1fdd6..42e077d8b 100644
--- a/Launcher/PackageManager.cs
+++ b/Launcher/PackageManager.cs
@@ -1,4 +1,4 @@
-using Subsurface;
+using Barotrauma;
using System;
using System.Collections.Generic;
using System.ComponentModel;
diff --git a/Launcher2/Launcher2.csproj b/Launcher2/Launcher2.csproj
index 67af45212..6624dcfad 100644
--- a/Launcher2/Launcher2.csproj
+++ b/Launcher2/Launcher2.csproj
@@ -62,9 +62,9 @@
-
+
{008c0f83-e914-4966-9135-ea885059edd8}
- Subsurface
+ Barotrauma
diff --git a/Launcher2/LauncherMain.cs b/Launcher2/LauncherMain.cs
index e8002e933..cc822c818 100644
--- a/Launcher2/LauncherMain.cs
+++ b/Launcher2/LauncherMain.cs
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-using Subsurface;
+using Barotrauma;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
@@ -25,7 +25,7 @@ namespace Launcher2
string version = AssemblyName.GetAssemblyName("Barotrauma.exe").Version.ToString();
private const string configPath = "config.xml";
- private Subsurface.GameSettings settings;
+ private Barotrauma.GameSettings settings;
private string latestVersionFileList, latestVersionFolder;
diff --git a/Subsurface/Subsurface.csproj b/Subsurface/Barotrauma.csproj
similarity index 98%
rename from Subsurface/Subsurface.csproj
rename to Subsurface/Barotrauma.csproj
index 0373a9e8e..477c5b791 100644
--- a/Subsurface/Subsurface.csproj
+++ b/Subsurface/Barotrauma.csproj
@@ -8,7 +8,7 @@
{008C0F83-E914-4966-9135-EA885059EDD8}
WinExe
Properties
- Subsurface
+ Barotrauma
Barotrauma
512
false
@@ -383,6 +383,9 @@
PreserveNewest
Designer
+
+ PreserveNewest
+
PreserveNewest
Designer
@@ -845,6 +848,12 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -875,6 +884,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
diff --git a/Subsurface/Subsurface.csproj.user b/Subsurface/Barotrauma.csproj.user
similarity index 89%
rename from Subsurface/Subsurface.csproj.user
rename to Subsurface/Barotrauma.csproj.user
index d8060d791..1782abafa 100644
--- a/Subsurface/Subsurface.csproj.user
+++ b/Subsurface/Barotrauma.csproj.user
@@ -1,18 +1,18 @@
-
-
-
- publish\
-
-
-
-
-
- en-US
- false
- ProjectFiles
-
-
-
-
-
+
+
+
+ publish\
+
+
+
+
+
+ en-US
+ false
+ ShowAllFiles
+
+
+
+
+
\ No newline at end of file
diff --git a/Subsurface/Content/Items/Clothes/clothes.xml b/Subsurface/Content/Items/Clothes/clothes.xml
index e52fef947..a0d4c251e 100644
--- a/Subsurface/Content/Items/Clothes/clothes.xml
+++ b/Subsurface/Content/Items/Clothes/clothes.xml
@@ -62,7 +62,7 @@
-
+
@@ -78,7 +78,7 @@
-
+
diff --git a/Subsurface/Content/Items/Electricity/poweritems.xml b/Subsurface/Content/Items/Electricity/poweritems.xml
index 7e4394ebb..7f58f6b74 100644
--- a/Subsurface/Content/Items/Electricity/poweritems.xml
+++ b/Subsurface/Content/Items/Electricity/poweritems.xml
@@ -41,7 +41,8 @@
-
+
+
@@ -50,7 +51,11 @@
-
+
+
+
+
+
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/Subsurface/Content/Items/Medical/syringe.ogg b/Subsurface/Content/Items/Medical/syringe.ogg
new file mode 100644
index 000000000..d0a0cf547
Binary files /dev/null and b/Subsurface/Content/Items/Medical/syringe.ogg differ
diff --git a/Subsurface/Content/Items/Pump/pump.xml b/Subsurface/Content/Items/Pump/pump.xml
index 04a3b4d25..782671806 100644
--- a/Subsurface/Content/Items/Pump/pump.xml
+++ b/Subsurface/Content/Items/Pump/pump.xml
@@ -3,7 +3,7 @@
linkable="true"
pickdistance="200">
-
+
diff --git a/Subsurface/Content/Items/Weapons/stunbaton.ogg b/Subsurface/Content/Items/Weapons/stunbaton.ogg
new file mode 100644
index 000000000..0efb8d0d6
Binary files /dev/null and b/Subsurface/Content/Items/Weapons/stunbaton.ogg differ
diff --git a/Subsurface/Content/Items/Weapons/stunbaton.png b/Subsurface/Content/Items/Weapons/stunbaton.png
new file mode 100644
index 000000000..2ea699413
Binary files /dev/null and b/Subsurface/Content/Items/Weapons/stunbaton.png differ
diff --git a/Subsurface/Content/Items/Weapons/weapons.xml b/Subsurface/Content/Items/Weapons/weapons.xml
index 22e44c66d..052a9ed4f 100644
--- a/Subsurface/Content/Items/Weapons/weapons.xml
+++ b/Subsurface/Content/Items/Weapons/weapons.xml
@@ -49,7 +49,7 @@
-
+
@@ -62,16 +62,34 @@
pickdistance="150"
price="100">
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/Subsurface/Content/Jobs.xml b/Subsurface/Content/Jobs.xml
index a9dc5be55..7e5e6b6d0 100644
--- a/Subsurface/Content/Jobs.xml
+++ b/Subsurface/Content/Jobs.xml
@@ -8,8 +8,8 @@
-
-
+
+
@@ -24,7 +24,7 @@
-
+
@@ -35,18 +35,18 @@
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
diff --git a/Subsurface/Content/Map/TutorialSub.sub b/Subsurface/Content/Map/TutorialSub.sub
new file mode 100644
index 000000000..e251a3bcb
Binary files /dev/null and b/Subsurface/Content/Map/TutorialSub.sub differ
diff --git a/Subsurface/Data/ContentPackages/Vanilla 0.1.3.xml b/Subsurface/Data/ContentPackages/Vanilla 0.1.3.xml
index f16534828..0f5a07d60 100644
--- a/Subsurface/Data/ContentPackages/Vanilla 0.1.3.xml
+++ b/Subsurface/Data/ContentPackages/Vanilla 0.1.3.xml
@@ -1,5 +1,5 @@
-
+
@@ -32,5 +32,5 @@
-
+
\ No newline at end of file
diff --git a/Subsurface/Data/SavedSubs/Aegir Mark II.gz b/Subsurface/Data/SavedSubs/Aegir Mark II.sub
similarity index 100%
rename from Subsurface/Data/SavedSubs/Aegir Mark II.gz
rename to Subsurface/Data/SavedSubs/Aegir Mark II.sub
diff --git a/Subsurface/Data/SavedSubs/TutorialSub.gz b/Subsurface/Data/SavedSubs/TutorialSub.gz
deleted file mode 100644
index 96f8aa1b3..000000000
Binary files a/Subsurface/Data/SavedSubs/TutorialSub.gz and /dev/null differ
diff --git a/Subsurface/Data/SavedSubs/TutorialSub.sub b/Subsurface/Data/SavedSubs/TutorialSub.sub
new file mode 100644
index 000000000..4383dcf0a
Binary files /dev/null and b/Subsurface/Data/SavedSubs/TutorialSub.sub differ
diff --git a/Subsurface/Data/SavedSubs/Vellamo.gz b/Subsurface/Data/SavedSubs/Vellamo.gz
deleted file mode 100644
index c7013624d..000000000
Binary files a/Subsurface/Data/SavedSubs/Vellamo.gz and /dev/null differ
diff --git a/Subsurface/Data/SavedSubs/Vellamo.sub b/Subsurface/Data/SavedSubs/Vellamo.sub
new file mode 100644
index 000000000..d9345ee24
Binary files /dev/null and b/Subsurface/Data/SavedSubs/Vellamo.sub differ
diff --git a/Subsurface/Source/Camera.cs b/Subsurface/Source/Camera.cs
index 71c5a45a4..a037506bf 100644
--- a/Subsurface/Source/Camera.cs
+++ b/Subsurface/Source/Camera.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
-namespace Subsurface
+namespace Barotrauma
{
public class Camera
{
diff --git a/Subsurface/Source/Characters/AI/AIController.cs b/Subsurface/Source/Characters/AI/AIController.cs
index 6694614d4..e3fc2e544 100644
--- a/Subsurface/Source/Characters/AI/AIController.cs
+++ b/Subsurface/Source/Characters/AI/AIController.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
class AIController : ISteerable
{
diff --git a/Subsurface/Source/Characters/AI/AITarget.cs b/Subsurface/Source/Characters/AI/AITarget.cs
index 3a0670f2a..46e006afa 100644
--- a/Subsurface/Source/Characters/AI/AITarget.cs
+++ b/Subsurface/Source/Characters/AI/AITarget.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
-namespace Subsurface
+namespace Barotrauma
{
class AITarget
{
diff --git a/Subsurface/Source/Characters/AI/EnemyAIController.cs b/Subsurface/Source/Characters/AI/EnemyAIController.cs
index ce17b51d2..cdf6666bc 100644
--- a/Subsurface/Source/Characters/AI/EnemyAIController.cs
+++ b/Subsurface/Source/Characters/AI/EnemyAIController.cs
@@ -8,7 +8,7 @@ using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
class EnemyAIController : AIController
diff --git a/Subsurface/Source/Characters/AI/ISteerable.cs b/Subsurface/Source/Characters/AI/ISteerable.cs
index 3a4ec5379..efafca9d9 100644
--- a/Subsurface/Source/Characters/AI/ISteerable.cs
+++ b/Subsurface/Source/Characters/AI/ISteerable.cs
@@ -1,6 +1,6 @@
using Microsoft.Xna.Framework;
-namespace Subsurface
+namespace Barotrauma
{
interface ISteerable
{
diff --git a/Subsurface/Source/Characters/AI/PathFinder.cs b/Subsurface/Source/Characters/AI/PathFinder.cs
index 0e4c8dfd4..3172407ab 100644
--- a/Subsurface/Source/Characters/AI/PathFinder.cs
+++ b/Subsurface/Source/Characters/AI/PathFinder.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class PathNode
{
diff --git a/Subsurface/Source/Characters/AI/SteeringManager.cs b/Subsurface/Source/Characters/AI/SteeringManager.cs
index 7ac461f44..9352195fa 100644
--- a/Subsurface/Source/Characters/AI/SteeringManager.cs
+++ b/Subsurface/Source/Characters/AI/SteeringManager.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics;
-namespace Subsurface
+namespace Barotrauma
{
class SteeringManager
{
diff --git a/Subsurface/Source/Characters/AI/SteeringPath.cs b/Subsurface/Source/Characters/AI/SteeringPath.cs
index 125fff3e9..bfe4b0b35 100644
--- a/Subsurface/Source/Characters/AI/SteeringPath.cs
+++ b/Subsurface/Source/Characters/AI/SteeringPath.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
-namespace Subsurface
+namespace Barotrauma
{
class SteeringPath
{
diff --git a/Subsurface/Source/Characters/AICharacter.cs b/Subsurface/Source/Characters/AICharacter.cs
index 874120463..10b5fd345 100644
--- a/Subsurface/Source/Characters/AICharacter.cs
+++ b/Subsurface/Source/Characters/AICharacter.cs
@@ -1,12 +1,12 @@
using Lidgren.Network;
using Microsoft.Xna.Framework;
-using Subsurface.Networking;
+using Barotrauma.Networking;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class AICharacter : Character
{
@@ -14,6 +14,11 @@ namespace Subsurface
private AIController aiController;
+ public override AIController AIController
+ {
+ get { return aiController; }
+ }
+
public AICharacter(string file) : this(file, Vector2.Zero, null)
{
}
@@ -37,7 +42,10 @@ namespace Subsurface
public AICharacter(string file, Vector2 position, CharacterInfo characterInfo = null, bool isNetworkPlayer = false)
: base(file, position, characterInfo, isNetworkPlayer)
{
- aiController = new EnemyAIController(this, file);
+ aiController = new EnemyAIController(this, file);
+
+
+ if (GameMain.Client != null && GameMain.Server == null) Enabled = false;
}
public override void Update(Camera cam, float deltaTime)
diff --git a/Subsurface/Source/Characters/AnimController.cs b/Subsurface/Source/Characters/AnimController.cs
index ef64d4aab..326321440 100644
--- a/Subsurface/Source/Characters/AnimController.cs
+++ b/Subsurface/Source/Characters/AnimController.cs
@@ -2,7 +2,7 @@
using FarseerPhysics;
using Microsoft.Xna.Framework;
-namespace Subsurface
+namespace Barotrauma
{
class AnimController : Ragdoll
{
diff --git a/Subsurface/Source/Characters/Attack.cs b/Subsurface/Source/Characters/Attack.cs
index bdc49ba78..68e217394 100644
--- a/Subsurface/Source/Characters/Attack.cs
+++ b/Subsurface/Source/Characters/Attack.cs
@@ -1,10 +1,10 @@
using Microsoft.Xna.Framework;
-using Subsurface.Particles;
+using Barotrauma.Particles;
using System;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
public enum DamageType { None, Blunt, Slash }
diff --git a/Subsurface/Source/Characters/BackgroundSprite/BackgroundSprite.cs b/Subsurface/Source/Characters/BackgroundSprite/BackgroundSprite.cs
index 9a80cc56e..00859d6a7 100644
--- a/Subsurface/Source/Characters/BackgroundSprite/BackgroundSprite.cs
+++ b/Subsurface/Source/Characters/BackgroundSprite/BackgroundSprite.cs
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class BackgroundSprite : ISteerable
diff --git a/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpriteManager.cs b/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpriteManager.cs
index ea9e77c32..0f6dbe27b 100644
--- a/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpriteManager.cs
+++ b/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpriteManager.cs
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class BackgroundSpriteManager
{
diff --git a/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpritePrefab.cs b/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpritePrefab.cs
index 1326ce05c..de4b56c92 100644
--- a/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpritePrefab.cs
+++ b/Subsurface/Source/Characters/BackgroundSprite/BackgroundSpritePrefab.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class BackgroundSpritePrefab
{
diff --git a/Subsurface/Source/Characters/Character.cs b/Subsurface/Source/Characters/Character.cs
index 2d868a6f8..1115ae2ad 100644
--- a/Subsurface/Source/Characters/Character.cs
+++ b/Subsurface/Source/Characters/Character.cs
@@ -5,15 +5,15 @@ using Lidgren.Network;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-using Subsurface.Networking;
-using Subsurface.Particles;
+using Barotrauma.Networking;
+using Barotrauma.Particles;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class Character : Entity, IDamageable, IPropertyObject
@@ -33,6 +33,12 @@ namespace Subsurface
set { controlled = value; }
}
+ public bool Enabled
+ {
+ get;
+ set;
+ }
+
public readonly bool IsNetworkPlayer;
private CharacterInventory inventory;
@@ -411,6 +417,8 @@ namespace Subsurface
AnimController.FindHull();
CharacterList.Add(this);
+
+ Enabled = true;
}
private static string humanConfigFile;
@@ -498,7 +506,7 @@ namespace Subsurface
public void Control(float deltaTime, Camera cam)
{
- if (isDead) return;
+ if (isDead || AnimController.StunTimer>0.0f) return;
Vector2 targetMovement = Vector2.Zero;
if (GetInputState(InputType.Left)) targetMovement.X -= 1.0f;
@@ -741,17 +749,17 @@ namespace Subsurface
{
foreach (Character c in CharacterList)
{
- if (c.isDead) continue;
+ if (c.isDead || !c.Enabled) continue;
c.AnimController.UpdateAnim(deltaTime);
}
}
public static void UpdateAll(Camera cam, float deltaTime)
{
- if (NewCharacterQueue.Count>0)
- {
- new Character(NewCharacterQueue.Dequeue(), Vector2.Zero);
- }
+ //if (NewCharacterQueue.Count>0)
+ //{
+ // new Character(NewCharacterQueue.Dequeue(), Vector2.Zero);
+ //}
foreach (Character c in CharacterList)
{
@@ -761,6 +769,8 @@ namespace Subsurface
public virtual void Update(Camera cam, float deltaTime)
{
+ if (!Enabled) return;
+
AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f);
if (isDead) return;
@@ -828,6 +838,8 @@ namespace Subsurface
public void Draw(SpriteBatch spriteBatch)
{
+ if (!Enabled) return;
+
AnimController.Draw(spriteBatch);
//GUI.DrawLine(spriteBatch, ConvertUnits.ToDisplayUnits(animController.limbs[0].SimPosition.X, animController.limbs[0].SimPosition.Y),
@@ -842,6 +854,8 @@ namespace Subsurface
public virtual void DrawFront(SpriteBatch spriteBatch)
{
+ if (!Enabled) return;
+
Vector2 pos = ConvertUnits.ToDisplayUnits(AnimController.Limbs[0].SimPosition);
pos.Y = -pos.Y;
@@ -869,9 +883,6 @@ namespace Subsurface
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f * (health / maxHealth)), 15), Color.Red, true);
}
-
-
-
public void PlaySound(AIController.AiState state)
{
if (sounds == null || !sounds.Any()) return;
@@ -931,6 +942,7 @@ namespace Subsurface
{
if (stunTimer <= 0.0f) return;
+ AnimController.ResetPullJoints();
AnimController.StunTimer = Math.Max(AnimController.StunTimer, stunTimer);
selectedConstruction = null;
@@ -1138,6 +1150,8 @@ namespace Subsurface
public override void ReadNetworkData(NetworkEventType type, NetIncomingMessage message)
{
+ Enabled = true;
+
if (type == NetworkEventType.PickItem)
{
System.Diagnostics.Debug.WriteLine("**************** PickItem networkevent received");
diff --git a/Subsurface/Source/Characters/CharacterHUD.cs b/Subsurface/Source/Characters/CharacterHUD.cs
index 576641154..b718da8cb 100644
--- a/Subsurface/Source/Characters/CharacterHUD.cs
+++ b/Subsurface/Source/Characters/CharacterHUD.cs
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class CharacterHUD
{
diff --git a/Subsurface/Source/Characters/CharacterInfo.cs b/Subsurface/Source/Characters/CharacterInfo.cs
index f0ecaafad..e44b25d2a 100644
--- a/Subsurface/Source/Characters/CharacterInfo.cs
+++ b/Subsurface/Source/Characters/CharacterInfo.cs
@@ -3,7 +3,7 @@ using System;
using System.Collections.Generic;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
public enum Gender { None, Male, Female };
diff --git a/Subsurface/Source/Characters/DelayedEffect.cs b/Subsurface/Source/Characters/DelayedEffect.cs
index cec94dc09..b0935fd78 100644
--- a/Subsurface/Source/Characters/DelayedEffect.cs
+++ b/Subsurface/Source/Characters/DelayedEffect.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class DelayedEffect : StatusEffect
{
diff --git a/Subsurface/Source/Characters/FishAnimController.cs b/Subsurface/Source/Characters/FishAnimController.cs
index a0bfc27b8..e67fb4c0b 100644
--- a/Subsurface/Source/Characters/FishAnimController.cs
+++ b/Subsurface/Source/Characters/FishAnimController.cs
@@ -6,7 +6,7 @@ using FarseerPhysics.Dynamics.Joints;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
-namespace Subsurface
+namespace Barotrauma
{
class FishAnimController : AnimController
{
diff --git a/Subsurface/Source/Characters/HumanoidAnimController.cs b/Subsurface/Source/Characters/HumanoidAnimController.cs
index 0b633fe01..23b3e9c09 100644
--- a/Subsurface/Source/Characters/HumanoidAnimController.cs
+++ b/Subsurface/Source/Characters/HumanoidAnimController.cs
@@ -3,9 +3,9 @@ using System.Linq;
using System.Xml.Linq;
using FarseerPhysics;
using Microsoft.Xna.Framework;
-using Subsurface.Items.Components;
+using Barotrauma.Items.Components;
-namespace Subsurface
+namespace Barotrauma
{
class HumanoidAnimController : AnimController
{
@@ -120,23 +120,24 @@ namespace Subsurface
{
onFloorTimer -= deltaTime;
}
-
-
- IgnorePlatforms = (TargetMovement.Y < 0.0f);
-
+
//stun (= disable the animations) if the ragdoll receives a large enough impact
if (strongestImpact > 0.0f)
{
character.StartStun(MathHelper.Min(strongestImpact * 0.5f, 5.0f));
}
strongestImpact = 0.0f;
-
+
if (stunTimer > 0)
{
stunTimer -= deltaTime;
return;
}
+ IgnorePlatforms = (TargetMovement.Y < 0.0f);
+
+
+
if (Anim != Animation.UsingConstruction) ResetPullJoints();
if (TargetDir != dir) Flip();
@@ -228,30 +229,35 @@ namespace Subsurface
this.stepSize.Y * walkPosY * runningModifier * runningModifier);
float footMid = waist.SimPosition.X;// (leftFoot.SimPosition.X + rightFoot.SimPosition.X) / 2.0f;
-
- int limbsInWater = 0;
- foreach (Limb limb in Limbs)
+
+ if (Math.Abs(TargetMovement.X)>1.0f)
{
- if (limb.inWater) limbsInWater++;
- }
+ int limbsInWater = 0;
+ foreach (Limb limb in Limbs)
+ {
+ if (limb.inWater) limbsInWater++;
+ }
- TargetMovement *= (1.0f - 0.5f * ((float)limbsInWater / (float)Limbs.Count()));
+ float slowdownFactor = (float)limbsInWater / (float)Limbs.Count();
+
+ TargetMovement = Vector2.Normalize(TargetMovement) * Math.Max(TargetMovement.Length() - slowdownFactor, 1.0f);
+ }
movement = MathUtils.SmoothStep(movement, TargetMovement, movementLerp);
movement.Y = 0.0f;
+ bool legsUp = false;
for (int i = 0; i < 2; i++)
{
Limb leg = GetLimb((i == 0) ? LimbType.LeftThigh : LimbType.RightThigh);// : leftLeg;
if (leg.SimPosition.Y < torso.SimPosition.Y) continue;
- leg.body.ApplyTorque(-Dir * leg.Mass * 10.0f);
+ leg.body.ApplyTorque(Dir * leg.Mass * 10.0f);
+ legsUp = true;
}
- //place the anchors of the head and the torso to make the ragdoll stand
-
- if (LowestLimb == null) return;
+ if (legsUp || LowestLimb == null) return;
if (!onGround || (LowestLimb.SimPosition.Y - floorY > 0.5f && stairs == null)) return;
diff --git a/Subsurface/Source/Characters/Jobs/Job.cs b/Subsurface/Source/Characters/Jobs/Job.cs
index 616db3808..14b238896 100644
--- a/Subsurface/Source/Characters/Jobs/Job.cs
+++ b/Subsurface/Source/Characters/Jobs/Job.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class Job
{
diff --git a/Subsurface/Source/Characters/Jobs/JobPrefab.cs b/Subsurface/Source/Characters/Jobs/JobPrefab.cs
index 004bdb8d3..01a4c8600 100644
--- a/Subsurface/Source/Characters/Jobs/JobPrefab.cs
+++ b/Subsurface/Source/Characters/Jobs/JobPrefab.cs
@@ -4,7 +4,7 @@ using System.Globalization;
using System.Xml.Linq;
using System.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class JobPrefab
{
@@ -20,13 +20,15 @@ namespace Subsurface
//(i.e. if one captain is required, one captain is chosen even if all the players have set captain to lowest preference)
private int minNumber;
+ private float commonness;
+
//if set to true, a client that has chosen this as their preferred job will get it no matter what
public bool AllowAlways
{
get;
private set;
}
-
+
//names of the items the character spawns with
public List ItemNames;
public List EquipItem;
@@ -53,6 +55,11 @@ namespace Subsurface
get { return minNumber; }
}
+ public float Commonness
+ {
+ get { return commonness; }
+ }
+
public JobPrefab(XElement element)
{
name = ToolBox.GetAttributeString(element, "name", "name not found");
@@ -62,6 +69,8 @@ namespace Subsurface
minNumber = ToolBox.GetAttributeInt(element, "minnumber", 0);
maxNumber = ToolBox.GetAttributeInt(element, "maxnumber", 10);
+ commonness = ToolBox.GetAttributeInt(element, "commonness", 10);
+
AllowAlways = ToolBox.GetAttributeBool(element, "allowalways", false);
ItemNames = new List();
diff --git a/Subsurface/Source/Characters/Jobs/Skill.cs b/Subsurface/Source/Characters/Jobs/Skill.cs
index 5ae509916..c0dd3b117 100644
--- a/Subsurface/Source/Characters/Jobs/Skill.cs
+++ b/Subsurface/Source/Characters/Jobs/Skill.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class Skill
{
diff --git a/Subsurface/Source/Characters/Jobs/SkillPrefab.cs b/Subsurface/Source/Characters/Jobs/SkillPrefab.cs
index 82737a87f..b89ba9583 100644
--- a/Subsurface/Source/Characters/Jobs/SkillPrefab.cs
+++ b/Subsurface/Source/Characters/Jobs/SkillPrefab.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class SkillPrefab
{
diff --git a/Subsurface/Source/Characters/Limb.cs b/Subsurface/Source/Characters/Limb.cs
index be0580bb6..4ba5871d4 100644
--- a/Subsurface/Source/Characters/Limb.cs
+++ b/Subsurface/Source/Characters/Limb.cs
@@ -5,9 +5,9 @@ using FarseerPhysics.Dynamics;
using FarseerPhysics.Dynamics.Joints;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using Subsurface.Items.Components;
+using Barotrauma.Items.Components;
-namespace Subsurface
+namespace Barotrauma
{
public enum LimbType
{
diff --git a/Subsurface/Source/Characters/Ragdoll.cs b/Subsurface/Source/Characters/Ragdoll.cs
index b2ee4c5ed..4379206bd 100644
--- a/Subsurface/Source/Characters/Ragdoll.cs
+++ b/Subsurface/Source/Characters/Ragdoll.cs
@@ -8,9 +8,9 @@ using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.Dynamics.Joints;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using Subsurface.Networking;
+using Barotrauma.Networking;
-namespace Subsurface
+namespace Barotrauma
{
class Ragdoll
{
@@ -491,8 +491,7 @@ namespace Subsurface
{
for (int i = 0; i < Limbs.Count(); i++)
{
- if (Limbs[i] == null) continue;
- if (Limbs[i].pullJoint == null) continue;
+ if (Limbs[i] == null || Limbs[i].pullJoint == null) continue;
Limbs[i].pullJoint.Enabled = false;
}
}
@@ -526,7 +525,7 @@ namespace Subsurface
Category collisionCategory = (ignorePlatforms) ?
wall | Physics.CollisionProjectile | Physics.CollisionStairs
- : wall | Physics.CollisionPlatform | Physics.CollisionStairs;
+ : wall | Physics.CollisionProjectile | Physics.CollisionPlatform | Physics.CollisionStairs;
foreach (Limb limb in Limbs)
{
@@ -538,6 +537,8 @@ namespace Subsurface
public void Update(Camera cam, float deltaTime)
{
+ if (!character.Enabled) return;
+
UpdateNetplayerPosition();
Vector2 flowForce = Vector2.Zero;
@@ -605,7 +606,7 @@ namespace Subsurface
{
//create a splash particle
- Subsurface.Particles.Particle splash = GameMain.ParticleManager.CreateParticle("watersplash",
+ Barotrauma.Particles.Particle splash = GameMain.ParticleManager.CreateParticle("watersplash",
new Vector2(limb.Position.X, limbHull.Surface),
new Vector2(0.0f, Math.Abs(-limb.LinearVelocity.Y * 10.0f)),
0.0f);
diff --git a/Subsurface/Source/Characters/StatusEffect.cs b/Subsurface/Source/Characters/StatusEffect.cs
index 60fd2f13d..5efa952b9 100644
--- a/Subsurface/Source/Characters/StatusEffect.cs
+++ b/Subsurface/Source/Characters/StatusEffect.cs
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class StatusEffect
{
@@ -182,7 +182,8 @@ namespace Subsurface
ObjectProperty property;
foreach (IPropertyObject target in targets)
{
- if (targetNames!=null && !targetNames.Contains(target.Name)) continue;
+ //if (targetNames!=null && !targetNames.Contains(target.Name)) continue;
+
if (!target.ObjectProperties.TryGetValue(propertyNames[i], out property)) continue;
ApplyToProperty(property, propertyEffects[i], deltaTime);
diff --git a/Subsurface/Source/ContentPackage.cs b/Subsurface/Source/ContentPackage.cs
index aaf32d591..61283bedd 100644
--- a/Subsurface/Source/ContentPackage.cs
+++ b/Subsurface/Source/ContentPackage.cs
@@ -6,7 +6,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
public enum ContentType
{
diff --git a/Subsurface/Source/CoroutineManager.cs b/Subsurface/Source/CoroutineManager.cs
index d1ffb1f09..95b7a933b 100644
--- a/Subsurface/Source/CoroutineManager.cs
+++ b/Subsurface/Source/CoroutineManager.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
enum CoroutineStatus
{
diff --git a/Subsurface/Source/DebugConsole.cs b/Subsurface/Source/DebugConsole.cs
index 5677314ff..134c4d8d9 100644
--- a/Subsurface/Source/DebugConsole.cs
+++ b/Subsurface/Source/DebugConsole.cs
@@ -4,9 +4,9 @@ using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-using Subsurface.Networking;
+using Barotrauma.Networking;
-namespace Subsurface
+namespace Barotrauma
{
struct ColoredText
{
@@ -289,7 +289,7 @@ namespace Subsurface
DebugConsole.ThrowError("Illegal symbols in filename (../)");
return;
}
- Submarine.SaveCurrent(fileName +".gz");
+ Submarine.SaveCurrent(fileName +".sub");
NewMessage("map saved", Color.Green);
break;
case "loadmap":
diff --git a/Subsurface/Source/Events/MonsterEvent.cs b/Subsurface/Source/Events/MonsterEvent.cs
index feb097ed9..609bdc736 100644
--- a/Subsurface/Source/Events/MonsterEvent.cs
+++ b/Subsurface/Source/Events/MonsterEvent.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework;
using System;
-namespace Subsurface
+namespace Barotrauma
{
class MonsterEvent : ScriptedEvent
{
diff --git a/Subsurface/Source/Events/PropertyTask.cs b/Subsurface/Source/Events/PropertyTask.cs
index 33220132c..0f30ced22 100644
--- a/Subsurface/Source/Events/PropertyTask.cs
+++ b/Subsurface/Source/Events/PropertyTask.cs
@@ -1,4 +1,4 @@
-namespace Subsurface
+namespace Barotrauma
{
class PropertyTask : Task
{
diff --git a/Subsurface/Source/Events/Quests/MonsterQuest.cs b/Subsurface/Source/Events/Quests/MonsterQuest.cs
index 686ae94ac..7a62dd2d4 100644
--- a/Subsurface/Source/Events/Quests/MonsterQuest.cs
+++ b/Subsurface/Source/Events/Quests/MonsterQuest.cs
@@ -6,12 +6,10 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class MonsterQuest : Quest
{
- //string monsterName;
-
string monsterFile;
Character monster;
@@ -33,7 +31,7 @@ namespace Subsurface
monster = new AICharacter(monsterFile, ConvertUnits.ToSimUnits(position+level.Position));
}
-
+
public override void End()
{
if (!monster.IsDead)
diff --git a/Subsurface/Source/Events/Quests/Quest.cs b/Subsurface/Source/Events/Quests/Quest.cs
index 2f321fe1e..ad261e06b 100644
--- a/Subsurface/Source/Events/Quests/Quest.cs
+++ b/Subsurface/Source/Events/Quests/Quest.cs
@@ -6,7 +6,7 @@ using System.Reflection;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class Quest
{
@@ -104,7 +104,7 @@ namespace Subsurface
try
{
- t = Type.GetType("Subsurface." + type, true, true);
+ t = Type.GetType("Barotrauma." + type, true, true);
if (t == null)
{
DebugConsole.ThrowError("Error in " + configFile + "! Could not find a quest class of the type ''" + type + "''.");
diff --git a/Subsurface/Source/Events/Quests/SalvageQuest.cs b/Subsurface/Source/Events/Quests/SalvageQuest.cs
index 7dfa65f52..440fcc643 100644
--- a/Subsurface/Source/Events/Quests/SalvageQuest.cs
+++ b/Subsurface/Source/Events/Quests/SalvageQuest.cs
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class SalvageQuest : Quest
{
diff --git a/Subsurface/Source/Events/RepairTask.cs b/Subsurface/Source/Events/RepairTask.cs
index 9e132bfae..ef8472de6 100644
--- a/Subsurface/Source/Events/RepairTask.cs
+++ b/Subsurface/Source/Events/RepairTask.cs
@@ -1,4 +1,4 @@
-namespace Subsurface
+namespace Barotrauma
{
class RepairTask : Task
{
diff --git a/Subsurface/Source/Events/ScriptedEvent.cs b/Subsurface/Source/Events/ScriptedEvent.cs
index a216ce276..73a6e75d5 100644
--- a/Subsurface/Source/Events/ScriptedEvent.cs
+++ b/Subsurface/Source/Events/ScriptedEvent.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Reflection;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class ScriptedEvent
{
@@ -137,7 +137,7 @@ namespace Subsurface
try
{
- t = Type.GetType("Subsurface." + type, true, true);
+ t = Type.GetType("Barotrauma." + type, true, true);
if (t == null)
{
DebugConsole.ThrowError("Error in " + configFile + "! Could not find an event class of the type ''" + type + "''.");
diff --git a/Subsurface/Source/Events/ScriptedTask.cs b/Subsurface/Source/Events/ScriptedTask.cs
index 2fb257261..1f98d53c5 100644
--- a/Subsurface/Source/Events/ScriptedTask.cs
+++ b/Subsurface/Source/Events/ScriptedTask.cs
@@ -1,4 +1,4 @@
-namespace Subsurface
+namespace Barotrauma
{
class ScriptedTask : Task
{
diff --git a/Subsurface/Source/Events/Task.cs b/Subsurface/Source/Events/Task.cs
index 283eff24c..acea30f10 100644
--- a/Subsurface/Source/Events/Task.cs
+++ b/Subsurface/Source/Events/Task.cs
@@ -1,5 +1,5 @@
-namespace Subsurface
+namespace Barotrauma
{
class Task
{
diff --git a/Subsurface/Source/Events/TaskManager.cs b/Subsurface/Source/Events/TaskManager.cs
index 6600683d1..2f37db9fe 100644
--- a/Subsurface/Source/Events/TaskManager.cs
+++ b/Subsurface/Source/Events/TaskManager.cs
@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
-namespace Subsurface
+namespace Barotrauma
{
class TaskManager
{
diff --git a/Subsurface/Source/FrameCounter.cs b/Subsurface/Source/FrameCounter.cs
index 56440e095..11b400a5b 100644
--- a/Subsurface/Source/FrameCounter.cs
+++ b/Subsurface/Source/FrameCounter.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
-namespace Subsurface
+namespace Barotrauma
{
public class FrameCounter
{
diff --git a/Subsurface/Source/GUI/ComponentStyle.cs b/Subsurface/Source/GUI/ComponentStyle.cs
index 443e79558..ed3c94f29 100644
--- a/Subsurface/Source/GUI/ComponentStyle.cs
+++ b/Subsurface/Source/GUI/ComponentStyle.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIComponentStyle
{
diff --git a/Subsurface/Source/GUI/GUI.cs b/Subsurface/Source/GUI/GUI.cs
index 0ef39592d..6f0154088 100644
--- a/Subsurface/Source/GUI/GUI.cs
+++ b/Subsurface/Source/GUI/GUI.cs
@@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
-namespace Subsurface
+namespace Barotrauma
{
[Flags]
public enum Alignment
diff --git a/Subsurface/Source/GUI/GUIButton.cs b/Subsurface/Source/GUI/GUIButton.cs
index 7cff05c70..bb22f51fe 100644
--- a/Subsurface/Source/GUI/GUIButton.cs
+++ b/Subsurface/Source/GUI/GUIButton.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIButton : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIComponent.cs b/Subsurface/Source/GUI/GUIComponent.cs
index eb6e5d1bb..0e749962f 100644
--- a/Subsurface/Source/GUI/GUIComponent.cs
+++ b/Subsurface/Source/GUI/GUIComponent.cs
@@ -5,7 +5,7 @@ using EventInput;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
public abstract class GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIDropDown.cs b/Subsurface/Source/GUI/GUIDropDown.cs
index 89aa7091d..73c1bcd02 100644
--- a/Subsurface/Source/GUI/GUIDropDown.cs
+++ b/Subsurface/Source/GUI/GUIDropDown.cs
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIDropDown : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIFrame.cs b/Subsurface/Source/GUI/GUIFrame.cs
index e7b4b575d..73fbb72dd 100644
--- a/Subsurface/Source/GUI/GUIFrame.cs
+++ b/Subsurface/Source/GUI/GUIFrame.cs
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework;
using System;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIFrame : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIImage.cs b/Subsurface/Source/GUI/GUIImage.cs
index 379595291..abddcb103 100644
--- a/Subsurface/Source/GUI/GUIImage.cs
+++ b/Subsurface/Source/GUI/GUIImage.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIImage : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIListBox.cs b/Subsurface/Source/GUI/GUIListBox.cs
index 3182c8f86..ea5cb8e11 100644
--- a/Subsurface/Source/GUI/GUIListBox.cs
+++ b/Subsurface/Source/GUI/GUIListBox.cs
@@ -3,7 +3,7 @@ using System.Diagnostics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIListBox : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIMessage.cs b/Subsurface/Source/GUI/GUIMessage.cs
index 6d3274988..a07fa6cb2 100644
--- a/Subsurface/Source/GUI/GUIMessage.cs
+++ b/Subsurface/Source/GUI/GUIMessage.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class GUIMessage
{
diff --git a/Subsurface/Source/GUI/GUIMessageBox.cs b/Subsurface/Source/GUI/GUIMessageBox.cs
index c7143dff7..6768ca6be 100644
--- a/Subsurface/Source/GUI/GUIMessageBox.cs
+++ b/Subsurface/Source/GUI/GUIMessageBox.cs
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework;
using System.Collections.Generic;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIMessageBox : GUIFrame
{
diff --git a/Subsurface/Source/GUI/GUIProgressBar.cs b/Subsurface/Source/GUI/GUIProgressBar.cs
index 13b866a7b..53e33d6e4 100644
--- a/Subsurface/Source/GUI/GUIProgressBar.cs
+++ b/Subsurface/Source/GUI/GUIProgressBar.cs
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIProgressBar : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIScrollBar.cs b/Subsurface/Source/GUI/GUIScrollBar.cs
index ae857dee6..ec750e54c 100644
--- a/Subsurface/Source/GUI/GUIScrollBar.cs
+++ b/Subsurface/Source/GUI/GUIScrollBar.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIScrollBar : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUIStyle.cs b/Subsurface/Source/GUI/GUIStyle.cs
index 75e3f2008..f66c9c22b 100644
--- a/Subsurface/Source/GUI/GUIStyle.cs
+++ b/Subsurface/Source/GUI/GUIStyle.cs
@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
-namespace Subsurface
+namespace Barotrauma
{
public class GUIStyle
{
diff --git a/Subsurface/Source/GUI/GUITextBlock.cs b/Subsurface/Source/GUI/GUITextBlock.cs
index 7ea96e934..3bb302dcc 100644
--- a/Subsurface/Source/GUI/GUITextBlock.cs
+++ b/Subsurface/Source/GUI/GUITextBlock.cs
@@ -1,7 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-namespace Subsurface
+namespace Barotrauma
{
public class GUITextBlock : GUIComponent
{
diff --git a/Subsurface/Source/GUI/GUITextBox.cs b/Subsurface/Source/GUI/GUITextBox.cs
index d1c1f2b25..9187a8f37 100644
--- a/Subsurface/Source/GUI/GUITextBox.cs
+++ b/Subsurface/Source/GUI/GUITextBox.cs
@@ -4,7 +4,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-namespace Subsurface
+namespace Barotrauma
{
delegate void TextBoxEvent(GUITextBox sender);
diff --git a/Subsurface/Source/GUI/GUITickBox.cs b/Subsurface/Source/GUI/GUITickBox.cs
index 6caa9a870..f63ffcf10 100644
--- a/Subsurface/Source/GUI/GUITickBox.cs
+++ b/Subsurface/Source/GUI/GUITickBox.cs
@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-namespace Subsurface
+namespace Barotrauma
{
public class GUITickBox : GUIComponent
{
diff --git a/Subsurface/Source/GUI/TitleScreen.cs b/Subsurface/Source/GUI/TitleScreen.cs
index 1086fc4b3..a79b05e78 100644
--- a/Subsurface/Source/GUI/TitleScreen.cs
+++ b/Subsurface/Source/GUI/TitleScreen.cs
@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class LoadingScreen
{
diff --git a/Subsurface/Source/GameMain.cs b/Subsurface/Source/GameMain.cs
index b2cad1462..f54ffe3a8 100644
--- a/Subsurface/Source/GameMain.cs
+++ b/Subsurface/Source/GameMain.cs
@@ -5,14 +5,14 @@ using FarseerPhysics;
using FarseerPhysics.Dynamics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using Subsurface.Networking;
-using Subsurface.Particles;
+using Barotrauma.Networking;
+using Barotrauma.Particles;
using System.Collections;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Input;
using System.Xml;
-namespace Subsurface
+namespace Barotrauma
{
class GameMain : Game
{
diff --git a/Subsurface/Source/GameSession/CargoManager.cs b/Subsurface/Source/GameSession/CargoManager.cs
index ddb928db7..9167814ed 100644
--- a/Subsurface/Source/GameSession/CargoManager.cs
+++ b/Subsurface/Source/GameSession/CargoManager.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class CargoManager
{
diff --git a/Subsurface/Source/GameSession/CrewManager.cs b/Subsurface/Source/GameSession/CrewManager.cs
index 254535a93..67cd1b81f 100644
--- a/Subsurface/Source/GameSession/CrewManager.cs
+++ b/Subsurface/Source/GameSession/CrewManager.cs
@@ -5,7 +5,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class CrewManager
{
diff --git a/Subsurface/Source/GameSession/GameModes/GameMode.cs b/Subsurface/Source/GameSession/GameModes/GameMode.cs
index dba60f5c0..d9165b4a9 100644
--- a/Subsurface/Source/GameSession/GameModes/GameMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/GameMode.cs
@@ -4,7 +4,7 @@ using System;
using System.Collections.Generic;
using System.Reflection;
-namespace Subsurface
+namespace Barotrauma
{
class GameMode
{
diff --git a/Subsurface/Source/GameSession/GameModes/GameModePreset.cs b/Subsurface/Source/GameSession/GameModes/GameModePreset.cs
index a00a22270..a0efba237 100644
--- a/Subsurface/Source/GameSession/GameModes/GameModePreset.cs
+++ b/Subsurface/Source/GameSession/GameModes/GameModePreset.cs
@@ -4,7 +4,7 @@ using System.Linq;
using System.Reflection;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class GameModePreset
{
diff --git a/Subsurface/Source/GameSession/GameModes/QuestMode.cs b/Subsurface/Source/GameSession/GameModes/QuestMode.cs
index 18c768387..0c0f3304d 100644
--- a/Subsurface/Source/GameSession/GameModes/QuestMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/QuestMode.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class QuestMode : GameMode
{
diff --git a/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs b/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs
index 028481886..1e925e4c6 100644
--- a/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/SinglePlayerMode.cs
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
-namespace Subsurface
+namespace Barotrauma
{
class SinglePlayerMode : GameMode
{
diff --git a/Subsurface/Source/GameSession/GameModes/TraitorMode.cs b/Subsurface/Source/GameSession/GameModes/TraitorMode.cs
index 32c83220c..b9264e960 100644
--- a/Subsurface/Source/GameSession/GameModes/TraitorMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/TraitorMode.cs
@@ -1,8 +1,8 @@
using System;
using System.Linq;
-using Subsurface.Networking;
+using Barotrauma.Networking;
-namespace Subsurface
+namespace Barotrauma
{
class TraitorMode : GameMode
{
diff --git a/Subsurface/Source/GameSession/GameModes/TutorialMode.cs b/Subsurface/Source/GameSession/GameModes/TutorialMode.cs
index 228f2b02f..2b46b1c66 100644
--- a/Subsurface/Source/GameSession/GameModes/TutorialMode.cs
+++ b/Subsurface/Source/GameSession/GameModes/TutorialMode.cs
@@ -1,13 +1,13 @@
using FarseerPhysics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using Subsurface.Items.Components;
+using Barotrauma.Items.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace Subsurface
+namespace Barotrauma
{
class TutorialMode : GameMode
{
@@ -17,7 +17,7 @@ namespace Subsurface
public static void Start()
{
- Submarine.Load("Content/Map/TutorialSub.gz", "");
+ Submarine.Load("Content/Map/TutorialSub.sub", "");
GameMain.GameSession = new GameSession(Submarine.Loaded, "", GameModePreset.list.Find(gm => gm.Name.ToLower()=="tutorial"));
@@ -86,12 +86,15 @@ namespace Subsurface
private IEnumerable