Investigate Autosave on Map change affecting san_first_heartbeat
Ok, looks like all the fuss was about loading from Autosave. The Co8 release note warning about this is almost word-for-word copied from Livonya's thread back in 2005:
http://www.co8.org/forum/showpost.php?p=10085&postcount=2
It is true that loading the Autosave will skip the First Heartbeat (I've verified this). This is also true for loading any save actually, but I guess the main issue is that you might miss out on some events that are supposed to happen on map transition (e.g. if you get killed in combat and reload from autosave).
Could we delay creation of the auto save until after the first heartbeat event has been triggered or do the real fix and record whether first heartbeat has been triggered for each obj and requeue the event on loading a save?
On Mon, Mar 21, 2016 at 9:34 PM, Dude McDude [email protected] wrote:
Ok, looks like all the fuss was about loading from Autosave. The Co8 release note warning about this is almost word-for-word copied from Livonya's thread back in 2005:
http://www.co8.org/forum/showpost.php?p=10085&postcount=2
It is true that loading the Autosave will skip the First Heartbeat (I've verified this). This is also true for loading any save actually, but I guess the main issue is that you might miss out on some events that are supposed to happen on map transition (e.g. if you get killed in combat and reload from autosave).
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/GrognardsFromHell/TemplePlus/issues/182#issuecomment-199465919
I'm still not clear where the condition for triggering the first heartbeat is recorded; it seems to use a single TimeEventExpired function that always calls first_hearteat too.
I'm guessing the second approach you suggested would invalidate old saves? Though I guess we could add some identifier for new save types.
Ah ok, it's when the params[1] field is nonzero that the first_heartbeat is called.
Which time event type is this from?
On Tue, Mar 22, 2016 at 5:59 PM, Dude McDude [email protected] wrote:
Ah ok, it's when the params[1] field is nonzero that the first_heartbeat is called.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/GrognardsFromHell/TemplePlus/issues/182#issuecomment-199906223
AI (10)
Relevant function that schedules the first heartbeat is 0x1005BE60 Signature is void AiTimeEventGenerate_MapSectorLoad(objHndl obj, int doFirstHeartbeat)