Commit Graph

301 Commits

Author SHA1 Message Date
SuntrustDev
41aecfbc4d Implement uniform scaling (Fixes GF large maps marker positionng issues)
Clear guild terrain marker on map change
Add AtlasScale capability
2026-02-17 14:46:41 +01:00
rtw1x1
a0279b8f4b Merge pull request #109 from MindRapist/mr-14
Fog fixes
2026-02-16 17:55:36 +00:00
Mind Rapist
3e604d5f10 Fog fixes 2026-02-16 16:47:52 +02:00
rtw1x1
2c73eb7bb0 Merge pull request #108 from MindRapist/mr-12
Various fixes
2026-02-15 20:46:19 +00:00
Mind Rapist
74a93ad116 Various fixes 2026-02-15 21:40:52 +02:00
rtw1x1
fb48dbc9ce Merge pull request #106 from mq1n/main
fix some problems
2026-02-15 17:58:28 +00:00
Koray
cd2529ee15 prevent leaf render AV and harden leaf shader setup for speedtree
- Guard leaf LOD access in CSpeedTreeWrapper::RenderLeaves() to avoid out-of-bounds indexing of m_pLeafVertexBuffer and m_pLeavesUpdatedByCpu.
  - Skip leaf update/draw when LOD is invalid, inactive, empty, or has no vertex buffer.
  - Add early safety returns for missing leaf buffer arrays and zero LOD count.
  - Guard CSpeedTreeWrapper::EndLeafForTreeType() against null m_pLeavesUpdatedByCpu.
  - Add shader re-init path in wrapper render entrypoints via CSpeedTreeForestDirectX8::EnsureVertexShaders() when cached shader state is missing.
  - Introduce public EnsureVertexShaders() in SpeedTreeForestDirectX8 while keeping InitVertexShaders() private (resolves private-access compile error).
  - Fix leaf shader input declaration to emit dcl_texcoord2 v9 for both GPU wind and GPU leaf placement configurations.
  - Make LoadLeafShader() atomic: create new shader/decl first, then swap only if both succeed, preserving previous valid shader state on failure.
  - Improve leaf shader failure logs to include HRESULT for easier diagnosis.
2026-02-15 16:03:18 +03:00
Koray
cfe3c3cb7c Fix SpeedTree LOD strip handling to render all strips per LOD 2026-02-15 15:40:54 +03:00
Koray
acb0ac0af5 fix missing resource exception handling
Unhandled exception at 0x00007FF9433E8B9C (KERNELBASE.dll) in metin2client__20260215_143044.dmp: 0xE06D7363: Microsoft C++ Exception (parameters: 0x0000000019930520, 0x0000001E1CF2CF80, 0x00007FF698014258, 0x00007FF696940000).

 	[External Code]
>	Metin2_Debug.exe!std::filesystem::_Throw_fs_error(const char * _Op, const std::error_code & _Error, const std::filesystem::path & _Path1) Line 1863	C++
 	Metin2_Debug.exe!std::filesystem::exists(const std::filesystem::path & _Target) Line 3463	C++
 	Metin2_Debug.exe!CPackManager::IsExist(std::basic_string_view<char,std::char_traits<char>> path) Line 95	C++
 	Metin2_Debug.exe!CResourceManager::IsFileExist(const char * c_szFileName) Line 498	C++
 	Metin2_Debug.exe!CArea::__SetObjectInstance_SetBuilding(CArea::SObjectInstance * pObjectInstance, const CArea::SObjectData * c_pData, CProperty * pProperty) Line 599	C++
 	Metin2_Debug.exe!CArea::__SetObjectInstance(CArea::SObjectInstance * pObjectInstance, const CArea::SObjectData * c_pData) Line 479	C++
 	Metin2_Debug.exe!CArea::__Load_BuildObjectInstances() Line 449	C++
 	Metin2_Debug.exe!CArea::Load(const char * c_szPathName) Line 750	C++
 	Metin2_Debug.exe!CMapOutdoor::LoadArea(unsigned short wAreaCoordX, unsigned short wAreaCoordY, unsigned short wCellCoordX, unsigned short wCellCoordY) Line 173	C++
 	Metin2_Debug.exe!CMapOutdoor::Update(float fX, float fY, float fZ) Line 103	C++
 	Metin2_Debug.exe!CMapOutdoor::Load(float x, float y, float z) Line 40	C++
 	Metin2_Debug.exe!CMapManager::LoadMap(const std::string & c_rstrMapName, float x, float y, float z) Line 124	C++
 	Metin2_Debug.exe!CPythonBackground::Warp(unsigned long dwX, unsigned long dwY) Line 744	C++
 	Metin2_Debug.exe!CPythonNetworkStream::Warp(long lGlobalX, long lGlobalY) Line 374	C++
 	Metin2_Debug.exe!netWarp(_object * poSelf, _object * poArgs) Line 81	C++
 	[External Code]
 	Metin2_Debug.exe!CPythonLauncher::RunFile(const char * c_szFileName) Line 319	C++
 	Metin2_Debug.exe!RunMainScript(CPythonLauncher & pyLauncher, const char * lpCmdLine) Line 246	C++
 	Metin2_Debug.exe!Main(HINSTANCE__ * hInstance, char * lpCmdLine) Line 302	C++
 	Metin2_Debug.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 329	C++
 	[External Code]

