From a7261a0d15a3d93687cdf4966306a908f5674d36 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Thu, 12 Mar 2026 19:46:01 -0700 Subject: [PATCH] feat: trigger camera rumble shake on storm weather transition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When SMSG_WEATHER sets storm (type 3) with intensity > 0.3, fire a low-frequency (6Hz) camera shake to simulate thunder. Magnitude scales with intensity: 0.03–0.07 world units. --- src/game/game_handler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 28414f65..8ed25e79 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4333,6 +4333,11 @@ void GameHandler::handlePacket(network::Packet& packet) { weatherIntensity_ = wIntensity; const char* typeName = (wType == 1) ? "Rain" : (wType == 2) ? "Snow" : (wType == 3) ? "Storm" : "Clear"; LOG_INFO("Weather changed: type=", wType, " (", typeName, "), intensity=", wIntensity); + // Storm transition: trigger a low-frequency thunder rumble shake + if (wType == 3 && wIntensity > 0.3f && cameraShakeCallback_) { + float mag = 0.03f + wIntensity * 0.04f; // 0.03–0.07 units + cameraShakeCallback_(mag, 6.0f, 0.6f); + } } break; }