| 5873 | } |
| 5874 | |
| 5875 | unsigned structureBodyBuilt(const STRUCTURE *psStructure) |
| 5876 | { |
| 5877 | unsigned maxBody = psStructure->structureBody(); |
| 5878 | |
| 5879 | if (psStructure->status == SS_BEING_BUILT) |
| 5880 | { |
| 5881 | // Calculate the body points the structure would have, if not damaged. |
| 5882 | unsigned unbuiltBody = (maxBody + 9) / 10; // See droidStartBuild() in droid.cpp. |
| 5883 | unsigned deltaBody = static_cast<unsigned>(maxBody * 9 * structureCompletionProgress(*psStructure) / 10); // See structureBuild() in structure.cpp. |
| 5884 | maxBody = unbuiltBody + deltaBody; |
| 5885 | } |
| 5886 | |
| 5887 | return maxBody; |
| 5888 | } |
| 5889 | |
| 5890 | /*Access functions for the upgradeable stats of a structure*/ |
| 5891 | uint32_t STRUCTURE::structureBody() const |
no test coverage detected