X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fscreens.c;h=c8bcf368cc70cfa75970449d2bbab67f280764f0;hp=7d783a9b21a3f672e3f5c13ce5574d63db856b8a;hb=cdc3c940197937b0508a1eb7dcf44874951908b7;hpb=1e57e2856183b3ea50b298ec6ffb4307b584c056 diff --git a/src/screens.c b/src/screens.c index 7d783a9b..c8bcf368 100644 --- a/src/screens.c +++ b/src/screens.c @@ -511,6 +511,9 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (y == 5) { +#if 1 + StartGameActions(options.network, setup.autorecord, NEW_RANDOMIZE); +#else if (setup.autorecord) TapeStartRecording(); @@ -524,6 +527,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) StopAnimation(); InitGame(); } +#endif } else if (y == 6) { @@ -3082,6 +3086,9 @@ void HandleGameActions() } else { + if (game.restart_level) + StartGameActions(options.network, setup.autorecord, NEW_RANDOMIZE); + if (local_player->LevelSolved) GameWon(); @@ -3096,6 +3103,30 @@ void HandleGameActions() } } +void StartGameActions(boolean init_network_game, boolean record_tape, + long random_seed) +{ + if (record_tape) + TapeStartRecording(random_seed); + +#if defined(NETWORK_AVALIABLE) + if (init_network_game) + { + SendToServer_StartPlaying(); + + return; + } +#endif + + StopAnimation(); + + game_status = GAME_MODE_PLAYING; + + InitRND(random_seed); + + InitGame(); +} + /* ---------- new screen button stuff -------------------------------------- */ /* graphic position and size values for buttons and scrollbars */