| 981 | } |
| 982 | |
| 983 | void loadReplayFromPath(const char * sourceReplayPath) |
| 984 | { |
| 985 | char replayPath[TFE_MAX_PATH]; |
| 986 | sprintf(replayPath, "%s", sourceReplayPath); |
| 987 | |
| 988 | FileUtil::fixupPath(replayPath); |
| 989 | |
| 990 | if (!FileUtil::exists(replayPath)) |
| 991 | { |
| 992 | TFE_System::logWrite(LOG_MSG, "Replay", "Replay file does not exist: %s . Exiting...", replayPath); |
| 993 | TFE_FrontEndUI::setState(APP_STATE_QUIT); |
| 994 | return; |
| 995 | } |
| 996 | |
| 997 | // Always set this to false as we are loading a replay from path |
| 998 | alwaysRecord = TFE_Settings::getGameSettings()->df_enableRecordingAll; |
| 999 | TFE_Settings::getGameSettings()->df_enableRecordingAll = false; |
| 1000 | |
| 1001 | TFE_SaveSystem::SaveHeader header; |
| 1002 | loadReplayHeader(replayPath, &header); |
| 1003 | |
| 1004 | TFE_DarkForces::enableCutscenes(false); |
| 1005 | |
| 1006 | loadReplayWrapper(replayPath, header.modNames, header.levelId); |
| 1007 | } |
| 1008 | |
| 1009 | // This is a replay wrapper that handles agents and replay configuration |
| 1010 | void loadReplayWrapper(string replayFile, string modName, string levelId) |
no test coverage detected