Jump to content

Get Different Watertypes


Recommended Posts

  • Bot

M2 Download Center

This is the hidden content, please
( Internal )

All what u need is just the Clientbinary-Source.
 
Fristly move to /gamelib/MapOutdoorWater.cpp.
There u edit the function:
 

Spoiler
void CMapOutdoor::LoadWaterTexture()
{
	UnloadWaterTexture();
	char buf[256];
	for (int i = 0; i < 30; ++i)
	{
		sprintf(buf, "d:/ymir Work/special/water/%02d.dds",  i+1);
		m_WaterInstances[i].SetImagePointer((CGraphicImage *) CResourceManager::Instance().GetResourcePointer(buf));
	}
}

to:

void CMapOutdoor::LoadWaterTexture()
{
	UnloadWaterTexture();
	char buf[256];
	for (int i = 0; i < 30; ++i)
	{
		sprintf(buf, "d:/ymir Work/special/water_%d/%02d.dds", GetWaterType(),  i+1);
		m_WaterInstances[i].SetImagePointer((CGraphicImage *) CResourceManager::Instance().GetResourcePointer(buf));
	}
}

 

Now move to /gamelib/MapOutdoorLoad.cpp and add in the bool CMapOutdoor::LoadSetting(const char * c_szFileName) function:

 

 

Under exceptions:

Spoiler
if (stTokenVectorMap.end() == stTokenVectorMap.find("watertype"))
	{
		TraceError("MapOutdoor::LoadSetting(c_szFileName=%s) - FIND 'watertype' - FAILED", c_szFileName);
		return false;
	}

BYTE WaterType = atoi(stTokenVectorMap["watertype"][0].c_str());
if (WaterType < 0 || WaterType > 4)
	{
		TraceError("MapOutdoor::LoadSetting(c_szFileName=%s) - WATERTYPE IS NOT GREATER THAN 0 OR LOWER THAN 4", c_szFileName);
		return false;
	}
SetWaterType(WaterType);

 

Now at last move to /gamelib/MapOutdoor.h

And add there under: WORD m_wPatchCount;

Spoiler
//Wasser Typen
BYTE m_bWaterType;
const BYTE GetWaterType() { return m_bWaterType; }
void SetWaterType(BYTE Type) { m_bWaterType = Type; }

 

 

Now u can use 5 different watertypes.
Just rename the water to water_0 and the new to water_1 upto 4.
Remeber u need to add in the setting.txt a line which contains the watertype.

(Exampel)

ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	4	5
BasePosition	921600	204800
TextureSet	texturesetmetin2_C1.txt
Environment	C1.msenv
WaterType 0

GreetZz Raicon

  • Metin2 Dev 22
  • Think 2
  • Good 4
  • Love 2
  • Love 3

english_banner.gif

Link to comment
Share on other sites

  • 2 years later...
  • 4 years later...


  • Similar Content

  • Activity

    1. 11

      When Uninstalling Gaya System

    2. 11

      When Uninstalling Gaya System

    3. 11

      When Uninstalling Gaya System

    4. 11

      When Uninstalling Gaya System

    5. 11

      When Uninstalling Gaya System

    6. 11

      When Uninstalling Gaya System

    7. 11

      When Uninstalling Gaya System

    8. 11

      When Uninstalling Gaya System

    9. 8

      Use Items with the Effect of Use

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.