2V3-b: click on the ground to walk; read the terrain attribute map

CScreen::SetCursorPosition and CPythonGraphic::SetCursorPosition are the 40250
bodies, so RenderGame builds the pick ray under the cursor each frame.
CPythonBackground::GetPickingPoint* march that ray as
CMapOutdoor::__PickTerrainHeight does, against the native CMapManager height
(PR_FLOAT_TO_INT's x87 rounding becomes floor); object picking waits for
CMapOutdoor. CMapManager::isAttrOn reads the packed <map>/<xxxyyy>/attr.atr
as CMapOutdoor::isAttrOn + CTerrain::isAttrOn do, and CheckAdvancing with its
collision checkers is verbatim (no map objects are registered yet). All of
this stays in the pending/platform layer and is marked ADAPTED.

port.login_flow clicks the ground below the actor after the key walk. The
actor walks to the picked point (334 cm offline), and the fake server sees
FUNC_MOVE, then FUNC_WAIT. It also checks that the actor's cell is free and
that its terrain block has blocked cells. port.login_live against the real
server passed (key 133 cm, click 296 cm), and python_game_render_test.sh
passes offline. MT_TEST_MODE=python_ui now adds the 3D surface, so the port
route can be played by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 23:57:34 +09:00
co-authored by Claude Opus 5.5
parent ff0983d3c8
commit 8b4700f008
12 changed files with 627 additions and 46 deletions
@@ -36,7 +36,11 @@ long CPythonGraphic::GenerateColor(float r, float g, float b, float a) { return
void CPythonGraphic::RenderUpButton(float, float, float, float) { MT_PLATFORM_STUB(); }
void CPythonGraphic::RenderDownButton(float, float, float, float) { MT_PLATFORM_STUB(); }
bool CPythonGraphic::SaveScreenShot(const char*) { MT_PLATFORM_STUB(); return false; }
void CPythonGraphic::SetCursorPosition(int, int) { MT_PLATFORM_STUB(); }
// 40250 PythonGraphic.cpp:52.
void CPythonGraphic::SetCursorPosition(int x, int y)
{
CScreen::SetCursorPosition(x, y, ms_iWidth, ms_iHeight);
}
DWORD CPythonGraphic::GetAvailableMemory() { MT_PLATFORM_STUB(); return 0; }
void CPythonGraphic::SetGamma(float) { MT_PLATFORM_STUB(); }