Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions code/mission/missiontraining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,10 +754,17 @@ SCP_string message_translate_tokens(const char *text)
if (!stricmp(ptr, NOX("none")) && (Training_bind_warning != Missiontime)) {
// check if a warning message should be displayed if the key is unbound
if ( (The_mission.game_type & MISSION_TYPE_TRAINING) || (Always_warn_player_about_unbound_keys && (The_mission.game_type & MISSION_TYPE_SINGLE)) ) {
int index_to_use;
if (Control_config[Failed_key_index].indexXSTR > 1) {
index_to_use = Control_config[Failed_key_index].indexXSTR;
} else if (Control_config[Failed_key_index].indexXSTR == 1) {
index_to_use = CONTROL_CONFIG_XSTR + Failed_key_index;
} else {
index_to_use = -1;
}
r = popup(PF_TITLE_BIG | PF_TITLE_RED, 2, XSTR( "&Bind Control", 424), XSTR( "&Abort mission", 425),
XSTR( "Warning\nYou have no control bound to the action \"%s\". You must do so before you can continue with your training.", 426),
XSTR(Control_config[Failed_key_index].text.c_str(), CONTROL_CONFIG_XSTR + Failed_key_index));

XSTR(Control_config[Failed_key_index].text.c_str(), index_to_use));
if (r) { // do they want to abort the mission?
gameseq_post_event(GS_EVENT_END_GAME);
return buf;
Expand Down