| 666 | } |
| 667 | |
| 668 | void ScriptExt::SetCloseEnoughDistance(TeamClass* pTeam, double distance) |
| 669 | { |
| 670 | // This passive method replaces the CloseEnough value from rulesmd.ini by a custom one. Used by Mission_Move() |
| 671 | if (distance <= 0) |
| 672 | distance = pTeam->CurrentScript->Type->ScriptActions[pTeam->CurrentScript->CurrentMission].Argument; |
| 673 | |
| 674 | auto const pTeamData = TeamExt::ExtMap.Find(pTeam); |
| 675 | |
| 676 | if (distance > 0) |
| 677 | pTeamData->CloseEnough = distance; |
| 678 | |
| 679 | if (distance <= 0) |
| 680 | pTeamData->CloseEnough = RulesClass::Instance->CloseEnough / (double)Unsorted::LeptonsPerCell; |
| 681 | |
| 682 | // This action finished |
| 683 | pTeam->StepCompleted = true; |
| 684 | |
| 685 | return; |
| 686 | } |
| 687 | |
| 688 | void ScriptExt::UnregisterGreatSuccess(TeamClass* pTeam) |
| 689 | { |