Commit 0cdbc81
authored
feat(math): integrate deterministic GameMath (#176)
* feat(math): integrate deterministic GameMath
Replaces standard CRT trigonometric functions with deterministic
fdlibm equivalents from GameMath via FetchContent.
Ensures multiplayer cross-platform replay determinism.
Resolves cross-platform mismatch disconnects.
* Enforce cross-platform math determinism (GameMath) & Fix Linux build
* Fix remaining non-deterministic native math calls in Core libraries
This commit addresses remaining naked CRT calls (ceilf, floorf, sqrt) in BaseType.h, Point.h, INI.cpp, and AIPathfind.cpp that were previously missed, enforcing determinism via WWMath and fast_float wrappers to prevent cross-platform replay desyncs.
* docs(devblog): sanitize user path in dev blog
* fix(audio): resolve FPU precision state leaks and disable retail macros
- Implement ScopedFPUGuard to restore FPU precision mode upon scope exit in MiniAudio and OpenAL audio managers.
- Disable legacy RETAIL_COMPATIBLE_* macros (CRC, PATHFINDING, AIGroup, Networking, etc.) in GameDefines.h to avoid dynamic RNG/memory inconsistencies.
* ci(replay-tests): fetch assets/replays from gitlab with caching
Add GitLab cloning with GitHub fallback for replays. Implement branch matching for assets and replays repositories. Enable caching for the replay files repository to optimize CI runs.
* chore(engine): enable retail compatibility modes and update resolution
Enable retail compatibility macros (scripted camera, CRC, pathfinding, allocation, AI group) and set default display resolution to 1024x768.
* disable all retail compatibility1 parent d3ee2cc commit 0cdbc81
97 files changed
Lines changed: 517 additions & 393 deletions
File tree
- .github/workflows
- Core
- GameEngineDevice/Source
- MiniAudioDevice
- OpenALAudioDevice
- GameEngine
- Include/Common
- Source
- Common/INI
- GameClient/MessageStream
- GameLogic/AI
- Libraries
- Include/Lib
- Source/WWVegas
- WWLib
- WWMath
- GeneralsMD/Code/GameEngine
- Include/GameLogic
- Source
- Common
- RTS
- System
- GameClient
- GameLogic
- AI
- Map
- Object
- Behavior
- Update
- AIUpdate
- DockUpdate
- System
- Generals/Code/GameEngine
- Include/GameLogic
- Source
- Common
- RTS
- System
- GameClient
- GameLogic
- AI
- Map
- Object
- Behavior
- Update
- AIUpdate
- DockUpdate
- System
- cmake
- docs/WORKLOG
- flatpak
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 162 | + | |
171 | 163 | | |
172 | 164 | | |
173 | 165 | | |
174 | 166 | | |
| 167 | + | |
| 168 | + | |
175 | 169 | | |
176 | 170 | | |
177 | 171 | | |
178 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
195 | 203 | | |
196 | 204 | | |
197 | 205 | | |
| |||
223 | 231 | | |
224 | 232 | | |
225 | 233 | | |
226 | | - | |
227 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
228 | 237 | | |
229 | | - | |
230 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
231 | 274 | | |
232 | 275 | | |
233 | 276 | | |
| |||
244 | 287 | | |
245 | 288 | | |
246 | 289 | | |
247 | | - | |
248 | | - | |
| 290 | + | |
| 291 | + | |
249 | 292 | | |
250 | | - | |
| 293 | + | |
251 | 294 | | |
252 | | - | |
| 295 | + | |
253 | 296 | | |
254 | 297 | | |
255 | 298 | | |
| |||
279 | 322 | | |
280 | 323 | | |
281 | 324 | | |
282 | | - | |
283 | | - | |
| 325 | + | |
| 326 | + | |
284 | 327 | | |
285 | | - | |
| 328 | + | |
286 | 329 | | |
287 | | - | |
| 330 | + | |
288 | 331 | | |
289 | 332 | | |
290 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
1866 | 1867 | | |
1867 | 1868 | | |
1868 | 1869 | | |
1869 | | - | |
| 1870 | + | |
1870 | 1871 | | |
1871 | 1872 | | |
1872 | 1873 | | |
1873 | 1874 | | |
1874 | 1875 | | |
1875 | 1876 | | |
1876 | 1877 | | |
1877 | | - | |
| 1878 | + | |
1878 | 1879 | | |
1879 | 1880 | | |
1880 | 1881 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
921 | 922 | | |
922 | 923 | | |
923 | 924 | | |
924 | | - | |
| 925 | + | |
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
| |||
2070 | 2071 | | |
2071 | 2072 | | |
2072 | 2073 | | |
2073 | | - | |
| 2074 | + | |
2074 | 2075 | | |
2075 | 2076 | | |
2076 | 2077 | | |
| |||
2096 | 2097 | | |
2097 | 2098 | | |
2098 | 2099 | | |
2099 | | - | |
| 2100 | + | |
2100 | 2101 | | |
2101 | 2102 | | |
2102 | 2103 | | |
| |||
6444 | 6445 | | |
6445 | 6446 | | |
6446 | 6447 | | |
6447 | | - | |
| 6448 | + | |
6448 | 6449 | | |
6449 | 6450 | | |
6450 | 6451 | | |
| |||
6768 | 6769 | | |
6769 | 6770 | | |
6770 | 6771 | | |
6771 | | - | |
| 6772 | + | |
6772 | 6773 | | |
6773 | 6774 | | |
6774 | 6775 | | |
| |||
7459 | 7460 | | |
7460 | 7461 | | |
7461 | 7462 | | |
7462 | | - | |
| 7463 | + | |
7463 | 7464 | | |
7464 | 7465 | | |
7465 | 7466 | | |
| |||
8163 | 8164 | | |
8164 | 8165 | | |
8165 | 8166 | | |
8166 | | - | |
| 8167 | + | |
8167 | 8168 | | |
8168 | 8169 | | |
8169 | 8170 | | |
| |||
11216 | 11217 | | |
11217 | 11218 | | |
11218 | 11219 | | |
11219 | | - | |
| 11220 | + | |
11220 | 11221 | | |
11221 | 11222 | | |
11222 | 11223 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
| 496 | + | |
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| |||
528 | 532 | | |
529 | 533 | | |
530 | 534 | | |
| 535 | + | |
531 | 536 | | |
532 | 537 | | |
533 | 538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 226 | + | |
230 | 227 | | |
231 | 228 | | |
232 | | - | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
| |||
0 commit comments