• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fixed CTD when trying to load a game when resurecting

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
So after you died it takes a little while before the dead movie plays and then the game decides if you resurect or not.
In this time you can access the main menu and load the game. It will cause a CTD when you are also resurecting. So probably we should just make sure you don't resurect once you clicked to load a new game already.
I believe a flag is set once a new game is being loaded so we should just check agains this flag in the resurection function right?
 
So probably we should just make sure you don't resurect once you clicked to load a new game already.

:no

If the player has chosen the option - the possability of being ressurected - then they should not be able to access the main menu until after the resurection is completed & they are talking to the tavern girl in the tavern room.

Then the player can look at their stats and decide whether to continue with the game or load a Save.

Someone who tries to access the main menu while the ressurection is taking place - may not realise they are being resurrected and think they have died. ( they have not looked at the entry in the Options Menu. )

The quickest way for them to find out this option exists is for them to experience it.

:duel:
 
It may be quite tricky to abort the resurrecting process. Simple solution is to just not try to reload the game until the game threw you into "Game Over".
If people don't like the resurrecting feature, there is a toggle that disables it. :shrug
 
What about disabling the load button untill the resurection function is done?
 
Please test this, I had some weird problems trying to test this, need to know if they where flukes or a real problem.
 
@Levis: What code did you add for this one? I thought to test this, but I could still press Load after dying.
 
@Levis: What code did you add for this one? I thought to test this, but I could still press Load after dying.
Noticed that too...
I moved the code which was already in place to prevent loading to before the movie.
But it seems this code isn't working at all.
It's on my todo list.
 
@Levis: Can you remind me which code it is? But I don't remember what I'm looking for.
I was looking into it and it might be a quick fix. :facepalm
 
line 2750 in seadogs.c
Code:
mc.NoSave.Resurrection = 1;
 
line 2750 in seadogs.c
Code:
mc.NoSave.Resurrection = 1;
Ah, yes; that avoids ONLY saving and not loading.

Extract attached to PROGRAM\INTERFACE and try again. I think this should do what you intended it to. :doff
 

Attachments

  • save_load.zip
    11.5 KB · Views: 132
With the code in its current state, it still didn't prevent you from loading another game.
That only works as intended if I move @Levis' line here into LAi_events.c instead:
Code:
   }
   else
   {
     chr.NoSave.Resurrection = 1;
     LAi_CharacterLogoff(chr);
// KK -->
     if (!LAi_IsBoardingProcess()) {
       PostEvent("LAi_event_GameOver", 5000, "s", "land");
     } else {
       if (bMutinyDeckStarted)
         PostEvent("LAi_event_GameOver", 5000, "s", "mutiny");
       else
         PostEvent("LAi_event_GameOver", 5000, "s", "boarding");
     }
// <-- KK
   }
}

However, even if I can't load the game while being resurrected, I STILL get that CTD.
So it seems that this fix isn't working. :(
 
hmm...then I think we should disable the opening of the main menu instead right?
 
I seem to remember reading something about this but do not know where.

Anyway, I died. It happens a lot. But something has been changed because now the only way to continue seems to be to quit and restart the game as all the saves are greyed out. Why were these extra useless steps added?
 
Anyway, I died. It happens a lot. But something has been changed because now the only way to continue seems to be to quit and restart the game as all the saves are greyed out. Why were these extra useless steps added?
The idea is to prevent you from loading a savegame WHILE you are being resurrected, because doing that causes the game to crash.
But it doesn't work. See here: Confirmed Bug - CTD when trying to load a game when resurecting | PiratesAhoy!

We DID succeed to prevent you from loading a savegame during the resurrecting process, but the game crashes anyway.
So now we have to think of a different solution. :facepalm
 
Back
Top