Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -348,18 +348,9 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
else if (f2.Body.UserData is Character targetCharacter)
|
||||
{
|
||||
if (targetCharacter == picker || targetCharacter == User) { return false; }
|
||||
if (targetCharacter.IgnoreMeleeWeapons) { return false; }
|
||||
if (HitFriendlyTarget(targetCharacter)) { return false; }
|
||||
if (AllowHitMultiple)
|
||||
{
|
||||
if (hitTargets.Contains(targetCharacter)) { return false; }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hitTargets.Any(t => t is Character)) { return false; }
|
||||
}
|
||||
hitTargets.Add(targetCharacter);
|
||||
//only allow hitting limbs, not the main collider
|
||||
//otherwise it's difficult to make certain parts of the ragdoll not take hits by making them ignore collisions or melee weapons
|
||||
return false;
|
||||
}
|
||||
else if (!HitOnlyCharacters)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user