diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index f5c332ad4..d0046c6ed 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7452,18 +7452,9 @@ FOUNDCHEAT: KB_FlushKeyBoardQueue(); return; } - else if (volnume == 0) - { - if (levnume > 5) - { - ps[myconnectindex].cheat_phase = 0; - KB_FlushKeyBoardQueue(); - return; - } - } else { - if (levnume >= MAXLEVELS) + if (levnume >= MAXLEVELS || level_file_names[volnume*MAXLEVELS+levnume] == NULL) { ps[myconnectindex].cheat_phase = 0; KB_FlushKeyBoardQueue(); diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index b7f355b0f..0257b7404 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -1436,7 +1436,7 @@ char checkhitswitch(short snum,long w,char switchtype) else { ud.level_number++; - if ((ud.volume_number && ud.level_number > 10) || (ud.volume_number == 0 && ud.level_number > 5)) + if (ud.level_number > MAXLEVELS-1) ud.level_number = 0; ud.m_level_number = ud.level_number; } @@ -3244,7 +3244,7 @@ void checksectors(short snum) else { ud.level_number++; - if ((ud.volume_number && ud.level_number > 10) || (ud.volume_number == 0 && ud.level_number > 5)) + if (ud.level_number > MAXLEVELS-1) ud.level_number = 0; ud.m_level_number = ud.level_number; }