Skip to content

Commit ded54fd

Browse files
committed
minor tweaks from latest playtest
1 parent c1f77ce commit ded54fd

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/NGMPGame.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ void NGMPGame::launchGame(void)
420420
msg->appendIntegerArgument(GAME_INTERNET);
421421

422422
// TODO_NGMP
423-
//TheWritableGlobalData->m_useFpsLimit = false;
423+
TheWritableGlobalData->m_framesPerSecondLimit = 60;
424+
TheWritableGlobalData->m_useFpsLimit = false;
424425

425426
// Set the random seed
426427
// TODO_NGMP: revisit this

GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/NGMP_Helpers.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ void NetworkLog(const char* fmt, ...)
2929
overwriteFile << std::put_time(std::localtime(&in_time_t), "Log Started at %Y/%m/%d %H:%M") << std::endl;
3030
}
3131

32+
auto const time = std::chrono::current_zone()->to_local(std::chrono::system_clock::now());
33+
3234
char buffer[1024];
3335
va_list args;
3436
va_start(args, fmt);
3537
vsnprintf(buffer, 1024, fmt, args);
3638
buffer[1024 - 1] = 0;
3739
va_end(args);
3840

41+
std::string strLogBuffer = std::format("[{:%Y-%m-%d %T}] {}", time, buffer);
42+
3943
// TODO_NGMP: Keep open and flush regularly
4044
std::ofstream logFile;
4145
logFile.open(m_strNetworkLogFileName, std::ios_base::app);
42-
logFile << buffer << std::endl;
46+
logFile << strLogBuffer.c_str() << std::endl;
4347
logFile.close();
4448

4549
#if defined(GENERALS_ONLINE_BRANCH_JMARSHALL)

0 commit comments

Comments
 (0)