mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
fix: animation stutter, resolution crash, memory cap, spell tooltip hints, GO collision
- Animation stutter: skip playAnimation(Run) for the local player in the server movement callback — the player renderer state machine already manages it; resetting animTime on every movement packet caused visible stutter - Resolution crash: reorder swapchain recreation so old swapchain is only destroyed after confirming the new build succeeded; add null-swapchain guard in beginFrame to survive the retry window - Memory cap: reduce cache budget from 80% uncapped to 50% hard-capped at 16 GB to prevent excessive RAM use on high-memory systems - Spell tooltip: suppress "Drag to action bar / Double-click to cast" hints when the tooltip is shown from the action bar (showUsageHints=false) - M2 collision: add watermelon/melon/squash/gourd to foliage (no-collision); exclude chair/bench/stool/seat/throne from smallSolidProp so invisible chair bounding boxes no longer trap the player
This commit is contained in:
parent
8f2974b17c
commit
19eb7a1fb7
7 changed files with 60 additions and 30 deletions
|
|
@ -109,16 +109,16 @@ size_t MemoryMonitor::getAvailableRAM() const {
|
|||
|
||||
size_t MemoryMonitor::getRecommendedCacheBudget() const {
|
||||
size_t available = getAvailableRAM();
|
||||
// Use 80% of available RAM for caches (very aggressive), but cap at 90% of total
|
||||
size_t budget = available * 80 / 100;
|
||||
size_t maxBudget = totalRAM_ * 90 / 100;
|
||||
return budget < maxBudget ? budget : maxBudget;
|
||||
// Use 50% of available RAM for caches, hard-capped at 16 GB.
|
||||
static constexpr size_t kHardCapBytes = 16ull * 1024 * 1024 * 1024; // 16 GB
|
||||
size_t budget = available * 50 / 100;
|
||||
return budget < kHardCapBytes ? budget : kHardCapBytes;
|
||||
}
|
||||
|
||||
bool MemoryMonitor::isMemoryPressure() const {
|
||||
size_t available = getAvailableRAM();
|
||||
// Memory pressure if < 20% RAM available
|
||||
return available < (totalRAM_ * 20 / 100);
|
||||
// Memory pressure if < 10% RAM available
|
||||
return available < (totalRAM_ * 10 / 100);
|
||||
}
|
||||
|
||||
} // namespace core
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue