diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-30 19:51:11 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-30 19:51:11 +0200 |
commit | f899b2fe3c091ccab33673f9fea9d1d99c0c2940 (patch) | |
tree | 6deda91a1b35bf5306433da6dbb8c1120c3658af /sys/src/games | |
parent | fdb1698791dc51dbf690fec4a1d1c7b6a4b52345 (diff) |
games/doom: fix switch textures swapping in ultimate doom (thansk qu7uux)
gamemode is set according to the name of the main wad (cf. d_main.c), i.e.:
- doom1.wad: (shareware doom1, ep1 only) gamemode == shareware
- doom.wad: (registered doom1, ep1-3) gamemode == registered
- doomu.wad: (ultimate doom, ep1-4) gamemode == retail
- doom2.wad, plutonia.wad, tnt.wad: gamemode == commercial
most doom.wad's distributed online are, in fact, ultimate doom.
if your ultimate doom wad is correctly named doomu.wad, some switches in
episodes 2-4 won't swap their texture when toggled, because
p_switch.c:P_InitSwitchList() is only checking for registered doom1.
easy way to test: demo2 in either registered or ultimate doom: the player flips
a switch right at the beginning of the demo; if the main wad is called
doomu.wad, the switch won't change its texture.
% games/doom -playdemo demo2
if you rename the wad to doom.wad or alter d_main.c:IdentifyVersion, the switch
will swap its texture like it should.
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/doom/p_switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/games/doom/p_switch.c b/sys/src/games/doom/p_switch.c index c389fb30f..0a8b277c4 100644 --- a/sys/src/games/doom/p_switch.c +++ b/sys/src/games/doom/p_switch.c @@ -112,7 +112,7 @@ void P_InitSwitchList(void) episode = 1; - if (gamemode == registered) + if (gamemode == registered || gamemode == retail) episode = 2; else if ( gamemode == commercial ) |