fixes to stage up
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-03-01 12:17:09 -05:00
parent 0b70bab618
commit 841ff371da
3 changed files with 6 additions and 14 deletions

View File

@@ -219,7 +219,7 @@ namespace game::entity
queuedPlay = QueuedPlay{}; queuedPlay = QueuedPlay{};
nextQueuedPlay = QueuedPlay{}; nextQueuedPlay = QueuedPlay{};
currentQueuedPlay = QueuedPlay{}; currentQueuedPlay = QueuedPlay{};
play_convert(data.animations.stageUp); queue_play({.animation = data.animations.stageUp, .isInterruptible = false});
stage = nextStage; stage = nextStage;
isStageUp = true; isStageUp = true;
} }

View File

@@ -37,13 +37,6 @@ namespace game::state::main
auto isImguiCaptureMouse = ImGui::GetIO().WantCaptureMouse; auto isImguiCaptureMouse = ImGui::GetIO().WantCaptureMouse;
auto isItemsLocked = character.isStageUp;
if (isItemsLocked)
{
heldItemIndex = -1;
}
auto isMouseLeftClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left); auto isMouseLeftClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left);
auto isMouseLeftDown = ImGui::IsMouseDown(ImGuiMouseButton_Left); auto isMouseLeftDown = ImGui::IsMouseDown(ImGuiMouseButton_Left);
auto isMouseLeftReleased = ImGui::IsMouseReleased(ImGuiMouseButton_Left); auto isMouseLeftReleased = ImGui::IsMouseReleased(ImGuiMouseButton_Left);
@@ -61,7 +54,7 @@ namespace game::state::main
if (isJustItemHeldStopped || isJustItemThrown) if (isJustItemHeldStopped || isJustItemThrown)
{ {
cursor.queue_default_animation(); cursor.queue_default_animation();
if (!isJustItemThrown && !isItemsLocked) character.queue_idle_animation(); if (!isJustItemThrown) character.queue_idle_animation();
isJustItemHeldStopped = false; isJustItemHeldStopped = false;
isJustItemThrown = false; isJustItemThrown = false;
} }
@@ -122,10 +115,9 @@ namespace game::state::main
auto rect = character.null_frame_rect(eatArea.nullID); auto rect = character.null_frame_rect(eatArea.nullID);
if (isCanEat && math::is_point_in_rectf(rect, heldItem->position) && !isItemsLocked) if (isCanEat && math::is_point_in_rectf(rect, heldItem->position))
{ {
character.queue_play( character.queue_play({.animation = eatArea.animation, .speedMultiplier = character.eatSpeed});
{.animation = eatArea.animation, .speedMultiplier = character.eatSpeed});
if (character.playedEventID == eatArea.eventID) if (character.playedEventID == eatArea.eventID)
{ {
@@ -213,7 +205,7 @@ namespace game::state::main
item.update(); item.update();
if (math::is_point_in_rectf(item.rect(), cursorPosition) && !isImguiCaptureMouse && !isItemsLocked) if (math::is_point_in_rectf(item.rect(), cursorPosition) && !isImguiCaptureMouse)
{ {
isItemHovered = true; isItemHovered = true;
cursor.queue_play({cursorSchema.animations.hover.get()}); cursor.queue_play({cursorSchema.animations.hover.get()});

View File

@@ -38,7 +38,7 @@ namespace game::state::main
time = 0.0f; time = 0.0f;
isEnabled = true; isEnabled = true;
character.isTalking = true; character.isTalking = true;
if (!dialogueEntry->animation.empty()) character.play_convert(dialogueEntry->animation); if (!dialogueEntry->animation.empty()) character.queue_play({dialogueEntry->animation});
if (dialogueEntry->text.empty()) isEnabled = false; if (dialogueEntry->text.empty()) isEnabled = false;
} }