Jump to content

Recommended Posts

I have such a problem, when the boss uses skill, he sees the character ahead and goes towards him. And it only happens with the mental warrior

 

https://metin2.download/picture/EK7Lltc68gzM3lWI2wZ2slRnSl8fVzBw/.gif

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/29232-boss-victim-calculation-problem/
Share on other sites

  • Honorable Member

1. Open ActorInstanceSync.cpp:

Search for:

if (IsResistFallen())
	return;

Take that snippet and move it just above this check:

if (!IsUsingSkill())

 

2. Open ActorInstanceBattle.cpp: (Fix by @ martysama0134)

Search for:

rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce); //*nForceRatio/100.0f);

Substitute it with:

float fExternalForceRatio = 1.0f;
if (rVictim.IsResistFallen())
	fExternalForceRatio *= 0.75f;
rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce * fExternalForceRatio); //*nForceRatio/100.0f);

 

This allows the Push distance to still be reduced on Mental Warriors, while allowing the __Push function's SetBlendingPosition() to be executed, fixing this little desync issue.

Edited by Syreldar

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

  • Honorable Member

ActorInstanceSync.cpp:

Search for:

if (IsResistFallen())
	return;

Move this check just above this line:

if (!IsUsingSkill())

 

ActorInstanceBattle.cpp: (Fix by @ martysama0134)

Search for:

		// VICTIM_COLLISION_TEST
		const D3DXVECTOR3& kVictimPos = rVictim.GetPosition();
		rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce); //*nForceRatio/100.0f);
		// VICTIM_COLLISION_TEST_END

Substitute with:

		// VICTIM_COLLISION_TEST
		const D3DXVECTOR3& kVictimPos = rVictim.GetPosition();
		float fExternalForceRatio = 1.0f;
		if (rVictim.IsResistFallen())
			fExternalForceRatio *= 0.75f;
		rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce * fExternalForceRatio); //*nForceRatio/100.0f);
		// VICTIM_COLLISION_TEST_END

 

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

This is a normal bug on all servers. I fixed it some time ago but I don't remember how honestly ?

All I know it's from binary source:

https://metin2.download/picture/4Fz42lNRsJsRw2rW8mjn0747aZJI0CtK/.gif

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Active+ Member

GameLib/ActorInstanceBattle.cpp:

1. #include "../UserInterface/PythonNonPlayer.h" at the top under the other includes.

2. Look for:

Spoiler
extern bool IS_HUGE_RACE(unsigned int vnum);
    if(IS_HUGE_RACE(rkActorDst.GetRace()))
    {
        return false;
    }

Below add:

Spoiler
const CPythonNonPlayer::TMobTable* mobTable = CPythonNonPlayer::instance().GetTable(rkActorDst.GetRace());
    if (mobTable)
    {
        if (mobTable->bRank >= CPythonNonPlayer::MOB_RANK_BOSS)
        {
            return false;
        }
    }

This will fix the problem with bosses, which are using skills. If you're talking about player sync delay this is the only solution:

Edited by ReFresh
  • Love 1

I'll be always helpful!  😉

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.