| 268 | EntityAITypePlain::~EntityAITypePlain() = default; |
| 269 | |
| 270 | int VehicleTypeBank::Load(const char* name) |
| 271 | { |
| 272 | EntityType* type = nullptr; |
| 273 | |
| 274 | if ((Pars >> "CfgVehicles").FindEntry(name)) |
| 275 | { |
| 276 | const ParamEntry& cfg = Pars >> "CfgVehicles" >> name; |
| 277 | if ((cfg >> "scope").GetInt() > 0) |
| 278 | { |
| 279 | // LOG_DEBUG(Physics, "Preload {}",(const char *)name); |
| 280 | RString simulation = cfg >> "simulation"; |
| 281 | const ParamEntry* par = &cfg; |
| 282 | simulation.Lower(); |
| 283 | if (!strcmp(simulation, "tank")) |
| 284 | { |
| 285 | type = new TankType(par); |
| 286 | } |
| 287 | else if (!strcmp(simulation, "zsu")) |
| 288 | { |
| 289 | type = new TankType(par); |
| 290 | } |
| 291 | else if (!strcmp(simulation, "car")) |
| 292 | { |
| 293 | type = new CarType(par); |
| 294 | } |
| 295 | else if (!strcmp(simulation, "motorcycle")) |
| 296 | { |
| 297 | type = new MotorcycleType(par); |
| 298 | } |
| 299 | else if (!strcmp(simulation, "ship")) |
| 300 | { |
| 301 | type = new ShipType(par); |
| 302 | } |
| 303 | else if (!strcmp(simulation, "soldierold")) |
| 304 | { |
| 305 | type = new ManType(par); |
| 306 | } |
| 307 | else if (!strcmp(simulation, "soldier")) |
| 308 | { |
| 309 | type = new ManType(par); |
| 310 | } |
| 311 | else if (!strcmp(simulation, "helicopter")) |
| 312 | { |
| 313 | type = new HelicopterType(par); |
| 314 | } |
| 315 | else if (!strcmp(simulation, "parachute")) |
| 316 | { |
| 317 | type = new ParachuteType(par); |
| 318 | } |
| 319 | else if (!strcmp(simulation, "airplane")) |
| 320 | { |
| 321 | type = new AirplaneType(par); |
| 322 | } |
| 323 | else if (!strcmp(simulation, "lasertarget")) |
| 324 | { |
| 325 | type = new LaserTargetType(par); |
| 326 | } |
| 327 | if (!strcmp(simulation, "house")) |
nothing calls this directly
no test coverage detected