-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a "prev map" key binding #2007
Comments
How about this? int G_GotoPrevLevel(void)
{
const int cur_epsd = gameepisode;
const int cur_map = gamemap;
const int start_epsd = (gamemode == commercial) ? 1 : 9;
int ret = false;
for (gameepisode = start_epsd; gameepisode > 0; gameepisode--)
{
for (gamemap = 99; gamemap >= 0; gamemap--)
{
int next_epsd, next_map;
G_GotoNextLevel(&next_epsd, &next_map);
if (next_epsd == cur_epsd && next_map == cur_map)
{
G_DeferedInitNew(gameskill, gameepisode, gamemap);
ret = true;
break;
}
}
}
gameepisode = cur_epsd;
gamemap = cur_map;
return ret;
} |
Why are we looking from the end? BTW, It is possible that we will not find the current map due to secret exits. Try to test "Fork in the Road" WAD |
I'd like to find the highest possible map that would lead to the current map. For reasons I don't remember. It appeared plausible to me. 😁
Yes, it's possible, but then nothing will happen. We will have to provide feedback to the player, just as we do for e.g. IDCLEV99. |
This would be very useful for testing. I think the key bindings menu is out of room though.
The text was updated successfully, but these errors were encountered: