Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop
This commit is contained in:
@@ -85,7 +85,8 @@ namespace Barotrauma
|
||||
|
||||
partial void UpdateNetInput()
|
||||
{
|
||||
if (!(this is AICharacter) || IsRemotePlayer)
|
||||
//non-ai character (a character that was previously controlled by a player) or a remote player (which can be an AI character controlled by a player)
|
||||
if (this is not AICharacter || IsRemotePlayer)
|
||||
{
|
||||
if (!CanMove)
|
||||
{
|
||||
@@ -447,12 +448,7 @@ namespace Barotrauma
|
||||
if (!fixedRotation)
|
||||
{
|
||||
tempBuffer.WriteSingle(AnimController.Collider.Rotation);
|
||||
float MaxAngularVel = NetConfig.MaxPhysicsBodyAngularVelocity;
|
||||
AnimController.Collider.AngularVelocity =
|
||||
AnimController.Collider.PhysEnabled ?
|
||||
0.0f :
|
||||
NetConfig.Quantize(AnimController.Collider.AngularVelocity, -MaxAngularVel, MaxAngularVel, 8);
|
||||
tempBuffer.WriteRangedSingle(MathHelper.Clamp(AnimController.Collider.AngularVelocity, -MaxAngularVel, MaxAngularVel), -MaxAngularVel, MaxAngularVel, 8);
|
||||
tempBuffer.WriteSingle(AnimController.Collider.AngularVelocity);
|
||||
}
|
||||
|
||||
|
||||
@@ -497,6 +493,7 @@ namespace Barotrauma
|
||||
break;
|
||||
case CharacterStatusEventData statusEventData:
|
||||
WriteStatus(msg, statusEventData.ForceAfflictionData);
|
||||
msg.WriteBoolean(GodMode);
|
||||
break;
|
||||
case UpdateSkillsEventData updateSkillsData:
|
||||
if (Info?.Job is { } job)
|
||||
@@ -532,7 +529,14 @@ namespace Barotrauma
|
||||
}
|
||||
break;
|
||||
case AssignCampaignInteractionEventData _:
|
||||
msg.WriteByte((byte)CampaignInteractionType);
|
||||
|
||||
bool canClientInteract = true;
|
||||
if (CampaignInteractionType == CampaignMode.InteractionType.Talk &&
|
||||
ActiveConversation != null)
|
||||
{
|
||||
canClientInteract = ActiveConversation.CanClientStartConversation(c);
|
||||
}
|
||||
msg.WriteByte((byte)(canClientInteract ? CampaignInteractionType : CampaignMode.InteractionType.None));
|
||||
msg.WriteBoolean(RequireConsciousnessForCustomInteract);
|
||||
break;
|
||||
case ObjectiveManagerStateEventData objectiveManagerStateEventData:
|
||||
@@ -683,6 +687,7 @@ namespace Barotrauma
|
||||
{
|
||||
CharacterHealth.ServerWrite(msg);
|
||||
}
|
||||
|
||||
if (AnimController?.LimbJoints == null)
|
||||
{
|
||||
//0 limbs severed
|
||||
@@ -738,7 +743,7 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
Client ownerClient = GameMain.Server.ConnectedClients.Find(c => c.Character == this);
|
||||
Client ownerClient = GameMain.Server.ConnectedClients.Find(c => c.Character == this && (!c.SpectateOnly || !GameMain.Server.ServerSettings.AllowSpectating));
|
||||
if (ownerClient != null)
|
||||
{
|
||||
msg.WriteBoolean(true);
|
||||
|
||||
Reference in New Issue
Block a user