Jump to content

Can we get rid of this VISUAL BUG?


Go to solution Solved by CONTROL,

Recommended Posts

  • Active+ Member
Posted (edited)

Hello metin2 community.

 

Can we somehow get rid of this visual bug that exists in all of our clients?

Video: https://metin2.download/video/Rs85rr2R552tGDLJAh3QW64595l3sOV4/.mp4

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Eyes 1

spacer.png

Link to comment
Share on other sites

  • Solution

PythonPlayerInput.cpp

 

Spoiler
add on top:
uint32_t m_TimeToClick = 0;
                                                          
adjust:
void CPythonPlayer::__OnClickGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)
{
	if (m_TimeToClick >= timeGetTime())
		return;

	if (!__IsMovableGroundDistance(rkInstMain, c_rkPPosPickedGround)) {
		m_TimeToClick = timeGetTime() + 1000; // Milliseconds To Click Again
		return;
	}

	if (rkInstMain.NEW_MoveToDestPixelPositionDirection(c_rkPPosPickedGround))
		__ShowPickedEffect(c_rkPPosPickedGround);
}
adjust:
void CPythonPlayer::__OnPressGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)
{
	if (m_TimeToClick >= timeGetTime())
		return;

	__ClearReservedAction();
	__ClearAutoAttackTargetActorID();

	if (NEW_CancelFishing())
		return;

	if (!__IsMovableGroundDistance(rkInstMain, c_rkPPosPickedGround)) {
		m_TimeToClick = timeGetTime() + 1000; // Milliseconds To Click Again
		return;
	}

	if (!rkInstMain.NEW_MoveToDestPixelPositionDirection(c_rkPPosPickedGround))
	{
		__ReserveClickGround(c_rkPPosPickedGround);
		return;
	}
}

 

 

this should fix the issue and ofc u can adjust the 1000 Milliseconds as u like : )

GL

 

Link to comment
Share on other sites

  • Active+ Member
6 hours ago, CONTROL said:

PythonPlayerInput.cpp

 

  Hide contents
add on top:
uint32_t m_TimeToClick = 0;
                                                          
adjust:
void CPythonPlayer::__OnClickGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)
{
	if (m_TimeToClick >= timeGetTime())
		return;

	if (!__IsMovableGroundDistance(rkInstMain, c_rkPPosPickedGround)) {
		m_TimeToClick = timeGetTime() + 1000; // Milliseconds To Click Again
		return;
	}

	if (rkInstMain.NEW_MoveToDestPixelPositionDirection(c_rkPPosPickedGround))
		__ShowPickedEffect(c_rkPPosPickedGround);
}
adjust:
void CPythonPlayer::__OnPressGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)
{
	if (m_TimeToClick >= timeGetTime())
		return;

	__ClearReservedAction();
	__ClearAutoAttackTargetActorID();

	if (NEW_CancelFishing())
		return;

	if (!__IsMovableGroundDistance(rkInstMain, c_rkPPosPickedGround)) {
		m_TimeToClick = timeGetTime() + 1000; // Milliseconds To Click Again
		return;
	}

	if (!rkInstMain.NEW_MoveToDestPixelPositionDirection(c_rkPPosPickedGround))
	{
		__ReserveClickGround(c_rkPPosPickedGround);
		return;
	}
}

 

 

this should fix the issue and ofc u can adjust the 1000 Milliseconds as u like : )

GL

 

This fixes it... but I don;t really like the fix.

Isn;t there any fix without the time check?

spacer.png

Link to comment
Share on other sites

  • Active+ Member
1 hour ago, CONTROL said:

Like what .. magic ?

It's a problem that occurre when you spam a walkable + unwalkable areas, there's no other solution better than a simple timer ...

animation related fix or something lmao I don't know.

 

but thank you anyway!! ? 

spacer.png

Link to comment
Share on other sites

  • Active+ Member
13 hours ago, CONTROL said:

PythonPlayerInput.cpp

 

  Reveal hidden contents
add on top:
uint32_t m_TimeToClick = 0;
                                                          
adjust:
void CPythonPlayer::__OnClickGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)
{
	if (m_TimeToClick >= timeGetTime())
		return;

	if (!__IsMovableGroundDistance(rkInstMain, c_rkPPosPickedGround)) {
		m_TimeToClick = timeGetTime() + 1000; // Milliseconds To Click Again
		return;
	}

	if (rkInstMain.NEW_MoveToDestPixelPositionDirection(c_rkPPosPickedGround))
		__ShowPickedEffect(c_rkPPosPickedGround);
}
adjust:
void CPythonPlayer::__OnPressGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)
{
	if (m_TimeToClick >= timeGetTime())
		return;

	__ClearReservedAction();
	__ClearAutoAttackTargetActorID();

	if (NEW_CancelFishing())
		return;

	if (!__IsMovableGroundDistance(rkInstMain, c_rkPPosPickedGround)) {
		m_TimeToClick = timeGetTime() + 1000; // Milliseconds To Click Again
		return;
	}

	if (!rkInstMain.NEW_MoveToDestPixelPositionDirection(c_rkPPosPickedGround))
	{
		__ReserveClickGround(c_rkPPosPickedGround);
		return;
	}
}

 

 

this should fix the issue and ofc u can adjust the 1000 Milliseconds as u like : )

GL

 

only need to do the 

 

void CPythonPlayer::__OnPressGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)

part ?

spacer.png

Link to comment
Share on other sites

Posted (edited)
50 minutes ago, HFWhite said:

Ok so, I found a fix which does not need time check ?

I made the continuous click only possible from a certain distance from the main character.

const float MIN_CLICK_DISTANCE = 50.0f;

you can still reach an edge where it's (walkable/clickable + unwalkable/unclickable areas) and do the trick ..

as i said (nothing) will be better than a timer 

just simply give the character a time to execute the animation, what is so bad about that ?

7 hours ago, HFWhite said:

only need to do the 

 

void CPythonPlayer::__OnPressGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround)

part ?

your choice, but the trick still can be done with quick click's, i just found it disturbing so i fix it too ..

Edited by CONTROL
Link to comment
Share on other sites

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.