mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 06:41:59 +00:00
parent
67472623fe
commit
3aa0ce5c3a
2 changed files with 32 additions and 0 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -31,6 +31,7 @@ texturecache
|
|||
|
||||
*.manifest
|
||||
/*.map
|
||||
/*.mhk
|
||||
/platform/Windows/*.map
|
||||
*.pdb
|
||||
.vs/
|
||||
|
@ -40,7 +41,10 @@ texturecache
|
|||
/*.grp
|
||||
/*.rts
|
||||
/*.art
|
||||
/*.ar_
|
||||
/*.con
|
||||
/*.SMK
|
||||
/*.WAV
|
||||
/platform/Windows/*.con
|
||||
*.memmap
|
||||
*.sdf
|
||||
|
|
|
@ -503,6 +503,32 @@ void EndLevel(void)
|
|||
seqKillAll();
|
||||
}
|
||||
|
||||
int G_TryMapHack(const char* mhkfile)
|
||||
{
|
||||
int const failure = engineLoadMHK(mhkfile);
|
||||
|
||||
if (!failure)
|
||||
initprintf("Loaded map hack file \"%s\"\n", mhkfile);
|
||||
|
||||
return failure;
|
||||
}
|
||||
|
||||
void G_LoadMapHack(char* outbuf, const char* filename)
|
||||
{
|
||||
if (filename != NULL)
|
||||
Bstrcpy(outbuf, filename);
|
||||
|
||||
append_ext_UNSAFE(outbuf, ".mhk");
|
||||
|
||||
if (G_TryMapHack(outbuf) && usermaphacks != NULL)
|
||||
{
|
||||
auto pMapInfo = (usermaphack_t*)bsearch(&g_loadedMapHack, usermaphacks, num_usermaphacks,
|
||||
sizeof(usermaphack_t), compare_usermaphacks);
|
||||
if (pMapInfo)
|
||||
G_TryMapHack(pMapInfo->mhkfile);
|
||||
}
|
||||
}
|
||||
|
||||
PLAYER gPlayerTemp[kMaxPlayers];
|
||||
int gHealthTemp[kMaxPlayers];
|
||||
|
||||
|
@ -575,6 +601,8 @@ void StartLevel(GAMEOPTIONS *gameOptions)
|
|||
gQuitGame = true;
|
||||
return;
|
||||
}
|
||||
char levelName[BMAX_PATH];
|
||||
G_LoadMapHack(levelName, gameOptions->zLevelName);
|
||||
wsrand(gameOptions->uMapCRC);
|
||||
gKillMgr.Clear();
|
||||
gSecretMgr.Clear();
|
||||
|
|
Loading…
Reference in a new issue