mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
34bab8edd6
commit
48d15fc653
2 changed files with 12 additions and 1 deletions
|
|
@ -1148,7 +1148,8 @@ bool M2Renderer::loadModel(const pipeline::M2Model& model, uint32_t modelId) {
|
|||
(lowerName.find("lavasplash") != std::string::npos) ||
|
||||
(lowerName.find("lavabubble") != std::string::npos) ||
|
||||
(lowerName.find("lavasteam") != std::string::npos) ||
|
||||
(lowerName.find("wisps") != std::string::npos);
|
||||
(lowerName.find("wisps") != std::string::npos) ||
|
||||
(lowerName.find("levelup") != std::string::npos);
|
||||
gpuModel.isSpellEffect = effectByName ||
|
||||
(hasParticles && model.vertices.size() <= 200 &&
|
||||
model.particleEmitters.size() >= 3);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue