WorldMgr: Difference between revisions

imported>Leoetlino
imported>Leoetlino
Line 51: Line 51:
=== TimeMgr::calc ===
=== TimeMgr::calc ===
This is called every frame.
This is called every frame.
* Reload some internal state from GameDataMgr.
* If both [[Demo]]103_0 and Demo997_0 have not been played, time of day is reset to 78.75 (05:15).
* If both [[Demo]]103_0 and Demo997_0 have not been played, time of day is reset to 78.75 (05:15).
* If [[AIDef:Action/AdvanceTime]] or anything else that changes time of day was called, the actual time is updated at this moment.
* If [[AIDef:Action/AdvanceTime]] or anything else that changes time of day was called, the actual time is updated at this moment.
Line 57: Line 56:
* Update time of day.
* Update time of day.
* If FindDungeon_Activated is false (if the player hasn't received the ''The Isolated Plateau'' quest) and if the current time is >= 165.0 (11:00), the time is forcefully set to 11:00.
* If FindDungeon_Activated is false (if the player hasn't received the ''The Isolated Plateau'' quest) and if the current time is >= 165.0 (11:00), the time is forcefully set to 11:00.
* Update Blood Moon timer.
* Update the [[#Blood Moon]] timer.
* Update Daytime, Night time, is morning, is noon, is evening flags (see below).
* Update the [[#Day/night time flag]], the [[#Time division, IsMorning, IsNoon, etc.]].
* Update time division (see below).
* Decrement the "Bloody Moon end reserve timer". If the new timer value is zero or negative, the WM_BloodyDay flag is cleared.
* Update "Bloody moon end reserve timer".
* Update [[#Lord of the Mountain]] flags.
**Decrement the reserve timer. If the new timer value is zero or negative, the WM_BloodyDay flag is cleared.
* Update GameDataMgr state (time, number of days, Blood Moon timers).
* Update Lord of the Mountain flags (in particular, determine if it should appear).


=== Blood Moon ===
=== Blood Moon ===
Anonymous user