New wire sprite and switched the body from circle to capsule, tweaked physicsbody position lerping logic (catches up with the server faster)

This commit is contained in:
Regalis
2017-02-22 22:02:33 +02:00
parent d7aba531d7
commit 27e74490a0
6 changed files with 13 additions and 13 deletions
-3
View File
@@ -742,9 +742,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<Content Include="Content\Items\Electricity\wire.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Items\Pump\pump.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@@ -15,9 +15,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="15" density="30"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
@@ -38,8 +38,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Body radius="15" density="30"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
<Wire/>
@@ -59,8 +60,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Body radius="15" density="30"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
<Wire/>
@@ -80,8 +82,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Body radius="15" density="30"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
<Wire/>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

@@ -8,7 +8,7 @@
<Sprite texture ="captainhat.png" depth="0.6"/>
<Body radius="8" density="30"/>
<Body width="25" height="15" density="30"/>
<Wearable limbtype="Head" slots="Any,Head">
<sprite texture="captainhat.png" limb="Head" origin="0.5,0.9"/>
+1 -1
View File
@@ -500,7 +500,7 @@ namespace Barotrauma
{
//if there are more than 2 positions in the buffer,
//increase the interpolation speed to catch up with the server
float speedMultiplier = 0.9f + (float)Math.Pow((positionBuffer.Count - 2) / 5.0f, 2.0f);
float speedMultiplier = (float)Math.Pow(1.0f + (positionBuffer.Count - 2) / 10.0f, 2.0f);
netInterpolationState += (deltaTime * speedMultiplier) / (next.Timestamp - prev.Timestamp);
newPosition = Vector2.Lerp(prev.Position, next.Position, netInterpolationState);