0ad/source
vyordan 71be79791f
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Use turn_id_t (int32_t) for turn-count across simulation, network and replay
CSimulation2 used , CSimulation2Impl mixed /, and
CTurnManager used  for the same turn-count concept, forcing a
static_cast<int64_t> at the one place these types already met
(rejoin-test comparison).

Add  (alias for std::int32_t) in SimulationCommand.h and use
it consistently for every turn counter in CSimulation2/Impl,
CTurnManager and its subclasses (CLocalTurnManager,
CReplayTurnManager), CNetServerTurnManager/CNetClientTurnManager, and
the network wire format (m_Turn in CEndCommandBatchMessage,
CSimulationMessage, CSyncCheckMessage, CSyncErrorMessage, and
m_CurrentTurn in CLoadedGameMessage).

Turn *duration* fields (m_TurnLength, m_CommandDelay,
DEFAULT_TURN_LENGTH, COMMAND_DELAY_SP/MP, SetTurnLength,
GetSavedTurnLength return type) are left as u32 — they're milliseconds,
not a counter, and out of scope here.

Remaining turn_id_t vs size_t comparisons use std::cmp_equal or
explicit casts, matching the existing pattern in Simulation2.cpp.

Fixes #8718
2026-07-31 10:34:20 +02:00
..
collada Fix some includes all over the place 2025-08-14 20:15:30 +02:00
dapinterface Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
graphics Make NUSpline public members protected 2026-07-29 18:44:03 +02:00
gui Fix brief text misalignment in GUI text objects 2026-07-22 23:51:49 +02:00
i18n Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
lib Uses std::string_view for UTF-8 conversions 2026-07-14 00:14:27 +02:00
lobby Re-use XMPP resource GUID for whole app runtime 2026-07-01 15:36:51 +02:00
maths Make NUSpline public members protected 2026-07-29 18:44:03 +02:00
network Use turn_id_t (int32_t) for turn-count across simulation, network and replay 2026-07-31 10:34:20 +02:00
pch Compute actual size of GUI objects lazily 2026-04-12 00:17:02 +02:00
ps Use switchPage in autostart 2026-07-30 12:36:51 +02:00
renderer Adds sRGB support for proper lighting 2026-07-29 01:29:09 +02:00
rlinterface Uses std::string_view for Script::Interface::Eval 2026-07-13 23:53:24 +02:00
scriptinterface Uses std::string_view for Script::Interface::Eval 2026-07-13 23:53:24 +02:00
simulation2 Use turn_id_t (int32_t) for turn-count across simulation, network and replay 2026-07-31 10:34:20 +02:00
soundmanager Makes GameView returning reference on camera 2026-06-28 17:57:16 +02:00
third_party Adds sRGB support to GLES 2026-07-29 01:29:11 +02:00
tools Don't nest Paths in Common settings 2026-07-30 18:43:24 +02:00
CxxTestRunner.tpl Use return instead of exit in testrunner 2025-10-15 18:17:24 +02:00
main.cpp Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00
test_setup.cpp Move Script* classes to Script namespace 2026-06-20 17:43:00 +02:00