Developer Ikarus_ 2426 Posted June 16, 2020 Developer Share Posted June 16, 2020 (edited) Hi guys, A guy reported to me a weird bug about shamans w/m which are skipping collision when they are too fast to attack. On default source files it is still an unresolved bug which appear when the shaman's attack speed is more than 145/150. here a video which show how it is not getting the damage text for each hit on the stone. here the This is the hidden content, please Sign In or Sign Up . Spoiler ActorInstance.h //search: protected: void __RunNextCombo(); void __ClearCombo(); void __OnEndCombo(); void __ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill = 0, BOOL isSendPacket = TRUE); void __ProcessMotionEventAttackSuccess(DWORD dwMotionKey, BYTE byEventIndex, CActorInstance & rVictim); void __ProcessMotionAttackSuccess(DWORD dwMotionKey, CActorInstance & rVictim); //add under #ifdef __ENABLE_SHAMAN_ATTACK_FIX__ float __GetInvisibleTimeAdjust(const UINT uiSkill, const NRaceData::TAttackData& c_rAttackData); #endif ActorInstanceBattle.cpp //search : void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill, BOOL isSendPacket) { if (NRaceData::HIT_TYPE_NONE == c_rAttackData.iHittingType) return; InsertDelay(c_rAttackData.fStiffenTime); if (__CanPushDestActor(rVictim) && c_rAttackData.fExternalForce > 0.0f) { __PushCircle(rVictim); // VICTIM_COLLISION_TEST const D3DXVECTOR3& kVictimPos = rVictim.GetPosition(); rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce); //*nForceRatio/100.0f); // VICTIM_COLLISION_TEST_END } // Invisible Time if (IS_PARTY_HUNTING_RACE(rVictim.GetRace())) { if (uiSkill) // ÆÄƼ »ç³É ¸ó½ºÅÍ¶óµµ ½ºÅ³ÀÌ¸é ¹«Àû½Ã°£ Àû¿ë rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + c_rAttackData.fInvisibleTime; if (m_isMain) // #0000794: [M2KR] Æú¸®¸ðÇÁ - ¹ë·±½Ì ¹®Á¦ ŸÀÎ °ø°Ý¿¡ ÀÇÇÑ ¹«Àû ŸÀÓÀº °í·ÁÇÏÁö ¾Ê°í ÀڽŠ°ø°Ý¿¡ ÀÇÇѰ͸¸ üũÇÑ´Ù rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + c_rAttackData.fInvisibleTime; } else // ÆÄƼ »ç³É ¸ó½ºÅÍ°¡ ¾Æ´Ò °æ¿ì¸¸ Àû¿ë { rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + c_rAttackData.fInvisibleTime; } //make it like this: (take a look where __ENABLE_SHAMAN_ATTACK_FIX__ is used) void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill, BOOL isSendPacket) { if (NRaceData::HIT_TYPE_NONE == c_rAttackData.iHittingType) return; InsertDelay(c_rAttackData.fStiffenTime); if (__CanPushDestActor(rVictim) && c_rAttackData.fExternalForce > 0.0f) { __PushCircle(rVictim); // VICTIM_COLLISION_TEST const D3DXVECTOR3& kVictimPos = rVictim.GetPosition(); rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce); //*nForceRatio/100.0f); // VICTIM_COLLISION_TEST_END } #ifdef __ENABLE_SHAMAN_ATTACK_FIX__ // Invisible Time if (IS_PARTY_HUNTING_RACE(rVictim.GetRace())) { if (uiSkill) // ÆÄƼ »ç³É ¸ó½ºÅÍ¶óµµ ½ºÅ³ÀÌ¸é ¹«Àû½Ã°£ Àû¿ë rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + (c_rAttackData.fInvisibleTime - __GetInvisibleTimeAdjust(uiSkill, c_rAttackData)); if (m_isMain) // #0000794: [M2KR] Æú¸®¸ðÇÁ - ¹ë·±½Ì ¹®Á¦ ŸÀÎ °ø°Ý¿¡ ÀÇÇÑ ¹«Àû ŸÀÓÀº °í·ÁÇÏÁö ¾Ê°í ÀڽŠ°ø°Ý¿¡ ÀÇÇѰ͸¸ üũÇÑ´Ù rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + (c_rAttackData.fInvisibleTime - __GetInvisibleTimeAdjust(uiSkill, c_rAttackData)); } else // ÆÄƼ »ç³É ¸ó½ºÅÍ°¡ ¾Æ´Ò °æ¿ì¸¸ Àû¿ë { rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + (c_rAttackData.fInvisibleTime - __GetInvisibleTimeAdjust(uiSkill, c_rAttackData)); } #else // Invisible Time if (IS_PARTY_HUNTING_RACE(rVictim.GetRace())) { if (uiSkill) // ÆÄƼ »ç³É ¸ó½ºÅÍ¶óµµ ½ºÅ³ÀÌ¸é ¹«Àû½Ã°£ Àû¿ë rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + c_rAttackData.fInvisibleTime; if (m_isMain) // #0000794: [M2KR] Æú¸®¸ðÇÁ - ¹ë·±½Ì ¹®Á¦ ŸÀÎ °ø°Ý¿¡ ÀÇÇÑ ¹«Àû ŸÀÓÀº °í·ÁÇÏÁö ¾Ê°í ÀڽŠ°ø°Ý¿¡ ÀÇÇѰ͸¸ üũÇÑ´Ù rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + c_rAttackData.fInvisibleTime; } else // ÆÄƼ »ç³É ¸ó½ºÅÍ°¡ ¾Æ´Ò °æ¿ì¸¸ Àû¿ë { rVictim.m_fInvisibleTime = CTimer::Instance().GetCurrentSecond() + c_rAttackData.fInvisibleTime; } #endif // Stiffen Time rVictim.InsertDelay(c_rAttackData.fStiffenTime); //at the end of the file paste: #ifdef __ENABLE_SHAMAN_ATTACK_FIX__ float CActorInstance::__GetInvisibleTimeAdjust(const UINT uiSkill, const NRaceData::TAttackData& c_rAttackData) { static const int shamanw = 3, shamanm = 7; if ((GetRace() != shamanw && GetRace() != shamanm) || uiSkill != 0 || m_fAtkSpd < 1.3) return 0.0f; const auto scale = (m_fAtkSpd - 1.3) / 1.3; const auto inv = c_rAttackData.fInvisibleTime * 0.5; return inv * scale; } #endif ATTENTION: Since the problem is the InvisibleTime on Attack.msa which it is too high, we could think to reduce it without need to edit nothing in our source (and it may be more efficient), but honestly i preferred to make a function which calculating the "adjustment" of the invisible time using the speed attack to don't risk to get the reversed problem (2 damage on 1 hit when the attack speed is low) feel free to use one of the two options. Edited March 9, 2022 by Ikarus_ 119 3 1 1 1 3 1 29 7 83 My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Thrall 182 Posted June 26, 2020 Share Posted June 26, 2020 (edited) Hello, thanks for sharing, this problem is quite for a while and didn't found any fix for this! Again, thanks a lot! I am now adding it to the server. Edit: Works perfectly fine! Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
ByLost 142 Posted July 17, 2020 Share Posted July 17, 2020 I noticed that this error only occurs on low level stones. if you test on higher level stones this bug does not occur. Link to comment Share on other sites More sharing options...
Thrall 182 Posted July 18, 2020 Share Posted July 18, 2020 It depends i gues... in my case, it happends even in bosses, and every metin stone. Link to comment Share on other sites More sharing options...
Masakra 1 Posted July 25, 2020 Share Posted July 25, 2020 I'm had next weird problem with ninja, when I mount horse and using bow attack speed is lower than without horse, did you know something about this bug? Link to comment Share on other sites More sharing options...
Premium Ulthar 3099 Posted April 15, 2021 Premium Share Posted April 15, 2021 for me its not working. Build was success, and no errors ofc. but my shaman attack is the same. can you help me @Ikarus_? Ulthar Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2426 Posted April 15, 2021 Author Developer Share Posted April 15, 2021 18 hours ago, Ulthar said: for me its not working. Build was success, and no errors ofc. but my shaman attack is the same. can you help me @Ikarus_? check well the define arrives everywhere. try adding this at the beginning of "EterBase/Stdafx.h" #include "../UserInterface/Locale_inc.h" My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Premium Ulthar 3099 Posted April 15, 2021 Premium Share Posted April 15, 2021 (edited) 59 minutes ago, Ikarus_ said: check well the define arrives everywhere. try adding this at the beginning of "EterBase/Stdafx.h" #include "../UserInterface/Locale_inc.h" thanks for aswer! I added it, but nohing happened checked everyhing, but didnt find any strange looking part, so i dont know what is the problem :S Any idea?:/ https://metin2.download/picture/wth9W3oB0qHg9pope5yNLpQEn52tlne3/.gif Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 2 1 2 Ulthar Link to comment Share on other sites More sharing options...
Premium Ulthar 3099 Posted April 16, 2021 Premium Share Posted April 16, 2021 (edited) EVERYONE Who have the same problem like me: in the this function: void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill, BOOL isSendPacket) Delete the #else part! like this: Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Ulthar Link to comment Share on other sites More sharing options...
Developer Ikarus_ 2426 Posted April 19, 2021 Author Developer Share Posted April 19, 2021 (edited) On 4/16/2021 at 8:19 PM, Ulthar said: EVERYONE Who have the same problem like me: in the this function: void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill, BOOL isSendPacket) Delete the #else part! like this: The #else part is the original one inserted between #else and #endif to make it work as it was before apply the fix in case of for some reason you need to disable the fix. Honestly i don't think it make any difference since it was disabled by the fact the macro __ENABLE_SHAMAN_ATTACK_FIX__ was defined. In short i don't think the fact you removed the #else is the reason why now it is working for you. You can check it by adding again the removed part and test if the fix is still working. Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal My youtube channel on which you can see my works here Link to comment Share on other sites More sharing options...
Premium Ulthar 3099 Posted April 19, 2021 Premium Share Posted April 19, 2021 1 minute ago, Ikarus_ said: The #else part is the original one inserted between #else and #endif to make it work as it was before apply the fix in case of for some reason you need to disable the fix. Honestly i don't think it make any difference since it was disabled by the fact the macro __ENABLE_SHAMAN_ATTACK_FIX__ was defined. In short i don't think the fact you removed the #else is the reason why now it is working for you. You can check it by adding again the removed part and test if the fix is still working. i only edited this part, which is removed the #else. and its working for me im not a coder, but its working. so im happy with that. Thanks for the whole post! Ulthar Link to comment Share on other sites More sharing options...
narcisxb 26 Posted October 3, 2021 Share Posted October 3, 2021 (edited) On 4/19/2021 at 5:37 PM, Ulthar said: i only edited this part, which is removed the #else. and its working for me im not a coder, but its working. so im happy with that. Thanks for the whole post! You have to be kidding me. The part after else was not used anyway. Why do you people have to boast so hard with trash? That s there as a failsafe but it is not being used by the game. Edited October 5, 2021 by narcisxb Link to comment Share on other sites More sharing options...
Premium Ulthar 3099 Posted October 4, 2021 Premium Share Posted October 4, 2021 11 hours ago, narcisxb said: You have to be kidding me. The part after else was not used anyway. Why do you people have to boast so hard with trash? That s there as a failsafe but it is not being used by the game because of the macro definiton above. Did you read this part? : "im not a coder, but its working." Ulthar Link to comment Share on other sites More sharing options...
narcisxb 26 Posted October 5, 2021 Share Posted October 5, 2021 (edited) On 10/4/2021 at 12:20 PM, Ulthar said: Did you read this part? : "im not a coder, but its working." Whatever, good for you. Edited October 5, 2021 by narcisxb Link to comment Share on other sites More sharing options...
Premium Ulthar 3099 Posted October 17, 2021 Premium Share Posted October 17, 2021 On 10/5/2021 at 1:55 PM, narcisxb said: Whatever, good for you. yea ^^ 1 Ulthar Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted October 16, 2022 Share Posted October 16, 2022 On 10/5/2021 at 2:55 PM, narcisxb said: Whatever, good for you. because you didn't define the __ENABLE_SHAMAN_ATTACK_FIX__ . On 10/4/2021 at 12:20 PM, Ulthar said: Did you read this part? : "im not a coder, but its working." You didn`t difine the __ENABLE_SHAMAN_ATTACK_FIX__ Link to comment Share on other sites More sharing options...
welzi 2 Posted October 20, 2023 Share Posted October 20, 2023 On 2021. 04. 16. at 20:19, Ulthar said: MINDENKINEK , akinek hasonló problémája van, mint nekem: ebben a funkcióban: void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill, BOOL isSend the #Packet) rész törlése! mint ez: Thank you, your solution helped! 1 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts