Jump to content

Recommended Posts

  • Honorable Member

Reversed From 23.1.4.0

It saves camera's close/far mode option

 .png

This is the hidden content, please

This is the hidden content, please

  • Metin2 Dev 270
  • kekw 1
  • Eyes 3
  • Good 58
  • Love 15
  • Love 112

 

Link to comment
https://metin2.dev/topic/30730-official-save-camera-mode-reversed/
Share on other sites

  • 3 months later...
  • Premium

Thanks working. 

On 4/28/2023 at 7:15 PM, hero2 said:

ss is recording, i don't understand

Here is an ss:

spacer.png
This option before was not saving his selected state when you exit the client and open it again.

Edited by DemOnJR
  • 2 years later...
  • 3 weeks later...
  • Honorable Member
On 2/8/2026 at 12:06 PM, RobinHoodye said:

how can i save the zoom ? i want to save the zoom too how can do?

It is kind of a "how the flour has made" in a how to make cake question.

 

Back to the topic, I do not know when and why but they already added a change for this which may be invalid (long time did not put that much focus on this section especially reverse engineering, the code below is a potencial maybe):

// PythonApplicationModule.cpp
struct SCameraDistance
{
	float fShortDistance;
	float fLongDistance;
};

static std::map<std::string, SCameraDistance> gs_mapCamera;
static bool gs_bCameraMapInit = false;

static inline void InitializeCameraDistances()
{
	if (gs_bCameraMapInit) return;
	gs_bCameraMapInit = true;
	gs_mapCamera["metin2_map_n_flame_dragon"] = { 6000.0f, 6000.0f };
	gs_mapCamera["metin2_12zi_stage"] = { 5000.0f, 5000.0f };
	gs_mapCamera["metin2_map_defensewave"] = { 5000.0f, 5000.0f };
	gs_mapCamera["metin2_map_mists_of_island"] = { 5000.0f, 5000.0f };
	gs_mapCamera["metin2_map_guild_whitedragon_boss"] = { 7000.0f, 7000.0f };
	gs_mapCamera["metin2_map_moonlight_boss"] = { 2500.0f, 5500.0f };
	gs_mapCamera["metin2_map_greedy_room"] = { 7000.0f, 7000.0f };
}

PyObject* appSetCameraMaxDistance(PyObject* poSelf, PyObject* poArgs)
{
	InitializeCameraDistances();

	SCameraDistance rDistance = { 2500.0f, 3500.0f };
	const char* c_szCurMapName = CPythonBackground::Instance().GetWarpMapName();
	std::map<std::string, SCameraDistance>::iterator it = gs_mapCamera.find(c_szCurMapName);
	float fMaxDistance = 0.0f;
	if (it == gs_mapCamera.end())
	{
		if (!PyTuple_GetFloat(poArgs, 0, &fMaxDistance))
			return Py_BuildException();

		fMaxDistance = fMINMAX(rDistance.fShortDistance, fMaxDistance, rDistance.fLongDistance); // this line is not in the official one, I added to it.
	}
	else
	{
		rDistance = it->second;
		if (CPythonSystem::Instance().GetCameraMode())
			fMaxDistance = rDistance.fLongDistance;
		else
			fMaxDistance = rDistance.fShortDistance;
	}

	CCamera::SetCameraMaxDistance(fMaxDistance);
	return Py_BuildNone();
}

 

This will ignore the default values from the constInfo on the predefined maps and will set the data from the std::map regarding the options.

  • Love 3

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.