Merge branch 'w-initfile-bruh' into 'next'

Fix a bug where adding the same mod multiple times counted towards the mod limit

See merge request STJr/SRB2!1124
This commit is contained in:
Lachlan Wright 2020-09-25 08:52:22 -04:00
commit 650635e780
1 changed files with 2 additions and 0 deletions

View File

@ -777,6 +777,8 @@ UINT16 W_InitFile(const char *filename, boolean mainfile, boolean startup)
if (!memcmp(wadfiles[i]->md5sum, md5sum, 16))
{
CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), filename);
if (important)
packetsizetally -= nameonlylength(filename) + 22;
if (handle)
fclose(handle);
return W_InitFileError(filename, false);