Merge branch 'master' into new-netcode

Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Items/ItemInventory.cs
	Subsurface/Source/Networking/GameServer.cs
This commit is contained in:
Regalis
2016-11-09 17:58:56 +02:00
25 changed files with 486 additions and 262 deletions
+8 -7
View File
@@ -1123,17 +1123,18 @@ namespace Barotrauma
}
}
if (moveCam)
if (moveCam && needsAir)
{
float pressureEffect = 0.0f;
if (pressureProtection < 80.0f && AnimController.CurrentHull != null && AnimController.CurrentHull.LethalPressure > 50.0f)
if (pressureProtection < 80.0f &&
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure > 50.0f))
{
float pressure = AnimController.CurrentHull == null ? 100.0f : AnimController.CurrentHull.LethalPressure;
cam.Zoom = MathHelper.Lerp(cam.Zoom,
(AnimController.CurrentHull.LethalPressure / 50.0f) * Rand.Range(1.0f, 1.05f),
(AnimController.CurrentHull.LethalPressure - 50.0f) / 50.0f);
(pressure / 50.0f) * Rand.Range(1.0f, 1.05f),
(pressure - 50.0f) / 50.0f);
}
cam.OffsetAmount = MathHelper.Lerp(cam.OffsetAmount, (Submarine == null ? 400.0f : 250.0f)+pressureEffect, 0.05f);
cam.OffsetAmount = MathHelper.Lerp(cam.OffsetAmount, 250.0f, 0.05f);
}
cursorPosition = cam.ScreenToWorld(PlayerInput.MousePosition);