mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add 3D level-up effect using LevelUp.m2 spell model
Replace 2D screen-space ding rings with real WoW LevelUp.m2 particle/geometry effect. Fix FBlock particle color parsing (C3Vector floats, not CImVector bytes) which was producing blue/red instead of golden yellow. Spell effect models bypass particle dampeners, glow sprite conversion, Mod→Additive blend override, and all collision (floor/wall/camera) to prevent camera zoom-in. Other players' level-ups trigger the 3D effect at their position with group chat notification. F7 hotkey for testing.
This commit is contained in:
parent
1fb1daea7f
commit
da49593268
13 changed files with 321 additions and 128 deletions
|
|
@ -7493,35 +7493,14 @@ void GameScreen::renderDingEffect() {
|
|||
dingTimer_ -= dt;
|
||||
if (dingTimer_ < 0.0f) dingTimer_ = 0.0f;
|
||||
|
||||
float progress = 1.0f - (dingTimer_ / DING_DURATION); // 0→1 over duration
|
||||
float alpha = dingTimer_ < 0.8f ? (dingTimer_ / 0.8f) : 1.0f; // fade out last 0.8s
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
float cx = io.DisplaySize.x * 0.5f;
|
||||
float cy = io.DisplaySize.y * 0.5f;
|
||||
float maxR = std::min(cx, cy) * 1.1f;
|
||||
|
||||
ImDrawList* draw = ImGui::GetForegroundDrawList();
|
||||
|
||||
// 3 expanding golden rings staggered by 0.12s of phase
|
||||
for (int r = 0; r < 3; r++) {
|
||||
float phase = progress - r * 0.12f;
|
||||
if (phase <= 0.0f || phase >= 1.0f) continue;
|
||||
float ringAlpha = (1.0f - phase) * alpha * 0.9f;
|
||||
float radius = phase * maxR;
|
||||
float thickness = 10.0f * (1.0f - phase) + 2.0f;
|
||||
draw->AddCircle(ImVec2(cx, cy), radius,
|
||||
IM_COL32(255, 215, 0, (int)(ringAlpha * 255)),
|
||||
96, thickness);
|
||||
}
|
||||
|
||||
// Inner golden glow disk (very transparent)
|
||||
if (progress < 0.5f) {
|
||||
float glowAlpha = (1.0f - progress * 2.0f) * alpha * 0.15f;
|
||||
draw->AddCircleFilled(ImVec2(cx, cy), progress * maxR * 0.6f,
|
||||
IM_COL32(255, 215, 0, (int)(glowAlpha * 255)));
|
||||
}
|
||||
|
||||
// "LEVEL X!" text — visible for first 2.2s
|
||||
if (dingTimer_ > 0.8f) {
|
||||
ImFont* font = ImGui::GetFont();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue