| 1357 | } |
| 1358 | |
| 1359 | bool Game_Map::UpdateMapEvents(MapUpdateAsyncContext& actx) { |
| 1360 | int resume_ev = actx.GetParallelMapEvent(); |
| 1361 | |
| 1362 | for (Game_Event& ev : events) { |
| 1363 | bool resume_async = false; |
| 1364 | if (resume_ev != 0) { |
| 1365 | // If resuming, skip all until the event to resume from .. |
| 1366 | if (ev.GetId() != resume_ev) { |
| 1367 | continue; |
| 1368 | } else { |
| 1369 | resume_ev = 0; |
| 1370 | resume_async = true; |
| 1371 | } |
| 1372 | } |
| 1373 | |
| 1374 | auto aop = ev.Update(resume_async); |
| 1375 | if (aop.IsActive()) { |
| 1376 | // Suspend due to this event .. |
| 1377 | actx = MapUpdateAsyncContext::FromMapEvent(ev.GetId(), aop); |
| 1378 | return false; |
| 1379 | } |
| 1380 | } |
| 1381 | |
| 1382 | actx = {}; |
| 1383 | return true; |
| 1384 | } |
| 1385 | |
| 1386 | bool Game_Map::UpdateMessage(MapUpdateAsyncContext& actx) { |
| 1387 | // Message system does not support suspend and resume internally. So if the last frame the message |
nothing calls this directly
no test coverage detected