Jump to content

Invalid Motion Key Fix


Recommended Posts

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
Link to comment
Share on other sites

  • 3 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.