Peanut_Brother
Sergeant
I'm writing a mod that involves a fist fight in a bar (I'm using Mission.StartCustomFight() and passing dropWeapons=true as an arg).
After a few seconds into testing the fight, it crashes with a System.NullReferenceException.
After doing some debugging, it looks like there might need to be an additional null check in the following method:
namespace: Sandbox
Class: SandboxAgentApplyDamageModel
Method: DecideCrushedThrough
line 307
Upon the crash, defendItem's value is null. I can provide more information if needed.
Thanks!
After a few seconds into testing the fight, it crashes with a System.NullReferenceException.
After doing some debugging, it looks like there might need to be an additional null check in the following method:
namespace: Sandbox
Class: SandboxAgentApplyDamageModel
Method: DecideCrushedThrough
line 307
C#:
if (defendItem.IsShield)
{
num *= 1.2f;
}
Upon the crash, defendItem's value is null. I can provide more information if needed.
Thanks!