(570318151) Cleanup.

This commit is contained in:
Joonas Rikkonen
2019-04-08 13:34:48 +03:00
parent 2fe8139ffd
commit 8a227a4f2c
5 changed files with 4 additions and 13 deletions

View File

@@ -383,9 +383,7 @@ namespace Barotrauma
tempBuffer.Write(SimPosition.X);
tempBuffer.Write(SimPosition.Y);
float MaxVel = NetConfig.MaxPhysicsBodyVelocity;
AnimController.Collider.LinearVelocity = new Vector2(
MathHelper.Clamp(AnimController.Collider.LinearVelocity.X, -MaxVel, MaxVel),
MathHelper.Clamp(AnimController.Collider.LinearVelocity.Y, -MaxVel, MaxVel));
AnimController.Collider.LinearVelocity = NetConfig.Quantize(AnimController.Collider.LinearVelocity, -MaxVel, MaxVel, 12);
tempBuffer.WriteRangedSingle(AnimController.Collider.LinearVelocity.X, -MaxVel, MaxVel, 12);
tempBuffer.WriteRangedSingle(AnimController.Collider.LinearVelocity.Y, -MaxVel, MaxVel, 12);

View File

@@ -33,15 +33,13 @@ namespace Barotrauma
if (FarseerBody.Awake)
{
body.Enabled = true;
body.LinearVelocity = new Vector2(
MathHelper.Clamp(body.LinearVelocity.X, -MaxVel, MaxVel),
MathHelper.Clamp(body.LinearVelocity.Y, -MaxVel, MaxVel));
body.LinearVelocity = NetConfig.Quantize(body.LinearVelocity, -MaxVel, MaxVel, 12);
msg.WriteRangedSingle(body.LinearVelocity.X, -MaxVel, MaxVel, 12);
msg.WriteRangedSingle(body.LinearVelocity.Y, -MaxVel, MaxVel, 12);
if (!FarseerBody.FixedRotation)
{
body.AngularVelocity = MathHelper.Clamp(body.AngularVelocity, -MaxAngularVel, MaxAngularVel);
msg.WriteRangedSingle(body.AngularVelocity, -MaxAngularVel, MaxAngularVel, 8);
body.AngularVelocity = NetConfig.Quantize(body.AngularVelocity, -MaxAngularVel, MaxAngularVel, 8);
msg.WriteRangedSingle(MathHelper.Clamp(body.AngularVelocity, -MaxAngularVel, MaxAngularVel), -MaxAngularVel, MaxAngularVel, 8);
}
}

View File

@@ -70,7 +70,6 @@
<Character file="Content/Characters/Hammerhead/Hammerhead.xml" />
<Outpost file="Content/Map/Outposts/Outpost.sub" />
<Submarine file="Submarines/Orca.sub" />
<Submarine file="Submarines/Berilia.sub" />
<Submarine file="Submarines/Typhon.sub" />
<Submarine file="Submarines/Selkie.sub" />
<Submarine file="Submarines/Bunyip.sub" />

View File

@@ -1964,9 +1964,6 @@
<None Include="$(MSBuildThisFileDirectory)Content\Sounds\Impact\SoftImpact3.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)Submarines\Berilia.sub">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)Content\Characters\Carrier\CARRIER_alarmLoop.ogg">

View File

@@ -198,7 +198,6 @@ namespace Barotrauma
private void FindTargetHulls()
{
var idCard = character.Inventory.FindItemByIdentifier("idcard");
bool isCurrentHullOK = !HumanAIController.UnsafeHulls.Contains(character.CurrentHull) && !IsForbidden(character.CurrentHull);
targetHulls.Clear();