mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +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
|
|
@ -1051,14 +1051,21 @@ bool VkContext::recreateSwapchain(int width, int height) {
|
|||
|
||||
auto swapRet = builder.build();
|
||||
|
||||
if (oldSwapchain) {
|
||||
vkDestroySwapchainKHR(device, oldSwapchain, nullptr);
|
||||
if (!swapRet) {
|
||||
// Destroy old swapchain now that we failed (it can't be used either)
|
||||
if (oldSwapchain) {
|
||||
vkDestroySwapchainKHR(device, oldSwapchain, nullptr);
|
||||
swapchain = VK_NULL_HANDLE;
|
||||
}
|
||||
LOG_ERROR("Failed to recreate swapchain: ", swapRet.error().message());
|
||||
// Keep swapchainDirty=true so the next frame retries
|
||||
swapchainDirty = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!swapRet) {
|
||||
LOG_ERROR("Failed to recreate swapchain: ", swapRet.error().message());
|
||||
swapchain = VK_NULL_HANDLE;
|
||||
return false;
|
||||
// Success — safe to retire the old swapchain
|
||||
if (oldSwapchain) {
|
||||
vkDestroySwapchainKHR(device, oldSwapchain, nullptr);
|
||||
}
|
||||
|
||||
auto vkbSwap = swapRet.value();
|
||||
|
|
@ -1322,6 +1329,7 @@ bool VkContext::recreateSwapchain(int width, int height) {
|
|||
|
||||
VkCommandBuffer VkContext::beginFrame(uint32_t& imageIndex) {
|
||||
if (deviceLost_) return VK_NULL_HANDLE;
|
||||
if (swapchain == VK_NULL_HANDLE) return VK_NULL_HANDLE; // Swapchain lost; recreate pending
|
||||
|
||||
auto& frame = frames[currentFrame];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue