diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-27 16:49:56 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-27 16:49:56 +0200 |
commit | 6d3ff523db105172e47eefed7b768decd2978945 (patch) | |
tree | 502e3fe196f058fe248905473a8b359d03f7e895 /sys | |
parent | 543e510da1869cf8d352225bade8fc732c598497 (diff) |
doom: fix -warp argument parsing bug
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/games/doom/d_main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/src/games/doom/d_main.c b/sys/src/games/doom/d_main.c index c5e3f02f5..f693bebff 100644 --- a/sys/src/games/doom/d_main.c +++ b/sys/src/games/doom/d_main.c @@ -917,13 +917,11 @@ void D_DoomMain (void) p = M_CheckParm ("-warp"); if (p && p < myargc-1) { - if (gamemode == commercial) - startmap = atoi (myargv[p+1]); - else - { - startepisode = myargv[p+1][0]-'0'; - startmap = myargv[p+2][0]-'0'; - } + startmap = atoi (myargv[p+1]); + if (gamemode != commercial){ + startepisode = startmap / 10; + startmap %= 10; + } autostart = true; } |