mirror of https://github.com/OpenRCT2/OpenRCT2.git
Ignore replay test when network is disabled.
This commit is contained in:
parent
ccc3227113
commit
5cfc06573e
|
@ -193,7 +193,9 @@ namespace OpenRCT2
|
|||
}
|
||||
else if (_mode == ReplayMode::PLAYING)
|
||||
{
|
||||
#ifndef DISABLE_NETWORK
|
||||
CheckState();
|
||||
#endif
|
||||
ReplayCommands();
|
||||
|
||||
// If we run out of commands and checked all checksums we can stop.
|
||||
|
@ -590,6 +592,7 @@ namespace OpenRCT2
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
void CheckState()
|
||||
{
|
||||
uint32_t checksumIndex = _currentReplay->checksumIndex;
|
||||
|
@ -620,6 +623,7 @@ namespace OpenRCT2
|
|||
_currentReplay->checksumIndex++;
|
||||
}
|
||||
}
|
||||
#endif // DISABLE_NETWORK
|
||||
|
||||
void ReplayCommands()
|
||||
{
|
||||
|
|
|
@ -189,9 +189,11 @@ add_executable(test_tile_elements ${TILE_ELEMENT_TEST_SOURCES})
|
|||
target_link_libraries(test_tile_elements ${GTEST_LIBRARIES} libopenrct2 ${LDL} z)
|
||||
add_test(NAME tile_elements COMMAND test_tile_elements)
|
||||
|
||||
# Replay tests
|
||||
set(REPLAY_TEST_SOURCES "${CMAKE_CURRENT_LIST_DIR}/ReplayTests.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/TestData.cpp")
|
||||
add_executable(test_replays ${REPLAY_TEST_SOURCES})
|
||||
target_link_libraries(test_replays ${GTEST_LIBRARIES} libopenrct2 ${LDL} z)
|
||||
add_test(NAME replay_tests COMMAND test_replays)
|
||||
if (NOT DISABLE_NETWORK)
|
||||
# Replay tests
|
||||
set(REPLAY_TEST_SOURCES "${CMAKE_CURRENT_LIST_DIR}/ReplayTests.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/TestData.cpp")
|
||||
add_executable(test_replays ${REPLAY_TEST_SOURCES})
|
||||
target_link_libraries(test_replays ${GTEST_LIBRARIES} libopenrct2 ${LDL} z)
|
||||
add_test(NAME replay_tests COMMAND test_replays)
|
||||
endif ()
|
||||
|
|
Loading…
Reference in New Issue