Resolved Unarmed combat results in null reference exception.

正在查看此主题的用户

版本号
1.5.3
分支
Main
使用过模组或未使用过模组
是,我添加了模组。

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
C#:
if (defendItem.IsShield)
            {
                num *= 1.2f;
            }

Upon the crash, defendItem's value is null. I can provide more information if needed.


Thanks!
 
Forwarded to the QA team for further investigation. We will reach out again if we need more information. Thanks for reporting and sorry for any inconvenience!
 
I've been informed that this bug is fixed and will be sent to the live branch in the next updates. Thanks for reporting and sorry for any inconvenience!
 
后退
顶部 底部