forked from 0ad/0ad
Add serialization test support for replays.
This was SVN commit r15547.
This commit is contained in:
parent
b41289807a
commit
a7b18d02bf
@ -442,7 +442,7 @@ static void RunGameOrAtlas(int argc, const char* argv[])
|
||||
{
|
||||
CReplayPlayer replay;
|
||||
replay.Load(args.Get("replay"));
|
||||
replay.Replay();
|
||||
replay.Replay(args.Has("serializationtest"));
|
||||
}
|
||||
|
||||
g_VFS.reset();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -119,7 +119,7 @@ void CReplayPlayer::Load(const std::string& path)
|
||||
ENSURE(m_Stream->good());
|
||||
}
|
||||
|
||||
void CReplayPlayer::Replay()
|
||||
void CReplayPlayer::Replay(bool serializationtest)
|
||||
{
|
||||
ENSURE(m_Stream);
|
||||
|
||||
@ -131,6 +131,8 @@ void CReplayPlayer::Replay()
|
||||
|
||||
CGame game(true);
|
||||
g_Game = &game;
|
||||
if (serializationtest)
|
||||
game.GetSimulation2()->EnableSerializationTest();
|
||||
|
||||
// Need some stuff for terrain movement costs:
|
||||
// (TODO: this ought to be independent of any graphics code)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -88,7 +88,7 @@ public:
|
||||
~CReplayPlayer();
|
||||
|
||||
void Load(const std::string& path);
|
||||
void Replay();
|
||||
void Replay(bool serializationtest);
|
||||
|
||||
private:
|
||||
std::istream* m_Stream;
|
||||
|
Loading…
Reference in New Issue
Block a user