| 162 | void GlobalAlive(); |
| 163 | |
| 164 | void VehicleTypeBank::Preload() |
| 165 | { |
| 166 | static const char* names[] = {"CfgVehicles", "CfgAmmo", "CfgNonAIVehicles"}; |
| 167 | for (int n = 0; n < sizeof(names) / sizeof(*names); n++) |
| 168 | { |
| 169 | const char* name = names[n]; |
| 170 | const ParamEntry& vehicles = Pars >> name; |
| 171 | for (int i = 0; i < vehicles.GetEntryCount(); i++) |
| 172 | { |
| 173 | I_AM_ALIVE(); // this loop can take quite long |
| 174 | const ParamEntry& entry = vehicles.GetEntry(i); |
| 175 | const ParamClass* eClass = dynamic_cast<const ParamClass*>(&entry); |
| 176 | if (!eClass) |
| 177 | { |
| 178 | continue; |
| 179 | } |
| 180 | if (entry.FindEntry("vehicleClass")) |
| 181 | { |
| 182 | RString vehClass = entry >> "vehicleClass"; |
| 183 | if (stricmp(vehClass, "Sounds") == 0) |
| 184 | { |
| 185 | continue; |
| 186 | } |
| 187 | if (stricmp(vehClass, "Mines") == 0) |
| 188 | { |
| 189 | continue; |
| 190 | } |
| 191 | } |
| 192 | New(entry.GetName()); |
| 193 | } |
| 194 | } |
| 195 | if (GSoundsys) |
| 196 | { |
| 197 | GSoundsys->FlushBank(nullptr); |
| 198 | } |
| 199 | GFileServer->FlushBank(nullptr); |
| 200 | } |
| 201 | |
| 202 | int VehicleTypeBank::AuditEditorVisibleModels() const |
| 203 | { |
no test coverage detected