This commit is contained in:
EvilFactory
2023-06-21 10:36:16 -03:00
30 changed files with 242 additions and 137 deletions
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.0.20.1</Version>
<Version>1.0.21.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.0.20.1</Version>
<Version>1.0.21.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
@@ -380,10 +380,9 @@ namespace Barotrauma
tempBuffer.WriteBoolean(aiming);
tempBuffer.WriteBoolean(shoot);
tempBuffer.WriteBoolean(use);
if (AnimController is HumanoidAnimController)
{
tempBuffer.WriteBoolean(((HumanoidAnimController)AnimController).Crouching);
}
tempBuffer.WriteBoolean(AnimController is HumanoidAnimController { Crouching: true });
tempBuffer.WriteBoolean(attack);
Vector2 relativeCursorPos = cursorPosition - AimRefPosition;
@@ -434,7 +433,17 @@ namespace Barotrauma
if (writeStatus)
{
WriteStatus(tempBuffer);
AIController?.ServerWrite(tempBuffer);
tempBuffer.WriteBoolean(AIController is EnemyAIController);
if (AIController is EnemyAIController enemyAi)
{
tempBuffer.WriteByte((byte)enemyAi.State);
tempBuffer.WriteBoolean(enemyAi.PetBehavior is PetBehavior);
if (enemyAi.PetBehavior is PetBehavior petBehavior)
{
tempBuffer.WriteByte((byte)((petBehavior.Happiness / petBehavior.MaxHappiness) * byte.MaxValue));
tempBuffer.WriteByte((byte)((petBehavior.Hunger / petBehavior.MaxHunger) * byte.MaxValue));
}
}
HealthUpdatePending = false;
}
}
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.0.20.1</Version>
<Version>1.0.21.0</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>