Fix cross-platform rendering and optimize frame performance
Correct selection orientation, game-entry lifecycle, mounted NPCs, labels and skill panels. Add the native GPU scene path, resident geometry, bounded texture and Python caches, and collision broad phase. Pin the independently maintained Metin2 SDK through a submodule and document reproducible setup. Include rendering regressions and macOS packaging improvements. Validation: client Debug build and 12 targeted client tests passed; SDK build and all 14 SDK tests passed.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "item_sound.h"
|
||||
#include "python_item.h"
|
||||
#include "PythonNetworkStream.h"
|
||||
#include "player_settings.h"
|
||||
#include "python_net.h"
|
||||
#include "guild_state.h"
|
||||
#include "switchbot_state.h"
|
||||
@@ -489,6 +490,9 @@ void PythonNetworkStream::MainCharacterLoaded(int32_t x,int32_t y,int32_t z) {
|
||||
WarpBackgroundMap(uint32_t(x),uint32_t(y));
|
||||
int32_t localX=x,localY=y; GlobalToLocalPosition(localX,localY);
|
||||
SetPlayerRace(m_wMainActorRace);
|
||||
// Skill levels can arrive during Loading, before GameWindow registers its
|
||||
// skill slots. Register on the main-character packet so levels aren't lost.
|
||||
RegisterPlayerSkills(uint8_t(m_wMainActorRace), m_byMainActorSkillGroup, m_byMainActorEmpire);
|
||||
SetMainCharacterName(m_strMainActorName);SetMainCharacterPosition(localX,localY,z);
|
||||
inventory_callback(m_phaseWindows[4],"LoadData",Py_BuildValue("ii",x,y));
|
||||
std::vector<uint8_t> version(67,0);version[0]=HEADER_CG_CLIENT_VERSION2;
|
||||
@@ -1221,6 +1225,30 @@ bool PythonNetworkStream::SendOfflineShopManagement(uint8_t operation,uint8_t po
|
||||
Send(bytes.data(),bytes.size());return true;
|
||||
}
|
||||
|
||||
bool PythonNetworkStream::SendAddOfflineShopItem(const TItemPos& bDisplayPos, uint8_t bPos, int64_t lPrice) {
|
||||
std::vector<uint8_t> bytes(58, 0);
|
||||
bytes[0] = HEADER_CG_OFFLINE_SHOP;
|
||||
bytes[1] = SHOP_SUBHEADER_CG_ADD_ITEM;
|
||||
Send(bytes.data(), bytes.size());
|
||||
|
||||
TOfflineShopAddItem item{};
|
||||
item.bDisplayPos = bDisplayPos;
|
||||
item.bPos = bPos;
|
||||
item.lPrice = lPrice;
|
||||
Send(&item, sizeof(item));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PythonNetworkStream::SendOfflineShopChangeTitle(const std::string& title) {
|
||||
std::vector<uint8_t> bytes(58, 0);
|
||||
bytes[0] = HEADER_CG_OFFLINE_SHOP;
|
||||
bytes[1] = SHOP_SUBHEADER_CG_CHANGE_TITLE;
|
||||
size_t copyLen = std::min(title.size(), size_t(50));
|
||||
std::memcpy(&bytes[2], title.data(), copyLen);
|
||||
Send(bytes.data(), bytes.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PythonNetworkStream::SendCharacterMovePacket(uint8_t func, uint8_t arg, uint8_t rot, int32_t x, int32_t y, uint32_t time) {
|
||||
TPacketCGMove p;
|
||||
p.bHeader = HEADER_CG_MOVE;
|
||||
|
||||
Reference in New Issue
Block a user