fix: quest markers, level-up effect, and emote loop

- renderer: construct QuestMarkerRenderer via make_unique (was never
  instantiated, causing getQuestMarkerRenderer() to always return null
  and all quest-marker updates to be silently skipped)
- m2_renderer: add "levelup" to effectByName so LevelUp.m2 is treated
  as a spell effect (additive blend, no collision, particle-dominated)
- renderer: auto-cancel non-looping emote animations when they reach
  end-of-sequence, transitioning player back to IDLE state
This commit is contained in:
Kelsi 2026-03-10 19:41:01 -07:00
parent 34bab8edd6
commit 48d15fc653
2 changed files with 12 additions and 1 deletions

View file

@ -710,6 +710,8 @@ bool Renderer::initialize(core::Window* win) {
levelUpEffect = std::make_unique<LevelUpEffect>();
questMarkerRenderer = std::make_unique<QuestMarkerRenderer>();
LOG_INFO("Vulkan sub-renderers initialized (Phase 3)");
// LightingManager doesn't use GL — initialize for data-only use
@ -2222,6 +2224,14 @@ void Renderer::updateCharacterAnimation() {
} else if (sitting) {
cancelEmote();
newState = CharAnimState::SIT_DOWN;
} else if (!emoteLoop && characterRenderer && characterInstanceId > 0) {
// Auto-cancel non-looping emotes once animation completes
uint32_t curId = 0; float curT = 0.0f, curDur = 0.0f;
if (characterRenderer->getAnimationState(characterInstanceId, curId, curT, curDur)
&& curDur > 0.1f && curT >= curDur - 0.05f) {
cancelEmote();
newState = CharAnimState::IDLE;
}
}
break;