Save oos_dump.dat too when saving oos_dump.txt.

Saves time to reproduce the binary simstate or provides data that may be
otherwise irreproducible, refs #5162.

Differential Revision: https://code.wildfiregames.com/D1544
Reviewed By: temple
This was SVN commit r21830.
This commit is contained in:
elexis 2018-05-29 02:50:33 +00:00
parent 333766ef1b
commit 4fbe399e07

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2018 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -123,6 +123,10 @@ void CNetClientTurnManager::OnSyncError(u32 turn, const CStr& expectedHash, cons
m_Simulation2.DumpDebugState(file);
file.close();
std::ofstream binfile (OsString(oosdumpPath.ChangeExtension(L".dat")).c_str(), std::ofstream::out | std::ofstream::trunc | std::ofstream::binary);
m_Simulation2.SerializeState(binfile);
binfile.close();
std::stringstream playerNamesString;
std::vector<CStr> playerNamesStrings;
playerNamesStrings.reserve(playerNames.size());