port 2V2-c: chrmgr/chr modules + race registration chain

PythonCharacterManagerModule/PythonCharacterModule ported verbatim; the
2V0 chr/chrmgr stubs are gone and initchr/initchrmgr run in 40250 order.
The registration chain they need (RaceData/RaceDataFile/RaceManager/
RaceMotionData, GameType, AttributeData/AttributeInstance, TextFileLoader,
Util, Camera/CameraProcedure) is ported; CRaceManager is created in
PythonBoot. port.login_flow asserts race 0 has its wait motions and no
unhandled packet header; port.login_live 8/8 against 192.168.21.203.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 18:40:47 +09:00
co-authored by Claude Opus 5.5
parent 62b6e23bfc
commit 996d793f0c
39 changed files with 8270 additions and 625 deletions
@@ -11,6 +11,7 @@
#include "UserInterface/AccountConnector.h"
#include "UserInterface/PythonPlayer.h"
#include "GameLib/FlyingObjectManager.h"
#include "GameLib/RaceManager.h"
#include "EffectLib/EffectManager.h"
#include "GameLib/ItemManager.h"
#include "UserInterface/PythonCharacterManager.h"
@@ -57,6 +58,7 @@ std::unique_ptr<CAccountConnector> g_account_connector;
// (CPythonNetworkStream::SetLoadingPhase). PythonPlayer and FlyingObjectManager are platform/pending stand-ins.
std::unique_ptr<CPythonPlayer> g_player;
std::unique_ptr<CFlyingManager> g_flying_manager;
std::unique_ptr<CRaceManager> g_race_manager;
std::unique_ptr<CEffectManager> g_effect_manager;
// PORT: CPythonApplication is not constructed by the Godot host yet. GamePhase calls the
// 40250 IAbstractApplication singleton, so expose the host's current timer and camera surface.
@@ -298,6 +300,7 @@ bool Start(const char* stdlib_path, std::string* error)
g_account_connector = std::make_unique<CAccountConnector>();
g_player = std::make_unique<CPythonPlayer>();
g_flying_manager = std::make_unique<CFlyingManager>();
g_race_manager = std::make_unique<CRaceManager>();
g_effect_manager = std::make_unique<CEffectManager>();
g_game_application = std::make_unique<GameApplicationAdapter>();
g_game_singletons = std::make_unique<GameSingletons>();
@@ -321,6 +324,8 @@ bool run_main_script_body(const char* lpCmdLine, std::string* error)
initgrpText();
initwndMgr();
initapp();
initchr();
initchrmgr();
initChat();
initnet();
init_2v0_gameplay_stubs();
@@ -491,6 +496,7 @@ void Stop()
g_game_singletons.reset();
g_game_application.reset();
g_effect_manager.reset();
g_race_manager.reset();
g_flying_manager.reset();
g_player.reset();
g_account_connector.reset();