mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-28 22:51:09 +00:00
The savegame list is generated by calling FS_FOpenFile() for each possible savegame name. When a file handle is returned the savegame exists, otherwise the savegame slot is empty. But FS_FOpenFile() searches in every directory known to the VFS. If a savegame file isn't found in $moddir but in baseq2, the file in baseq2 is opened and a baseq2 savegame is displayed in the mods / addons savegame menu. The fix is compromise between a clean solution and invasiveness: - Refactor FS_FOpenFile() to include FS_FOpenFileRead(). FS_FOpenFile() was used only to open read only files, limit its's possibilities to do exactly that. - Introduce a new flag "gamedir_only" to FS_FOpenFile(). When true only the gamedir directories are searched and not other directories like baseq2. - Change all callers to FS_FOpenFile()s new signature. - Use the new gamedir_only flag to limit the searchpath for savegames to the gamedir. |
||
---|---|---|
.. | ||
header | ||
shared | ||
unzip | ||
argproc.c | ||
clientserver.c | ||
cmdparser.c | ||
collision.c | ||
crc.c | ||
cvar.c | ||
filesystem.c | ||
glob.c | ||
md4.c | ||
misc.c | ||
movemsg.c | ||
netchan.c | ||
pmove.c | ||
szone.c | ||
zone.c |