mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
bba2f20588
commit
a7261a0d15
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue