CaptainLucifer 3 Posted January 9, 2022 Share Posted January 9, 2022 Hello guys, Is there any solution to this problem experienced on many servers? 1 1 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2339 Posted January 9, 2022 Active Member Share Posted January 9, 2022 @CaptainLucifer It's not only for the warrior but for all characters. I have the same issue. 1 I'll be always helpful! Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted January 9, 2022 Author Share Posted January 9, 2022 10 minutes ago, ReFresh said: @CaptainLucifer It's not only for the warrior but for all characters. I have the same issue. This is really interesting bug. I've been searching everywhere for days and can't find a solution. Link to comment Share on other sites More sharing options...
Active Member ReFresh 2339 Posted January 9, 2022 Active Member Share Posted January 9, 2022 @CaptainLucifer Would be nice if some solution for this exist. I'll be always helpful! Link to comment Share on other sites More sharing options...
Developer Mitachi 1454 Posted January 9, 2022 Developer Share Posted January 9, 2022 (edited) Some time ago I had such a problem and if I'm not mistaken, the problem was in Srcs/Server/game/src/input_main.cpp int CInputMain::SyncPosition(LPCHARACTER ch, const char * c_pcData, size_t uiBytes) { .. } Technically, you should find a lot of commented code inside, on some files it is like this (Polish / Romanian source file) to be exact, this is the commented code block, you have to reactivate it: /* for (int i = 0; i < iCount; ++i, ++e) { //... } */ It seems that this "bug" is something they wanted, according to their pvp way. Test and let me know, replace the whole function with this: https://pastebin.com/tKycmCEp Edited January 9, 2022 by Mitachi 1 Link to comment Share on other sites More sharing options...
Sierra 3 Posted January 9, 2022 Share Posted January 9, 2022 30 minutes ago, Mitachi said: Some time ago I had such a problem and if I'm not mistaken, the problem was in Srcs/Server/game/src/input_main.cpp int CInputMain::SyncPosition(LPCHARACTER ch, const char * c_pcData, size_t uiBytes) { .. } Technically, you should find a lot of commented code inside, on some files it is like this (Polish / Romanian source file) to be exact, this is the commented code block, you have to reactivate it: /* for (int i = 0; i < iCount; ++i, ++e) { //... } */ It seems that this "bug" is something they wanted, according to their pvp way. Test and let me know, replace the whole function with this: https://pastebin.com/tKycmCEp It was active for me and I checked your pastebin if there's any difference but no. I have the same bug as OP. It is perfectly presented that the bug only happens after a while punching the enemy, also when the enemy moves and not let himself to punch a lot then there is no bug. Link to comment Share on other sites More sharing options...
Developer Mitachi 1454 Posted January 9, 2022 Developer Share Posted January 9, 2022 (edited) 51 minutes ago, Sierra said: It was active for me and I checked your pastebin if there's any difference but no. I have the same bug as OP. It is perfectly presented that the bug only happens after a while punching the enemy, also when the enemy moves and not let himself to punch a lot then there is no bug. Yeah, I also had the exact same bug. I was sure I fixed it the way above, it's a bug I fixed in 2018. After a few combos it happens. If I find anything else, I'll let you know, unfortunately in 2018 I wasn't using git, otherwise it would have taken me 5 seconds to tell you the solution Edited January 9, 2022 by Mitachi Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted January 9, 2022 Author Share Posted January 9, 2022 51 minutes ago, Mitachi said: Yeah, I also had the exact same bug. I was sure I fixed it the way above, it's a bug I fixed in 2018. After a few combos it happens. If I find anything else, I'll let you know, unfortunately in 2018 I wasn't using git, otherwise it would have taken me 5 seconds to tell you the solution First, Thank you for solution. But i agreed with @Sierra Still same. If you can find true fix and share with us, i'll really glad. Link to comment Share on other sites More sharing options...
Active Member ReFresh 2339 Posted January 9, 2022 Active Member Share Posted January 9, 2022 (edited) @CaptainLucifer I just found a piece of code which could fix that problem. Spoiler char.cpp: // Find this: m_bOpeningSafebox = false; //And below change this: m_fSyncTime = get_float_time()-3; //To this: m_fSyncTime = get_dword_time()-3; //Then find: bool CHARACTER::CanMove() const //And in this function change this: if (get_float_time() - m_fSyncTime < 0.2f) //To this: if (get_dword_time() - m_fSyncTime < 50) //Then find this: bool CHARACTER::SetSyncOwner(LPCHARACTER ch, bool bRemoveFromList) //And in this function find this: m_fSyncTime = get_float_time(); //And change it to: m_fSyncTime = get_dword_time(); //Then find this: bool CHARACTER::IsSyncOwner(LPCHARACTER ch) const //And in this function find this: if (get_float_time() - m_fSyncTime >= 3.0f) //And change to this: if (get_dword_time() - m_fSyncTime >= 100) char.h //Find this: float m_fSyncTime; //And change to this: DWORD m_fSyncTime; Let me know if these changes solved your problem. Edited January 9, 2022 by ReFresh I'll be always helpful! Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted January 9, 2022 Author Share Posted January 9, 2022 (edited) 1 hour ago, ReFresh said: @CaptainLucifer I just found a piece of code which could fix that problem. Hide contents char.cpp: // Find this: m_bOpeningSafebox = false; //And below change this: m_fSyncTime = get_float_time()-3; //To this: m_fSyncTime = get_dword_time()-3; //Then find: bool CHARACTER::CanMove() const //And in this function change this: if (get_float_time() - m_fSyncTime < 0.2f) //To this: if (get_dword_time() - m_fSyncTime < 50) //Then find this: bool CHARACTER::SetSyncOwner(LPCHARACTER ch, bool bRemoveFromList) //And in this function find this: m_fSyncTime = get_float_time(); //And change it to: m_fSyncTime = get_dword_time(); //Then find this: bool CHARACTER::IsSyncOwner(LPCHARACTER ch) const //And in this function find this: if (get_float_time() - m_fSyncTime >= 3.0f) //And change to this: if (get_dword_time() - m_fSyncTime >= 100) char.h //Find this: float m_fSyncTime; //And change to this: DWORD m_fSyncTime; Let me know if these changes solved your problem. https://metin2.download/picture/88I6Hq2f6e6dq6M4wTBA80lcogz3Z158/.png Still same Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Vaynz 1889 Posted January 10, 2022 Active Member Share Posted January 10, 2022 (edited) "Let's kill source, and find best solution comment sync yeah.." This fix worked for my server, the bug apperead since 2020 February when Microsoft updated our windows. Char.cpp & Char.h game source and there is fix Char.h - search float m_fSyncTime; Change with DWORD m_fSyncTime; Char.cpp - search if (get_float_time() - m_fSyncTime < 0.2f) Change with if (get_dword_time() - m_fSyncTime < 50) Search m_fSyncTime = get_float_time(); Change with m_fSyncTime = get_dword_time(); Search if (get_float_time() - m_fSyncTime >= 3.0f) Change with if (get_dword_time() - m_fSyncTime >= 100) Edited January 10, 2022 by Vaynz 1 Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted January 10, 2022 Author Share Posted January 10, 2022 14 hours ago, Vaynz said: "Let's kill source, and find best solution comment sync yeah.." This fix worked for my server, the bug apperead since 2020 February when Microsoft updated our windows. Char.cpp & Char.h game source and there is fix Char.h - search float m_fSyncTime; Change with DWORD m_fSyncTime; Char.cpp - search if (get_float_time() - m_fSyncTime < 0.2f) Change with if (get_dword_time() - m_fSyncTime < 50) Search m_fSyncTime = get_float_time(); Change with m_fSyncTime = get_dword_time(); Search if (get_float_time() - m_fSyncTime >= 3.0f) Change with if (get_dword_time() - m_fSyncTime >= 100) No sir, not work Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted January 23, 2022 Author Share Posted January 23, 2022 Guys, UP! Link to comment Share on other sites More sharing options...
Management Karbust 4881 Posted January 25, 2022 Management Share Posted January 25, 2022 BUMP Link to comment Share on other sites More sharing options...
Wakanim 6 Posted February 23, 2022 Share Posted February 23, 2022 It's client souce part problem, not server if i remember i found the fix months ago Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted February 23, 2022 Author Share Posted February 23, 2022 5 hours ago, Wakanim said: It's client souce part problem, not server if i remember i found the fix months ago Can you share with us? Link to comment Share on other sites More sharing options...
CaptainLucifer 3 Posted June 7, 2022 Author Share Posted June 7, 2022 On 1/25/2022 at 12:04 PM, Karbust said: BUMP BUMP Link to comment Share on other sites More sharing options...
Premium Syreldar 1874 Posted June 7, 2022 Premium Share Posted June 7, 2022 (edited) It's worth noting that this bug only ever occurs if the mental warrior stands absolutely still doing nothing, and so it's not relevant anyhow under normal circumstances, but: ActorInstanceSync.cpp: bool CActorInstance::IsPushing() { return m_PhysicsObject.isBlending(); } to: bool CActorInstance::IsPushing() { return !IsResistFallen() && m_PhysicsObject.isBlending(); } Edited June 7, 2022 by Syreldar 1 "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 More sharing options...
CaptainLucifer 3 Posted June 12, 2022 Author Share Posted June 12, 2022 On 6/7/2022 at 10:38 PM, Syreldar said: It's worth noting that this bug only ever occurs if the mental warrior stands absolutely still doing nothing, and so it's not relevant anyhow under normal circumstances, but: ActorInstanceSync.cpp: bool CActorInstance::IsPushing() { return m_PhysicsObject.isBlending(); } to: bool CActorInstance::IsPushing() { return !IsResistFallen() && m_PhysicsObject.isBlending(); } This is not a solution. Even when the mental warrior is standing still, his coordinate must be transmitted to the opposite side when he is pushed. We really need help on this issue. Is there really no one on this forum who knows how to fix it? Link to comment Share on other sites More sharing options...
Premium Syreldar 1874 Posted June 12, 2022 Premium Share Posted June 12, 2022 4 minutes ago, CaptainLucifer said: This is not a solution. Even when the mental warrior is standing still, his coordinate must be transmitted to the opposite side when he is pushed. We really need help on this issue. Is there really no one on this forum who knows how to fix it? This solution fixes the issue that you presented. So it's the appropriate solution. If it generates another bug, post it and we'll try to fix it, else, don't look for something that doesn't exist. "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 More sharing options...
CaptainLucifer 3 Posted June 12, 2022 Author Share Posted June 12, 2022 18 minutes ago, Syreldar said: This solution fixes the issue that you presented. So it's the appropriate solution. If it generates another bug, post it and we'll try to fix it, else, don't look for something that doesn't exist. Attacking the character is blocked. It doesn't take damage. Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted June 12, 2022 Premium Share Posted June 12, 2022 Hmmm, it's not properly a bug. It's happening because you are not making any movement in the victim. Anyway thanks to this thread, after some check, I figured out that may be this the problem: File ActorInstanceSync.cpp: Replace the function void CActorInstance::__Push(int x, int y) { const D3DXVECTOR3& c_rv3Src=GetPosition(); const D3DXVECTOR3 c_v3Dst=D3DXVECTOR3(x, -y, c_rv3Src.z); const D3DXVECTOR3 c_v3Delta=c_v3Dst-c_rv3Src; const auto LoopValue = 100; const D3DXVECTOR3 inc = c_v3Delta / LoopValue; D3DXVECTOR3 v3Movement(0.0f, 0.0f, 0.0f); IPhysicsWorld* pWorld = IPhysicsWorld::GetPhysicsWorld(); if (!pWorld) return; for (int i = 0; i < LoopValue; ++i) { if (pWorld->isPhysicalCollision(c_rv3Src + v3Movement)) { ResetBlendingPosition(); return; } v3Movement += inc; } SetBlendingPosition(c_v3Dst); if (IsResistFallen()) return; if (!IsUsingSkill()) { const int len = sqrt(c_v3Delta.x*c_v3Delta.x+c_v3Delta.y*c_v3Delta.y); if (len > 150.0f) { InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); PushOnceMotion(CRaceMotionData::NAME_STAND_UP); } } } Yep, as you can see I just moved the order of execution of a statement. I leave the theory to you. 1 Link to comment Share on other sites More sharing options...
Premium Syreldar 1874 Posted June 12, 2022 Premium Share Posted June 12, 2022 2 hours ago, WeedHex said: Hmmm, it's not properly a bug. It's happening because you are not making any movement in the victim. Anyway thanks to this thread, after some check, I figured out that may be this the problem: File ActorInstanceSync.cpp: Replace the function void CActorInstance::__Push(int x, int y) { const D3DXVECTOR3& c_rv3Src=GetPosition(); const D3DXVECTOR3 c_v3Dst=D3DXVECTOR3(x, -y, c_rv3Src.z); const D3DXVECTOR3 c_v3Delta=c_v3Dst-c_rv3Src; const auto LoopValue = 100; const D3DXVECTOR3 inc = c_v3Delta / LoopValue; D3DXVECTOR3 v3Movement(0.0f, 0.0f, 0.0f); IPhysicsWorld* pWorld = IPhysicsWorld::GetPhysicsWorld(); if (!pWorld) return; for (int i = 0; i < LoopValue; ++i) { if (pWorld->isPhysicalCollision(c_rv3Src + v3Movement)) { ResetBlendingPosition(); return; } v3Movement += inc; } SetBlendingPosition(c_v3Dst); if (IsResistFallen()) return; if (!IsUsingSkill()) { const int len = sqrt(c_v3Delta.x*c_v3Delta.x+c_v3Delta.y*c_v3Delta.y); if (len > 150.0f) { InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); PushOnceMotion(CRaceMotionData::NAME_STAND_UP); } } } Yep, as you can see I just moved the order of execution of a statement. I leave the theory to you. That'll also fix the issue. But based on what I see here, it means the target will also be pushed way farther than intended while usually targets with Immunity to Fall (mental warriors) get pushed way less. "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 More sharing options...
Honorable Member martysama0134 7174 Posted June 12, 2022 Honorable Member Share Posted June 12, 2022 (edited) 4 hours ago, WeedHex said: Hmmm, it's not properly a bug. It's happening because you are not making any movement in the victim. Anyway thanks to this thread, after some check, I figured out that may be this the problem: File ActorInstanceSync.cpp: Replace the function void CActorInstance::__Push(int x, int y) { const D3DXVECTOR3& c_rv3Src=GetPosition(); const D3DXVECTOR3 c_v3Dst=D3DXVECTOR3(x, -y, c_rv3Src.z); const D3DXVECTOR3 c_v3Delta=c_v3Dst-c_rv3Src; const auto LoopValue = 100; const D3DXVECTOR3 inc = c_v3Delta / LoopValue; D3DXVECTOR3 v3Movement(0.0f, 0.0f, 0.0f); IPhysicsWorld* pWorld = IPhysicsWorld::GetPhysicsWorld(); if (!pWorld) return; for (int i = 0; i < LoopValue; ++i) { if (pWorld->isPhysicalCollision(c_rv3Src + v3Movement)) { ResetBlendingPosition(); return; } v3Movement += inc; } SetBlendingPosition(c_v3Dst); if (IsResistFallen()) return; if (!IsUsingSkill()) { const int len = sqrt(c_v3Delta.x*c_v3Delta.x+c_v3Delta.y*c_v3Delta.y); if (len > 150.0f) { InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); PushOnceMotion(CRaceMotionData::NAME_STAND_UP); } } } Yep, as you can see I just moved the order of execution of a statement. I leave the theory to you. This solves the issue client-side, but not server-side. When you respawn, you restart from where the one-sided fight started: I'm gonna check it further more. After relogin: Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 1 Check out my GitHub Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7174 Posted June 12, 2022 Honorable Member Share Posted June 12, 2022 (edited) 3 hours ago, Syreldar said: But based on what I see here, it means the target will also be pushed way farther than intended while usually targets with Immunity to Fall (mental warriors) get pushed way less. To solve this, I've tried to reduce the push by 20%: // VICTIM_COLLISION_TEST const D3DXVECTOR3& kVictimPos = rVictim.GetPosition(); auto externalForceRatio = 1.0f; if (rVictim.IsResistFallen()) externalForceRatio = 0.8f; // reduce external force almost like before rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce * externalForceRatio); // VICTIM_COLLISION_TEST_END ActorInstanceBattle.cpp CActorInstance::__ProcessDataAttackSuccess https://metin2.download/video/vMrt47r4elg57lFB6ym3v765UoC6q2MI/.mp4 0.7f Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 1 2 1 Check out my GitHub Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now