Merge pull request #340 from earth-metal/master

Minor bug-fixes: Case-insensitive file loading & Rogue dmflags display
This commit is contained in:
Yamagi 2018-11-01 17:29:57 +01:00 committed by GitHub
commit 4155e8c26d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -3397,7 +3397,7 @@ DMOptions_MenuInit(void)
Menu_AddItem(&s_dmoptions_menu, &s_quad_drop_box);
Menu_AddItem(&s_dmoptions_menu, &s_friendlyfire_box);
if (M_IsGame("rogueg"))
if (M_IsGame("rogue"))
{
Menu_AddItem(&s_dmoptions_menu, &s_no_mines_box);
Menu_AddItem(&s_dmoptions_menu, &s_no_nukes_box);

View file

@ -367,7 +367,7 @@ FS_FCloseFile(fileHandle_t f)
int
FS_FOpenFile(const char *name, fileHandle_t *f, qboolean gamedir_only)
{
char path[MAX_OSPATH];
char path[MAX_OSPATH], lwrName[MAX_OSPATH];
fsHandle_t *handle;
fsPack_t *pack;
fsSearchPath_t *search;
@ -463,7 +463,9 @@ FS_FOpenFile(const char *name, fileHandle_t *f, qboolean gamedir_only)
if (!handle->file)
{
Q_strlwr(path);
Com_sprintf(lwrName, sizeof(lwrName), "%s", handle->name);
Q_strlwr(lwrName);
Com_sprintf(path, sizeof(path), "%s/%s", search->path, lwrName);
handle->file = Q_fopen(path, "rb");
}