mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
fix: resolve 7 code quality issues across PRs #59-63
- Remove stale kVOffset (-0.15) from zone_highlight_layer hover detection; the offset was removed from rendering but left in the hit-test path, shifting hover ~15% vertically - Add null guard for cachedGameHandler_ in ChatPanel::inputTextCallback to prevent dereference before first render frame - Zero WindowBorderSize in world map ImGui window to eliminate gap between window edge and map content - Replace hardcoded cosmic highlight multipliers with displayH×displayH square rendering, preserving 1:1 aspect ratio at any resolution - Skip transport waypoints where serverToCanonical zeroes nonzero input instead of silently building paths with broken (0,0,0) coordinates - Use length-squared check (posLenSq > 1.0) for spline endpoint validation instead of per-component != 0 comparison, so entities near the world origin are no longer skipped - Fix off-by-one in ChatPanel::insertChatLink buffer capacity check
This commit is contained in:
parent
9547feabf9
commit
3be40c3b69
5 changed files with 20 additions and 22 deletions
|
|
@ -672,6 +672,7 @@ int ChatPanel::inputTextCallback(ImGuiInputTextCallbackData* data) {
|
|||
if (!self->tabCompleter_.isActive() || self->tabCompleter_.getPrefix() != lowerPrefix) {
|
||||
std::vector<std::string> candidates;
|
||||
auto* gh = self->cachedGameHandler_;
|
||||
if (!gh) return 0;
|
||||
for (const auto& m : gh->getPartyData().members) {
|
||||
if (m.name.empty()) continue;
|
||||
std::string lname = m.name;
|
||||
|
|
@ -803,7 +804,7 @@ void ChatPanel::setupCallbacks(game::GameHandler& gameHandler) {
|
|||
void ChatPanel::insertChatLink(const std::string& link) {
|
||||
if (link.empty()) return;
|
||||
size_t curLen = strlen(chatInputBuffer_);
|
||||
if (curLen + link.size() + 1 < sizeof(chatInputBuffer_)) {
|
||||
if (curLen + link.size() + 1 <= sizeof(chatInputBuffer_)) {
|
||||
strncat(chatInputBuffer_, link.c_str(), sizeof(chatInputBuffer_) - curLen - 1);
|
||||
chatInputMoveCursorToEnd_ = true;
|
||||
refocusChatInput_ = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue