Fix Doom episode 2&3 and Doom II switches not animating properly

This commit is contained in:
Lephenixnoir 2021-08-12 17:19:32 +02:00
parent 56e0d05640
commit 1639adce59
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 8 additions and 4 deletions

2
README
View File

@ -22,7 +22,6 @@ WAD support TODO:
=> Check the finale and the end of E1M9
-> Ultimate Doom WAD:
=> Episode 1 should be 100%
=> E2M3 has missing textures through the door at the start
=> E2M7 may not load based on fragmentation
=> Episodes 3 & 4 seem to be OK
@ -33,7 +32,6 @@ Technical support TODO:
=> Identify arrays that can go to PRAM, eg. lumpcache
=> Remove multiply-avoiding lookup tables?
-> Rate-limit the game when overclocking
-> Switches don't always show the pressed texture (?)
-> Add more SHORT() to avoid having to copy-align lumps
(note left by MPoupe in m_swap.h)
-> Load/Save game would be very cool

View File

@ -109,6 +109,9 @@ void P_InitSwitchList(void)
int index;
int episode;
/* CGDOOM: Load all the switches, don't ask where the WADs came from. */
episode = 3;
#if 0
episode = 1;
if (gamemode == registered)
@ -116,6 +119,7 @@ void P_InitSwitchList(void)
else
if ( gamemode == commercial )
episode = 3;
#endif
for (index = 0,i = 0;i < MAXSWITCHES;i++)
{
@ -128,8 +132,10 @@ void P_InitSwitchList(void)
if (alphSwitchList[i].episode <= episode)
{
switchlist[index++] = R_TextureNumForName(alphSwitchList[i].name1);
switchlist[index++] = R_TextureNumForName(alphSwitchList[i].name2);
/* CGDOOM: Since we forced all switches to appear, some of them may not
actually be in the WAD. Use the Check function to not fail. */
switchlist[index++] = R_CheckTextureNumForName(alphSwitchList[i].name1);
switchlist[index++] = R_CheckTextureNumForName(alphSwitchList[i].name2);
}
}
}