mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
"Loading SOC from" console message now also displays the name of the SOC_ lump
This commit is contained in:
parent
18688f476f
commit
4f9bb15e4d
1 changed files with 11 additions and 2 deletions
13
src/w_wad.c
13
src/w_wad.c
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "w_wad.h"
|
||||
#include "z_zone.h"
|
||||
#include "fastcmp.h"
|
||||
|
||||
#include "i_video.h" // rendermode
|
||||
#include "d_netfil.h"
|
||||
|
@ -151,8 +152,16 @@ static inline void W_LoadDehackedLumps(UINT16 wadnum)
|
|||
lumpinfo_t *lump_p = wadfiles[wadnum]->lumpinfo;
|
||||
for (lump = 0; lump < wadfiles[wadnum]->numlumps; lump++, lump_p++)
|
||||
if (memcmp(lump_p->name,"SOC_",4)==0) // Check for generic SOC lump
|
||||
{
|
||||
CONS_Printf(M_GetText("Loading SOC from %s\n"), wadfiles[wadnum]->filename);
|
||||
{ // shameless copy+paste of code from LUA_LoadLump
|
||||
char *name = malloc(strlen(wadfiles[wadnum]->filename)+10);
|
||||
strcpy(name, wadfiles[wadnum]->filename);
|
||||
if (!fasticmp(&name[strlen(name) - 4], ".soc")) {
|
||||
// If it's not a .soc file, copy the lump name in too.
|
||||
name[strlen(wadfiles[wadnum]->filename)] = '|';
|
||||
M_Memcpy(name+strlen(wadfiles[wadnum]->filename)+1, lump_p->name, 8);
|
||||
name[strlen(wadfiles[wadnum]->filename)+9] = '\0';
|
||||
}
|
||||
CONS_Printf(M_GetText("Loading SOC from %s\n"), name);
|
||||
DEH_LoadDehackedLumpPwad(wadnum, lump);
|
||||
}
|
||||
else if (memcmp(lump_p->name,"MAINCFG",8)==0) // Check for MAINCFG
|
||||
|
|
Loading…
Reference in a new issue