0ad/source/simulation2/helpers
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
..
CinemaPath.cpp Make NUSpline public members protected 2026-07-29 18:44:03 +02:00
CinemaPath.h Makes GameView returning reference on camera 2026-06-28 17:57:16 +02:00
Geometry.cpp Fix includes in source/simulation2 2025-08-08 07:10:11 +02:00
Geometry.h Fix includes in source/simulation2 2025-08-08 07:10:11 +02:00
Grid.h Replace deprecated std::is_pod 2025-08-12 20:45:15 +02:00
HierarchicalPathfinder.cpp Fix includes in source/simulation2 2025-08-07 08:38:40 +02:00
HierarchicalPathfinder.h Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
LongPathfinder.cpp Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
LongPathfinder.h Fix some includes all over the place 2025-08-13 19:38:21 +02:00
Los.h LosRevealAll -> LosRevealWholeMap 2026-03-03 11:25:52 +01:00
MapEdgeTiles.h Fix includes in source/simulation2 2025-08-08 07:10:11 +02:00
Pathfinding.cpp Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
Pathfinding.h Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
PathGoal.cpp Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
PathGoal.h Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
Player.h Fix includes in source/simulation2 2025-08-07 08:38:40 +02:00
Position.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
PriorityQueue.h Fix includes in source/simulation2 2025-08-08 07:10:11 +02:00
Rasterize.cpp Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
Rasterize.h Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
Render.cpp Replace M_PI with C++ numbers 2026-06-04 20:29:48 +02:00
Render.h Fix includes in source/simulation2 2025-08-08 07:10:11 +02:00
Selection.cpp Fix includes in source/simulation2 2025-08-03 17:16:27 +02:00
Selection.h Fix includes in source/simulation2 2025-08-07 20:00:49 +02:00
SimulationCommand.h Use turn_id_t (int32_t) for turn-count across simulation, network and replay 2026-07-31 10:34:20 +02:00
Spatial.h Fix some includes all over the place 2025-08-13 19:38:21 +02:00
VertexPathfinder.cpp Replace M_PI with C++ numbers 2026-06-04 20:29:48 +02:00
VertexPathfinder.h Small optimisation for VertexPathfinder edge handling. 2026-03-11 18:45:23 +01:00