Add the -ooslog support for replays. Refs #3169, see also a7b18d02bf
.
This was SVN commit r16531.
This commit is contained in:
parent
528dc9179a
commit
01673b4c58
@ -450,7 +450,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
|
|||||||
{
|
{
|
||||||
CReplayPlayer replay;
|
CReplayPlayer replay;
|
||||||
replay.Load(args.Get("replay"));
|
replay.Load(args.Get("replay"));
|
||||||
replay.Replay(args.Has("serializationtest"));
|
replay.Replay(args.Has("serializationtest"), args.Has("ooslog"));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_VFS.reset();
|
g_VFS.reset();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2014 Wildfire Games.
|
/* Copyright (C) 2015 Wildfire Games.
|
||||||
* This file is part of 0 A.D.
|
* This file is part of 0 A.D.
|
||||||
*
|
*
|
||||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
* 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());
|
ENSURE(m_Stream->good());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CReplayPlayer::Replay(bool serializationtest)
|
void CReplayPlayer::Replay(bool serializationtest, bool ooslog)
|
||||||
{
|
{
|
||||||
ENSURE(m_Stream);
|
ENSURE(m_Stream);
|
||||||
|
|
||||||
@ -139,6 +139,8 @@ void CReplayPlayer::Replay(bool serializationtest)
|
|||||||
g_Game = &game;
|
g_Game = &game;
|
||||||
if (serializationtest)
|
if (serializationtest)
|
||||||
game.GetSimulation2()->EnableSerializationTest();
|
game.GetSimulation2()->EnableSerializationTest();
|
||||||
|
if (ooslog)
|
||||||
|
game.GetSimulation2()->EnableOOSLog();
|
||||||
|
|
||||||
JSContext* cx = game.GetSimulation2()->GetScriptInterface().GetContext();
|
JSContext* cx = game.GetSimulation2()->GetScriptInterface().GetContext();
|
||||||
JSAutoRequest rq(cx);
|
JSAutoRequest rq(cx);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2014 Wildfire Games.
|
/* Copyright (C) 2015 Wildfire Games.
|
||||||
* This file is part of 0 A.D.
|
* This file is part of 0 A.D.
|
||||||
*
|
*
|
||||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||||
@ -89,7 +89,7 @@ public:
|
|||||||
~CReplayPlayer();
|
~CReplayPlayer();
|
||||||
|
|
||||||
void Load(const std::string& path);
|
void Load(const std::string& path);
|
||||||
void Replay(bool serializationtest);
|
void Replay(bool serializationtest, bool ooslog);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::istream* m_Stream;
|
std::istream* m_Stream;
|
||||||
|
Loading…
Reference in New Issue
Block a user