1
0
forked from 0ad/0ad

Add the -ooslog support for replays. Refs #3169, see also a7b18d02bf.

This was SVN commit r16531.
This commit is contained in:
Nicolas Auvray 2015-04-11 18:12:35 +00:00
parent 528dc9179a
commit 01673b4c58
3 changed files with 7 additions and 5 deletions

View File

@ -450,7 +450,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
{
CReplayPlayer replay;
replay.Load(args.Get("replay"));
replay.Replay(args.Has("serializationtest"));
replay.Replay(args.Has("serializationtest"), args.Has("ooslog"));
}
g_VFS.reset();

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2014 Wildfire Games.
/* Copyright (C) 2015 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -122,7 +122,7 @@ void CReplayPlayer::Load(const std::string& path)
ENSURE(m_Stream->good());
}
void CReplayPlayer::Replay(bool serializationtest)
void CReplayPlayer::Replay(bool serializationtest, bool ooslog)
{
ENSURE(m_Stream);
@ -139,6 +139,8 @@ void CReplayPlayer::Replay(bool serializationtest)
g_Game = &game;
if (serializationtest)
game.GetSimulation2()->EnableSerializationTest();
if (ooslog)
game.GetSimulation2()->EnableOOSLog();
JSContext* cx = game.GetSimulation2()->GetScriptInterface().GetContext();
JSAutoRequest rq(cx);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2014 Wildfire Games.
/* Copyright (C) 2015 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -89,7 +89,7 @@ public:
~CReplayPlayer();
void Load(const std::string& path);
void Replay(bool serializationtest);
void Replay(bool serializationtest, bool ooslog);
private:
std::istream* m_Stream;