feat: trigger camera rumble shake on storm weather transition

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.
This commit is contained in:
Kelsi 2026-03-12 19:46:01 -07:00
parent bba2f20588
commit a7261a0d15

View file

@ -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.030.07 units
cameraShakeCallback_(mag, 6.0f, 0.6f);
}
}
break;
}