Fix not dropping your items when dying while buckled (#1856)
* Fix not dropping your items when dying while buckled * Add test for dropping items while buckled and dead
This commit is contained in:
@@ -21,6 +21,11 @@ namespace Content.Server.Mobs
|
||||
/// <returns>False if the mob was already downed or couldn't set the state</returns>
|
||||
public static bool Down(IEntity entity, bool playSound = true, bool dropItems = true, bool force = false)
|
||||
{
|
||||
if (dropItems)
|
||||
{
|
||||
DropAllItemsInHands(entity, false);
|
||||
}
|
||||
|
||||
if (!force && !EffectBlockerSystem.CanFall(entity))
|
||||
{
|
||||
return false;
|
||||
@@ -45,11 +50,6 @@ namespace Content.Server.Mobs
|
||||
.PlayFromEntity(AudioHelpers.GetRandomFileFromSoundCollection("bodyfall"), entity, AudioHelpers.WithVariation(0.25f));
|
||||
}
|
||||
|
||||
if(dropItems)
|
||||
{
|
||||
DropAllItemsInHands(entity, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user