Fixed lag caused by character.damageLimb

This commit is contained in:
EvilFactory
2024-09-06 18:58:08 -03:00
parent 911fff14e9
commit 307c81c3bd
3 changed files with 10 additions and 10 deletions
@@ -4468,6 +4468,12 @@ namespace Barotrauma
{
if (Removed) { return new AttackResult(); }
AttackResult? retAttackResult = GameMain.LuaCs.Hook.Call<AttackResult?>("character.damageLimb", this, worldPosition, hitLimb, afflictions, stun, playSound, attackImpulse, attacker, damageMultiplier, allowStacking, penetration, shouldImplode);
if (retAttackResult != null)
{
return retAttackResult.Value;
}
//character inside the sub received damage from a monster outside the sub
//can happen during normal gameplay if someone for example fires a ranged weapon from outside,
//the intention of this error message is to diagnose an issue with monsters being able to damage characters from outside