Jump to content

Recommended Posts

  • Honorable Member

It depends. Shall we need the functionality of the ALT in the game to change the quickslot page and show the names around our character when the window is opened or not? Due the fact the keydown process is not executing during the change, I think the best solution is to block the keyup function too when the board is opened. Ofc it need some checks too, although the keychange processed with the OnKeyDown function.

  • Honorable Member

Surely blocking all key functions should be enough while you have the key change window opened. I don’t think you will be using the key functions while you even have the window open since your intention is to change some settings so I think it makes a little sense to block all key functions while the window is still open.

/// 1.
// Search
void CPythonPlayer::OnKeyDown(int iKey)
{

// Add below
	if (m_isOpenKeySettingWindow)
		return;

// 2.
// Search
void CPythonPlayer::OnKeyUp(int iKey)
{

// Add below
	if (m_isOpenKeySettingWindow)
		return;

After testing it looks correct now.

  • Love 1
8 hours ago, Owsap said:

Surely blocking all key functions should be enough while you have the key change window opened. I don’t think you will be using the key functions while you even have the window open since your intention is to change some settings so I think it makes a little sense to block all key functions while the window is still open.

/// 1.
// Search
void CPythonPlayer::OnKeyDown(int iKey)
{

// Add below
	if (m_isOpenKeySettingWindow)
		return;

// 2.
// Search
void CPythonPlayer::OnKeyUp(int iKey)
{

// Add below
	if (m_isOpenKeySettingWindow)
		return;

After testing it looks correct now.

Thank you, i tested and work ok. The teleport problem is not anymore, but when you login for first time the problem is back

@Owsap

1019 03:36:08571 :: Traceback (most recent call last):

1019 03:36:08571 ::   File "networkModule.py", line 247, in SetGamePhase

1019 03:36:08571 ::   File "game.py", line 127, in __init__

1019 03:36:08571 ::   File "uiKeyChange.py", line 208, in __init__

1019 03:36:08571 ::   File "uiKeyChange.py", line 285, in __LoadWindow

1019 03:36:08571 :: KeyError
1019 03:36:08571 :: : 
1019 03:36:08571 :: 64
1019 03:36:08571 :: 

IhmS72B.jpg

and,

i change and save the keys, but when I restart the game, it returns to its standard state.

Edited by Metin2 Dev
Core X - External 2 Internal
  • 6 months later...
  • 10 months later...
On 4/27/2022 at 12:40 AM, Alexander20 said:

Hi, did someone had the same problem?

 

Any sugestions?

  Hide contents

.png

Same problem!!

  • 4 weeks later...
  • 7 months later...
  • 2 years later...

There is unnecessary growth in this section. You can fix it this way. It may not be very important, but it's worth paying attention to.

PythonPlayerInputKeyboard.cpp

// Old

	if (CPythonApplication::Instance().IsPressed(DIK_LCONTROL) || CPythonApplication::Instance().IsPressed(DIK_RCONTROL))
	{
		if (m_keySettingMap[iKey + KEY_ADDKEYBUFFERCONTROL + DIK_LCONTROL] != 0)
		{
			iKey += KEY_ADDKEYBUFFERCONTROL + DIK_LCONTROL;
		}
	}
	else if (CPythonApplication::Instance().IsPressed(DIK_LMENU) || CPythonApplication::Instance().IsPressed(DIK_RMENU))
	{
		if (m_keySettingMap[iKey + KEY_ADDKEYBUFFERALT + DIK_LMENU] != 0)
		{
			iKey += KEY_ADDKEYBUFFERALT + DIK_LMENU;
		}
	}
	else if (CPythonApplication::Instance().IsPressed(DIK_LSHIFT) || CPythonApplication::Instance().IsPressed(DIK_RSHIFT))
	{
		if (m_keySettingMap[iKey + KEY_ADDKEYBUFFERSHIFT + DIK_LSHIFT] != 0)
		{
			iKey += KEY_ADDKEYBUFFERSHIFT + DIK_LSHIFT;
		}
	}

// New

	if (CPythonApplication::Instance().IsPressed(DIK_LCONTROL) || CPythonApplication::Instance().IsPressed(DIK_RCONTROL))
	{
		KeySettingMap::iterator itControl = m_keySettingMap.find(iKey + KEY_ADDKEYBUFFERCONTROL + DIK_LCONTROL);
		if (itControl != m_keySettingMap.end() && itControl->second != 0)
		{
			iKey += KEY_ADDKEYBUFFERCONTROL + DIK_LCONTROL;
		}
	}
	else if (CPythonApplication::Instance().IsPressed(DIK_LMENU) || CPythonApplication::Instance().IsPressed(DIK_RMENU))
	{
		KeySettingMap::iterator itAlt = m_keySettingMap.find(iKey + KEY_ADDKEYBUFFERALT + DIK_LMENU);
		if (itAlt != m_keySettingMap.end() && itAlt->second != 0)
		{
			iKey += KEY_ADDKEYBUFFERALT + DIK_LMENU;
		}
	}
	else if (CPythonApplication::Instance().IsPressed(DIK_LSHIFT) || CPythonApplication::Instance().IsPressed(DIK_RSHIFT))
	{
		KeySettingMap::iterator itShift = m_keySettingMap.find(iKey + KEY_ADDKEYBUFFERSHIFT + DIK_LSHIFT);
		if (itShift != m_keySettingMap.end() && itShift->second != 0)
		{
			iKey += KEY_ADDKEYBUFFERSHIFT + DIK_LSHIFT;
		}
	}

 

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.