Delete-E while playing a level now works properly - it closes Game_wind and sets Cursegp if necessary when going to the editor
This commit is contained in:
parent
4c9ac01f4b
commit
ef6e5180db
|
@ -5,6 +5,7 @@ D1X-Rebirth Changelog
|
|||
main/gamesave.c: Fix crash when loading a level in the editor
|
||||
editor/segment.c, include/editor/editor.h, main/gamesave.c: Set Gamesave_current_version to correct version when making a new mine, move create_new_mine to gamesave.c
|
||||
main/gamesave.c: Don't bother generating a game text file (.txm) every time a level is loaded, even if the EDITOR is compiled. Just when a level is saved
|
||||
editor/med.c, main/game.c, main/gamecntl.c: Delete-E while playing a level now works properly - it closes Game_wind and sets Cursegp if necessary when going to the editor
|
||||
|
||||
20120412
|
||||
--------
|
||||
|
|
|
@ -400,6 +400,9 @@ void init_editor()
|
|||
|
||||
Draw_all_segments = 1; // Say draw all segments, not just connected ones
|
||||
|
||||
if (!Cursegp)
|
||||
Cursegp = &Segments[0];
|
||||
|
||||
init_autosave();
|
||||
|
||||
// atexit(close_editor);
|
||||
|
|
|
@ -1052,6 +1052,9 @@ int game_handler(window *wind, d_event *event, void *data)
|
|||
|
||||
game_disable_cheats();
|
||||
Game_mode = GM_GAME_OVER;
|
||||
#ifdef EDITOR
|
||||
if (!EditorWindow) // have to do it this way because of the necessary longjmp. Yuck.
|
||||
#endif
|
||||
show_menus();
|
||||
Game_wind = NULL;
|
||||
event_toggle_focus(0);
|
||||
|
|
|
@ -822,10 +822,8 @@ int HandleTestKey(int key)
|
|||
#ifdef EDITOR //editor-specific functions
|
||||
|
||||
case KEY_E + KEY_DEBUGGED:
|
||||
#ifdef NETWORK
|
||||
multi_leave_game();
|
||||
#endif
|
||||
init_editor();
|
||||
window_close(Game_wind);
|
||||
break;
|
||||
case KEY_C + KEY_SHIFTED + KEY_DEBUGGED:
|
||||
if (!Player_is_dead && !( Game_mode & GM_MULTI ))
|
||||
|
|
Loading…
Reference in a new issue