Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -739,6 +739,12 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
picker.Inventory.FlashAllowedSlots(item, Color.Red);
|
||||
}
|
||||
else
|
||||
{
|
||||
//normally this would be done in the base.OnPicked method, but clients don't call it,
|
||||
//but instead rely on the server telling them to put the item in the inventory
|
||||
SoundPlayer.PlayUISound(GUISoundType.PickItem);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -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