Fix vendor buying, improve character select, parallelize WMO culling, and optimize collision

- Fix CMSG_BUY_ITEM count field from uint8 to uint32 (server silently dropped undersized packets)
- Character select screen: remember last selected character, two-column layout with details panel, double-click to enter world, responsive window sizing
- Fix stale character data between logins by replacing static init flag with per-character GUID tracking
- Parallelize WMO visibility culling across worker threads (same pattern as M2 renderer)
- Optimize WMO collision queries with world-space group bounds early rejection in getFloorHeight, checkWallCollision, isInsideWMO, and raycastBoundingBoxes
- Reduce camera ground samples from 5 to 3 movement-aligned probes
- Add WMO interior lighting, unlit materials, vertex color multiply, and alpha blending support
This commit is contained in:
Kelsi 2026-02-07 15:29:19 -08:00
parent ca88860929
commit 751e6fdbde
11 changed files with 741 additions and 307 deletions

View file

@ -54,6 +54,7 @@ private:
int selectedCharacterIndex = -1;
bool characterSelected = false;
uint64_t selectedCharacterGuid = 0;
bool restoredLastCharacter = false;
// Status
std::string statusMessage;
@ -69,6 +70,13 @@ private:
* Get faction color based on race
*/
ImVec4 getFactionColor(game::Race race) const;
/**
* Persist / restore last selected character GUID
*/
static std::string getConfigDir();
void saveLastCharacter(uint64_t guid);
uint64_t loadLastCharacter();
};
}} // namespace wowee::ui

View file

@ -37,6 +37,9 @@ public:
*/
bool isChatInputActive() const { return chatInputActive; }
void saveSettings();
void loadSettings();
private:
// Chat state
char chatInputBuffer[512] = "";
@ -66,10 +69,10 @@ private:
int pendingSfxVolume = 100;
float pendingMouseSensitivity = 0.2f;
bool pendingInvertMouse = false;
int pendingUiOpacity = 100;
int pendingUiOpacity = 65;
// UI element transparency (0.0 = fully transparent, 1.0 = fully opaque)
float uiOpacity_ = 1.0f;
float uiOpacity_ = 0.65f;
/**
* Render player info window
@ -152,6 +155,7 @@ private:
void renderWorldMap(game::GameHandler& gameHandler);
InventoryScreen inventoryScreen;
uint64_t inventoryScreenCharGuid_ = 0; // GUID of character inventory screen was initialized for
QuestLogScreen questLogScreen;
SpellbookScreen spellbookScreen;
TalentScreen talentScreen;
@ -174,6 +178,8 @@ private:
int actionBarDragSlot_ = -1;
GLuint actionBarDragIcon_ = 0;
static std::string getSettingsPath();
// Left-click targeting: distinguish click from camera drag
glm::vec2 leftClickPressPos_ = glm::vec2(0.0f);
bool leftClickWasPress_ = false;