Page MenuHomeFeedback Tracker

DayZPlayerImplementSwimming -> HandleSwimming - Mistake
Acknowledged, UrgentPublic

Description

When enabling animation on the bot using the function:
HumanCommandActionCallback a = HumanCommandActionCallback.Cast( unit.StartCommand_Action(DayZPlayerConstants.CMD_GESTUREFB_SOS, HumanCommandActionCallback,0));

We see an error in the server logs:
SCRIPT (E): NULL pointer to instance
Class: 'DayZPlayerImplementSwimming'
Function: 'HandleSwimming'
Stack trace:
scripts/4_World/entities\dayzplayerimplementswimming.c:58
scripts/4_World/entities\dayzplayerimplement.c:1934

According to the logs, I determined that at the time of completion of the animation in HandleSwimming, the pCurrentCommandID variable returns another value of 20, but the pCMove variable is already zero, in the next frame pCurrentCommandID is already 22, as it is necessary, since the animation is already being performed.

Temporary solution:
modded class DayZPlayerImplementSwimming
{
override bool HandleSwimming(int pCurrentCommandID, HumanCommandMove pCMove, HumanMovementState pState)
{

		if (pCMove == NULL)return false;
		return super.HandleSwimming(pCurrentCommandID,pCMove,pState);

}
}

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General

Event Timeline

komer created this task.Oct 28 2022, 10:28 PM
Geez changed the task status from New to Acknowledged.Oct 31 2022, 12:11 PM