Create file bank for multiplayer mission
| 325 | |
| 326 | // Create file bank for multiplayer mission |
| 327 | RString CreateMPMissionBank(RString filename, RString island) |
| 328 | { |
| 329 | // remove bank |
| 330 | const std::string prefix = GameDirs::MPCurrentPrefix(); |
| 331 | RemoveBank(prefix.c_str()); |
| 332 | |
| 333 | // prefer mod directory PBO over base game |
| 334 | FindMissionPboContext ctx; |
| 335 | ctx.relPath = filename; |
| 336 | RString openPath = filename; |
| 337 | if (EnumModDirectories(FindMissionPboCallback, &ctx)) |
| 338 | { |
| 339 | openPath = ctx.result; |
| 340 | } |
| 341 | |
| 342 | // create bank |
| 343 | int index = GFileBanks.Add(); |
| 344 | QFBank& bank = GFileBanks[index]; |
| 345 | bank.open(openPath); |
| 346 | RString str = RString(prefix.c_str()) + island + RString("/"); |
| 347 | str.Lower(); |
| 348 | bank.SetPrefix(str); |
| 349 | return str; |
| 350 | } |
| 351 | |
| 352 | NetworkMessageType NetworkSimpleObject::GetNMType(NetworkMessageClass cls) const |
| 353 | { |
no test coverage detected