v1.4.4.1 (Blood in the Water Update)

This commit is contained in:
Regalis11
2024-04-24 18:09:05 +03:00
parent 89b91d1c3e
commit ff1b8951a7
397 changed files with 15250 additions and 6479 deletions
@@ -16,7 +16,7 @@ namespace Barotrauma
public void ApplyDeathEffects()
{
RespawnManager.ReduceCharacterSkills(this);
RespawnManager.ReduceCharacterSkillsOnDeath(this);
RemoveSavedStatValuesOnDeath();
CauseOfDeath = null;
}
@@ -68,8 +68,7 @@ namespace Barotrauma
msg.WriteColorR8G8B8(Head.SkinColor);
msg.WriteColorR8G8B8(Head.HairColor);
msg.WriteColorR8G8B8(Head.FacialHairColor);
msg.WriteString(ragdollFileName);
msg.WriteIdentifier(HumanPrefabIds.NpcIdentifier);
msg.WriteIdentifier(MinReputationToHire.factionId);
if (!MinReputationToHire.factionId.IsEmpty)
@@ -80,11 +79,13 @@ namespace Barotrauma
{
msg.WriteUInt32(Job.Prefab.UintIdentifier);
msg.WriteByte((byte)Job.Variant);
var skills = Job.Prefab.Skills.OrderBy(s => s.Identifier);
var skills = Job.GetSkills().OrderBy(s => s.Identifier);
msg.WriteByte((byte)skills.Count());
foreach (SkillPrefab skillPrefab in skills)
foreach (var skill in skills)
{
msg.WriteSingle(Job.GetSkill(skillPrefab.Identifier)?.Level ?? 0.0f);
msg.WriteIdentifier(skill.Identifier);
msg.WriteSingle(skill.Level);
}
}
else
@@ -75,7 +75,7 @@ namespace Barotrauma
NetConfig.HighPrioCharacterPositionUpdateInterval,
priority);
if (IsDead)
if (IsDead && !AnimController.IsDraggedWithRope)
{
interval = Math.Max(interval * 2, 0.1f);
}
@@ -590,6 +590,31 @@ namespace Barotrauma
}
}
break;
case LatchedOntoTargetEventData latchedOntoTargetEventData:
msg.WriteBoolean(latchedOntoTargetEventData.IsLatched);
if (latchedOntoTargetEventData.IsLatched)
{
msg.WriteSingle(SimPosition.X);
msg.WriteSingle(SimPosition.Y);
msg.WriteSingle(latchedOntoTargetEventData.AttachSurfaceNormal.X);
msg.WriteSingle(latchedOntoTargetEventData.AttachSurfaceNormal.Y);
msg.WriteSingle(latchedOntoTargetEventData.AttachPos.X);
msg.WriteSingle(latchedOntoTargetEventData.AttachPos.Y);
msg.WriteInt32(latchedOntoTargetEventData.TargetLevelWallIndex);
if (latchedOntoTargetEventData.TargetStructureID != NullEntityID)
{
msg.WriteUInt16(latchedOntoTargetEventData.TargetStructureID);
}
else if (latchedOntoTargetEventData.TargetCharacterID != NullEntityID)
{
msg.WriteUInt16(latchedOntoTargetEventData.TargetCharacterID);
}
else
{
msg.WriteUInt16(NullEntityID);
}
}
break;
default:
throw new Exception($"Malformed character event: did not expect {eventData.GetType().Name}");
}