Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

boss victim calculation problem


xefsane0

Question

5 answers to this question

Recommended Posts

  • 0
  • Premium
Posted (edited)

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

Link to comment
Share on other sites

  • 0
  • Premium

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

Link to comment
Share on other sites

  • 0
  • Premium
Posted (edited)

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! 👊 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 0

      Need Help With Char_Item.cpp

    2. 0

      ULTERIUS2.COM

    3. 7

      Killua - Unholy God Set

    4. 2

      Visual studio 2022 compiling issue

    5. 991

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.