| 413 | } |
| 414 | } |
| 415 | void World::InitCenter(AICenterMode mode, AICenter* cnt) |
| 416 | { |
| 417 | for (int i = 0; i < cnt->NGroups(); i++) |
| 418 | { |
| 419 | AIGroup* grp = cnt->GetGroup(i); |
| 420 | if (!grp) |
| 421 | { |
| 422 | continue; |
| 423 | } |
| 424 | for (int j = 0; j < MAX_UNITS_PER_GROUP; j++) |
| 425 | { |
| 426 | AIUnit* unit = grp->UnitWithID(j + 1); |
| 427 | if (!unit) |
| 428 | { |
| 429 | continue; |
| 430 | } |
| 431 | unit->GetPerson()->GetInfo()._initExperience = unit->GetPerson()->GetInfo()._experience; |
| 432 | if (unit->IsFreeSoldier()) |
| 433 | { |
| 434 | unit->GetPerson()->ResetMovement(0); |
| 435 | } |
| 436 | if (unit->IsUnit()) |
| 437 | { |
| 438 | unit->GetVehicle()->AutoReloadAll(); |
| 439 | } |
| 440 | } |
| 441 | grp->GetRadio().SilentProcess(); |
| 442 | } |
| 443 | if (mode == AICMNetwork) |
| 444 | { |
| 445 | GetNetworkManager().CreateCenter(cnt); |
| 446 | } |
| 447 | } |
| 448 | bool World::InitVehicles(GameMode gameMode, ArcadeTemplate& t) |
| 449 | { |
| 450 | DWORD tInitVehicles = GetTickCount(); |
nothing calls this directly
no test coverage detected