+		this	0x0000001e1cf2f6a0 {m_load_from_pack=true m_entries={ size=50983 } m_pBufferPool=0x0000001e1d03b350 {...} ...}	const CPackManager *
		buf	<Unable to read memory>
+		path	"d:/ymir work/zone/b/obj/general_obj_stone19_lod_01.gr2"	std::basic_string_view<char,std::char_traits<char>>
2026-02-15 14:33:59 +03:00
Koray
219cf7e624 fix speedtree crash
Unhandled exception at 0x00007FF6DBFC5EB1 (Metin2_Debug.exe) in metin2client__20260215_142707.dmp: 0xC0000005: Access violation reading location 0x0000000000000000.

>	Metin2_Debug.exe!LoadLeafShader(IDirect3DDevice9 * pDx, IDirect3DVertexDeclaration9 * & pVertexDecl, IDirect3DVertexShader9 * & pVertexShader) Line 290	C++
 	Metin2_Debug.exe!CSpeedTreeForestDirectX8::InitVertexShaders() Line 70	C++
 	Metin2_Debug.exe!CSpeedTreeForestDirectX8::SetRenderingDevice(IDirect3DDevice9 * lpDevice) Line 85	C++
 	Metin2_Debug.exe!CMapOutdoor::Load(float x, float y, float z) Line 38	C++
 	Metin2_Debug.exe!CMapManager::LoadMap(const std::string & c_rstrMapName, float x, float y, float z) Line 124	C++
 	Metin2_Debug.exe!CPythonBackground::Warp(unsigned long dwX, unsigned long dwY) Line 744	C++
 	Metin2_Debug.exe!CPythonNetworkStream::Warp(long lGlobalX, long lGlobalY) Line 374	C++
 	Metin2_Debug.exe!netWarp(_object * poSelf, _object * poArgs) Line 81	C++
 	[External Code]
 	Metin2_Debug.exe!CPythonLauncher::RunFile(const char * c_szFileName) Line 319	C++
 	Metin2_Debug.exe!RunMainScript(CPythonLauncher & pyLauncher, const char * lpCmdLine) Line 246	C++
 	Metin2_Debug.exe!Main(HINSTANCE__ * hInstance, char * lpCmdLine) Line 302	C++
 	Metin2_Debug.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 329	C++
 	[External Code]
 	[Frames may be missing, no binary loaded for kernel32.dll]
 	[External Code]

+		leafVertexDecl	0x000000dff7aed768 {{Stream=0 Offset=0 Type=2 '\x2' ...}, {Stream=0 Offset=12 Type=4 '\x4' ...}, {Stream=...}, ...}	const _D3DVERTEXELEMENT9[5]
+		pCode	0x0000000000000000 <NULL>	ID3DXBuffer *
+		pDx	0x000000dfbdbc37c0 {...}	IDirect3DDevice9 *
+		pError	0x0000000000000000 <NULL>	ID3DXBuffer *
+		pVertexDecl	0x0000000000000000 <NULL>	IDirect3DVertexDeclaration9 * &
+		pVertexShader	0x0000000000000000 <NULL>	IDirect3DVertexShader9 * &
2026-02-15 14:31:32 +03:00
Koray
eaf744e48d fix unknown encoding: utf-8-sig
Fix for:
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "<frozen site>", line 723, in <module>
  File "<frozen site>", line 709, in main
  File "<frozen site>", line 382, in addusersitepackages
  File "<frozen site>", line 254, in addsitedir
  File "<frozen site>", line 197, in addpackage
LookupError: unknown encoding: utf-8-sig
2026-02-15 14:11:26 +03:00
rtw1x1
06a686672b Merge pull request #105 from rtw1x1/main
Packet miss match
2026-02-13 00:00:50 +00:00
rtw1x1
c34b46a9a4 Packet miss match
fixed: Packet miss match for command_safebox_money

fixed: Py_BuildException

