Jump to content
  • 0

Invalid Motion Key Fix


DrTurk

Question

Does someone know how to fix the problem with Invalid Motion Key in debug mode?

 

float CActorInstance::GetMotionDuration(DWORD dwMotionKey)
{
	CGraphicThing * pMotion;
	
	if (!GetMotionThingPointer(dwMotionKey, &pMotion))
	{
		Tracenf("CActorInstance::GetMotionDuration - Cannot get motion: %d / %d",
			GET_MOTION_MODE(dwMotionKey), GET_MOTION_INDEX(dwMotionKey));
		return 0.0f;
	}

	if (0 == pMotion->GetMotionCount())
	{
#ifdef _DEBUG
		Tracenf("CActorInstance::GetMotionDuration - Invalid Motion Key : %d, %d, %d",
				GET_MOTION_MODE(dwMotionKey), GET_MOTION_INDEX(dwMotionKey), GET_MOTION_SUB_INDEX(dwMotionKey));
#endif
		return 0.0f;
	}

	CGrannyMotion * pGrannyMotion = pMotion->GetMotionPointer(0);
	return pGrannyMotion->GetDuration();
}

 

When you just stand ingame doing nothing, this gets spammed.

CActorInstance::GetMotionDuration - Invalid Motion Key : 1, 1, 0

 

Or can someone give me a hint where I have to search.

Edited by DrTurk (see edit history)
Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.