mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Make city bell tolls mark real server time like actual clock towers
Changed bell tolls from random intervals to proper timekeeping mechanism: How it works: - Bells now toll at the top of every hour (minute == 0) - Number of tolls indicates the hour in 12-hour format: * 1 AM/PM = 1 toll * 2 AM/PM = 2 tolls * 12 AM/PM = 12 tolls - 1.5 second delay between individual tolls - Uses system time (server time for single-player mode) Technical details: - Detects hour changes via std::chrono and localtime() - Tracks lastHourTolled_ to prevent duplicate tolling - remainingTolls_ counter for sequential toll playback - bellTollDelay_ for 1.5s spacing between tolls - Only tolls when currentCity_ is set (in a city) - Resets bell state when changing cities - Converts 24-hour to 12-hour format (0 and 12 both become 12) Example: At 3:00 PM in Stormwind, the Alliance bell will toll 3 times with 1.5s between each toll, marking the hour like a real clock tower. This makes bells actually useful for tracking real time while playing!
This commit is contained in:
parent
011b33c7f8
commit
1a937fa69a
2 changed files with 49 additions and 12 deletions
|
|
@ -174,7 +174,9 @@ private:
|
|||
float oceanLoopTime_ = 0.0f;
|
||||
float zoneLoopTime_ = 0.0f;
|
||||
float cityLoopTime_ = 0.0f;
|
||||
float bellTollTime_ = 0.0f;
|
||||
float bellTollDelay_ = 0.0f; // Delay between individual bell tolls
|
||||
int lastHourTolled_ = -1; // Track last hour we tolled for
|
||||
int remainingTolls_ = 0; // Number of tolls left to play
|
||||
bool wasIndoor_ = false;
|
||||
bool wasBlacksmith_ = false;
|
||||
bool wasSwimming_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue