| 1330 | |
| 1331 | |
| 1332 | bool Game_Map::UpdateCommonEvents(MapUpdateAsyncContext& actx) { |
| 1333 | int resume_ce = actx.GetParallelCommonEvent(); |
| 1334 | |
| 1335 | for (Game_CommonEvent& ev : common_events) { |
| 1336 | bool resume_async = false; |
| 1337 | if (resume_ce != 0) { |
| 1338 | // If resuming, skip all until the event to resume from .. |
| 1339 | if (ev.GetIndex() != resume_ce) { |
| 1340 | continue; |
| 1341 | } else { |
| 1342 | resume_ce = 0; |
| 1343 | resume_async = true; |
| 1344 | } |
| 1345 | } |
| 1346 | |
| 1347 | auto aop = ev.Update(resume_async); |
| 1348 | if (aop.IsActive()) { |
| 1349 | // Suspend due to this event .. |
| 1350 | actx = MapUpdateAsyncContext::FromCommonEvent(ev.GetIndex(), aop); |
| 1351 | return false; |
| 1352 | } |
| 1353 | } |
| 1354 | |
| 1355 | actx = {}; |
| 1356 | return true; |
| 1357 | } |
| 1358 | |
| 1359 | bool Game_Map::UpdateMapEvents(MapUpdateAsyncContext& actx) { |
| 1360 | int resume_ev = actx.GetParallelMapEvent(); |
nothing calls this directly
no test coverage detected