Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libcommon: Continued updating code dependent on recently deprecated f…
…unctions
- Loading branch information
1 parent
e251140
commit 223a456
Showing
2 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1538,7 +1538,11 @@ static void runGameAction() | |
{ | ||
#if __JDOOM__ | ||
// Has the secret map been completed? | ||
if(G_CurrentMapNumber() == 8 && (gameModeBits & (GM_DOOM|GM_DOOM_SHAREWARE|GM_DOOM_ULTIMATE))) | ||
if((gameModeBits & (GM_DOOM|GM_DOOM_SHAREWARE|GM_DOOM_ULTIMATE)) && | ||
(::gameMapUri.path() == "E1M9" || | ||
::gameMapUri.path() == "E2M9" || | ||
::gameMapUri.path() == "E3M9" || | ||
::gameMapUri.path() == "E4M9")) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
danij-deng
Author
Collaborator
|
||
{ | ||
for(int i = 0; i < MAXPLAYERS; ++i) | ||
{ | ||
|
@@ -2023,7 +2027,12 @@ void G_PlayerReborn(int player) | |
p->weapons[WT_SECOND].owned = true; | ||
p->ammo[AT_CRYSTAL].owned = 50; | ||
|
||
if(G_CurrentMapNumber() == 8 || secret) | ||
if(secret || | ||
(::gameMapUri.path() == "E1M9" || | ||
::gameMapUri.path() == "E2M9" || | ||
::gameMapUri.path() == "E3M9" || | ||
::gameMapUri.path() == "E4M9" || | ||
::gameMapUri.path() == "E5M9")) | ||
{ | ||
p->didSecret = true; | ||
} | ||
|
@@ -2124,24 +2133,32 @@ byte G_Ruleset_RespawnMonsters() | |
dd_bool G_IfVictory() | ||
{ | ||
#if __JDOOM64__ | ||
if(G_CurrentMapNumber() == 27) | ||
if(::gameMapUri.path() == "MAP28") | ||
{ | ||
return true; | ||
} | ||
#elif __JDOOM__ | ||
if(gameMode == doom_chex) | ||
{ | ||
if(G_CurrentMapNumber() == 4) | ||
if(::gameMapUri.path() == "MAP05") | ||
{ | ||
return true; | ||
} | ||
} | ||
else if((gameModeBits & GM_ANY_DOOM) && G_CurrentMapNumber() == 7) | ||
else if((gameModeBits & GM_ANY_DOOM) && | ||
(::gameMapUri.path() == "E1M8" || | ||
::gameMapUri.path() == "E2M8" || | ||
::gameMapUri.path() == "E3M8" || | ||
::gameMapUri.path() == "E4M8")) | ||
{ | ||
return true; | ||
} | ||
#elif __JHERETIC__ | ||
if(G_CurrentMapNumber() == 7) | ||
if(::gameMapUri.path() == "E1M8" || | ||
::gameMapUri.path() == "E2M8" || | ||
::gameMapUri.path() == "E3M8" || | ||
::gameMapUri.path() == "E4M8" || | ||
::gameMapUri.path() == "E5M8") | ||
{ | ||
return true; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks like regex matching would be beneficial in Uri?