ref: 8f2b8a20c63cdcc7ddf5674ccfc99da59d2c17f0
parent: e886c4225eec28cd3f5da2d53bc2190eb7b8cdeb
author: LTCHIPS <ltchips994@gmail.com>
date: Mon May 21 12:38:00 EDT 2018
fixed load crash on custom map packs
--- a/rott/rt_game.c
+++ b/rott/rt_game.c
@@ -5191,11 +5191,22 @@
if (game->version!=ROTTVERSION)
return false;
-
+
+ //Fix for crash when loading a save on a custom map pack
+ if(GameLevels.avail)
+ {
+ memcpy(&game->info.file, &GameLevels.file, sizeof(GameLevels.file));
+ game->info.path = getcwd(0,0);
+ }
memcpy (&GameLevels, &game->info, sizeof (GameLevels));
+
+
gamestate.episode=game->episode;
gamestate.mapon=game->area;
+
+ //printf("LOAD PATH: %s \n", game->info.path);
+ //printf("LOAD FILENAME: %s \n", game->info.file);
mapcrc=GetMapCRC (gamestate.mapon);
--- a/rott/rt_menu.c
+++ b/rott/rt_menu.c
@@ -1890,6 +1890,7 @@
LastScan = 0;
Keyboard[ sc_F9 ] = 0;
+ CP_LoadGame(1, 0);
loadsavesound = true;
break;