JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Quicksaves won't load in JK2 #585

Closed grepwood closed 6 years ago

grepwood commented 10 years ago

Saving game "quik*"... Done. Loading... quik Failed to open savegame 'quik'

From code/ui/ui_shared.cpp:5388 I gathered that it literally saves it as "quik*.sav", and then code/ui/ui_main.cpp:1467 tries to load a "quik.sav" which doesn't exist. Since game saves are already stored in ~/.local/share/$GAME/base/saves, why would the quicksave name be different in JK2?

xycaleth commented 10 years ago

The * in "quik_" should get removed in SV_SaveGame_f (svsavegame.cpp:510). It might be that it's *opened the file, but the contents of the save file isn't what it was expecting...

Needs further investigation

grepwood commented 10 years ago

Here's my save: https://sucs.org/~grepwood/OpenJK/quik*.sav.xz When I actually rename it to "quik.sav", the game loads it successfully :)

ensiform commented 10 years ago

Note that the previous changes to add screenshots break older saves in jk2 but bring back original save support.

redsaurus commented 10 years ago

The renaming to quik from quik* when saving seems to be working fine for me, I'm not sure what's going on here.

grepwood commented 10 years ago

It's working because the generated save is a valid OpenJK JK2 save. What the problem is, is that OpenJK will generate a quicksave save bind with a filename inconsistent with the game's quicksave load bind.

ensiform commented 10 years ago

Not for anyone else. It removes the * before it even reaches the actual saving.

https://github.com/JACoders/OpenJK/blob/master/code/server/sv_savegame.cpp#L509-L510

ensiform commented 9 years ago

Pretty sure they work just fine. Close?

ensiform commented 9 years ago

Sounds like you were using an older jk2 quicksave from before the changes took place really.

grepwood commented 9 years ago

I'll try to check this next week. At the moment I'm pretty sure that my quicksave was generated by the same version of jk2 that I was trying to load it with.

ensiform commented 9 years ago

Make sure you don't have a quicksave under fs_basepath that it might be loading too. It may load from there first.

ensiform commented 8 years ago

This should be fixed now with #878 and bb0b2f0a541117aba77fc7b59ee51defda99a5b6

Note: there's no up to date windows prebuilt build currently.

ensiform commented 6 years ago

Close?

grepwood commented 6 years ago

@ensiform I will rebuild OpenJK this weekend and see if I can confirm everything.

grepwood commented 6 years ago

Confirmed. Works fine.