doom: fix -warp argument parsing bug

This commit is contained in:
cinap_lenrek 2012-07-27 16:49:56 +02:00
parent 543e510da1
commit 6d3ff523db

View file

@ -917,12 +917,10 @@ void D_DoomMain (void)
p = M_CheckParm ("-warp"); p = M_CheckParm ("-warp");
if (p && p < myargc-1) if (p && p < myargc-1)
{ {
if (gamemode == commercial)
startmap = atoi (myargv[p+1]); startmap = atoi (myargv[p+1]);
else if (gamemode != commercial){
{ startepisode = startmap / 10;
startepisode = myargv[p+1][0]-'0'; startmap %= 10;
startmap = myargv[p+2][0]-'0';
} }
autostart = true; autostart = true;
} }