Jump to content

Inbuild GR2 Animation


Recommended Posts

can you help me? i have some errors in binnary.

Exemple: Error    261    error C2039: 'GetMotionPointer' : is not a member of 'CGraphicThing'   

Error    14    error C2039: 'shared_ptr' : is not a member of 'std'   
Error    200    error C2065: 'm_motions' : undeclared identifier    

Error    362    error C2143: syntax error : missing ',' before '<'    

Can someone help me?

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Premium
2 hours ago, zoowiS said:

can you help me? i have some errors in binnary.

Exemple: Error    261    error C2039: 'GetMotionPointer' : is not a member of 'CGraphicThing'   

Error    14    error C2039: 'shared_ptr' : is not a member of 'std'   
Error    200    error C2065: 'm_motions' : undeclared identifier    

Error    362    error C2143: syntax error : missing ',' before '<'    

Can someone help me?

Try with "std::shared_ptr"

Ulthar

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...
  • 4 months later...
  • 4 weeks later...
  • 1 month later...
  • Premium
Posted (edited)
On 8/15/2022 at 9:45 AM, Ulthar said:

I dont know why, but its not working for me 😕 Compiled without any error in vs2022, but the attached sashes with animations still without animation as before the edits 😕
Weapon is good, but sash isnt
https://metin2.download/picture/sjbb1YNr9u0HbOH60t0pYLh8L4rruPQx/.gif


 

EDIT

fixed



Problem was:

This part:

if (CGrannyLODController* pLODController = m_LODControllerVector[CRaceData::PART_SASH])
    {
        if (CGrannyModelInstance* pWeaponModelInstance = pLODController->GetModelInstance())
        {
            CGraphicThing* pItemGraphicThing = pItemData->GetModelThing();
            if (std::shared_ptr<CGrannyMotion> pItemMotion = pItemGraphicThing->GetMotionPointer(0))
            {
                pWeaponModelInstance->SetMotionPointer(pItemMotion);
            }
        }
    }

will go to: 

void CActorInstance::AttachSash(CItemData * pItemData, float fSpecular)
(in actorinstanceattach.cpp)

Instead of:
void CActorInstance::AttachWeapon(DWORD dwParentPartIndex, DWORD dwPartIndex, CItemData * pItemData)


I know it's like ancient post by now but might be useful to someone, don't forget to add 
 

case CRaceData::PART_SASH:

in ThingInstance.cpp:
 

	for (int i = 0; i < m_LODControllerVector.size(); ++i)
	{
		switch (i)
		{
		case CRaceData::PART_WEAPON:
		case CRaceData::PART_WEAPON_LEFT:
		case CRaceData::PART_SASH:
			break;

		default:
			SetMotionPointer(m_LODControllerVector[i]);
			break;
		}
	}
	return true;
}

 

Edited by steveballs10
Link to comment
Share on other sites

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.