log: Detailed TraceError for CreateMemoryFile
2026-02-13 00:00:23 +00:00
rtw1x1
eea43e504c Merge pull request #104 from MindRapist/mr-11
Several bug fixes
2026-02-12 23:51:49 +00:00
Mind Rapist
7a942e4fc0 Several bug fixes 2026-02-13 01:48:07 +02:00
rtw1x1
aa30091ced Merge pull request #103 from mq1n/main
fix rare crash after char select
2026-02-12 22:54:55 +00:00
Koray
9a896f982d fix rare crash after char select 2026-02-10 14:37:38 +03:00
d1str4ught
4bd8f8e66e Merge pull request #101 from SunTrustDev/bugfix/tolower_breaking_utf8
tolower breaking utf8
2026-02-09 02:54:04 +01:00
SuntrustDev
335da689b6 Merge branch 'main' of https://github.com/d1str4ught/m2dev-client-src into bugfix/tolower_breaking_utf8 2026-02-09 02:48:00 +01:00
d1str4ught
6dfb708888 crash fix: when __ClearReserveDeleteWindowList() was destroying Windows, some might have pushed it's children for deletion to m_ReserveDeleteWindowList, invalidating iterators 2026-02-09 02:43:36 +01:00
SuntrustDev
6929730dd6 Change from korean_tolower to ascii_tolower for better understandability 2026-02-09 02:41:59 +01:00
d1str4ught
73defc20d0 crash fix: when __ClearReserveDeleteWindowList() was destroying Windows, some might have pushed it's children for deletion to m_ReserveDeleteWindowList, invalidating iterators 2026-02-09 02:34:03 +01:00
d1str4ught
de25f437ed python3 lib with JIT enabled 2026-02-09 01:26:46 +01:00
d1str4ught
85609303d8 python 2.7 -> python 3.14 2026-02-09 01:07:50 +01:00
rtw1x1
0ca2a293c8 Merge pull request #100 from SunTrustDev/bugfix/guild-packet-crashes 2026-02-08 23:27:59 +00:00
SuntrustDev
19b894ba8f Fix guild packet lenth dismatch by adding parameter length 2026-02-09 00:20:54 +01:00
rtw1x1
57691c7dbc Merge pull request #99 from SunTrustDev/bugfix/missing-freetype 2026-02-08 21:44:12 +00:00
SuntrustDev
e3731fda30 Add missing freetype 2026-02-08 22:40:02 +01:00
rtw1x1
a1f47ea520 Merge pull request #98 from MindRapist/mr-10 2026-02-08 21:33:15 +00:00
Mind Rapist
39030c5aed FreeType added, synched POINT_*'s, Celine's Splash Fix 2026-02-08 23:32:06 +02:00
rtw1x1
2b82fe2678 Merge pull request #97 from SunTrustDev/bugfix/refine-not-showing 2026-02-08 21:27:24 +00:00
SuntrustDev
23aa6807ef Fix refine not showing item information 2026-02-08 22:24:15 +01:00
rtw1x1
43af66b808 Merge pull request #96 from rtw1x1/main
FreeType2 & Networking Overhaul
2026-02-08 20:03:55 +00:00
rtw1x1
a40c11859e Merge branch 'd1str4ught:main' into main 2026-02-08 07:37:20 +00:00
rtw1x1
cda1c73bd3 Networking Overhaul: Modern packets, buffers, handshake, dispatch & security hardening
See Readme
2026-02-08 07:36:07 +00:00
d1str4ught
9afd6ee906 deform optimized even more 2026-02-08 07:35:41 +01:00
rtw1x1
058589ca1b Merge branch 'd1str4ught:main' into main 2026-02-08 06:34:04 +00:00
rtw1x1
e0be217d3f Merge pull request #94 from MindRapist/mr-9 2026-02-06 21:16:25 +00:00
Mind Rapist
a865e0c00f MR-9: Instructions in README 2026-02-05 00:34:53 +02:00
rtw1x1
87cfa1540f FreeType: LCD subpixel 2026-02-04 12:30:14 +00:00
rtw1x1
ba514d2e9a FreeType: Kerning API and font adjustments 2026-02-04 11:59:36 +00:00
rtw1x1
4280220819 FreeType: TextBar boldness fix 2026-02-04 10:50:00 +00:00
rtw1x1
a3009f4bff FreeType: Fixed mem leak and adjustments 2026-02-04 10:35:46 +00:00
rtw1x1
8f0b956fa9 Add FreeType 2-13.3 (vendor, LFS) 2026-02-04 08:43:22 +00:00
rtw1x1
ce5ef584c9 Implementation FreeType2-13.3 2026-02-04 08:37:37 +00:00
rtw1x1
00cd91524e Merge pull request #91 from rtw1x1/main
Client: Implementation XChaCha20-Poly1305 via libsodium & client login key reworked
2026-02-04 08:23:42 +00:00
rtw1x1
a9407a5781 fix: Key validation failure 2026-02-03 11:58:21 +00:00
rtw1x1
509e2638cb XChaCha20-Poly1305 via libsodium 2026-02-03 11:12:32 +00:00
rtw1x1
857ef33627 Merge pull request #89 from MindL0ve/main 2026-02-01 20:52:57 +00:00
MindL0ve
ac7c9aed7c Removed AlphaFog 2026-02-01 00:31:21 +03:00