mirror of
https://github.com/XLabsProject/iw3x-port.git
synced 2023-08-02 15:02:11 +02:00
Dump additional models + bump iw4of
This commit is contained in:
parent
125dd655dc
commit
6a9b515991
2
deps/iw4-open-formats
vendored
2
deps/iw4-open-formats
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 62936d258669d6e5226325dc17a6b825d2f1c539
|
Subproject commit cf45b460fe32a8c858b30445df779e29821cfdee
|
@ -153,8 +153,6 @@ namespace Components
|
|||||||
|
|
||||||
void MapDumper::DumpLoadedGSCs(std::string mapToDump)
|
void MapDumper::DumpLoadedGSCs(std::string mapToDump)
|
||||||
{
|
{
|
||||||
static auto additionalModelsFile = GSC::GetAdditionalModelsListPath();
|
|
||||||
|
|
||||||
Logger::Print("Exporting environment GSCs...\n");
|
Logger::Print("Exporting environment GSCs...\n");
|
||||||
Command::Execute(Utils::VA("dumpRawFile maps/mp/%s.gsc", mapToDump.data()), true);
|
Command::Execute(Utils::VA("dumpRawFile maps/mp/%s.gsc", mapToDump.data()), true);
|
||||||
Command::Execute(Utils::VA("dumpRawFile maps/mp/%s_fx.gsc", mapToDump.data()), true);
|
Command::Execute(Utils::VA("dumpRawFile maps/mp/%s_fx.gsc", mapToDump.data()), true);
|
||||||
|
@ -27,7 +27,7 @@ namespace Utils
|
|||||||
|
|
||||||
std::vector<std::string> Entities::GetModels(bool includeDestructibles)
|
std::vector<std::string> Entities::GetModels(bool includeDestructibles)
|
||||||
{
|
{
|
||||||
std::vector<std::string>* models = new std::vector<std::string>();
|
std::vector<std::string> models = std::vector<std::string>();
|
||||||
std::ofstream destructiblesModelList;
|
std::ofstream destructiblesModelList;
|
||||||
|
|
||||||
if (includeDestructibles) {
|
if (includeDestructibles) {
|
||||||
@ -46,9 +46,9 @@ namespace Utils
|
|||||||
&& model != "com_plasticcase_green_big_us_dirt"s // Skip care package (part of team zones)
|
&& model != "com_plasticcase_green_big_us_dirt"s // Skip care package (part of team zones)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (std::find(models->begin(), models->end(), model) == models->end())
|
if (std::find(models.begin(), models.end(), model) == models.end())
|
||||||
{
|
{
|
||||||
models->push_back(model);
|
models.push_back(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,14 +58,16 @@ namespace Utils
|
|||||||
|
|
||||||
// Then we need to fetch the destructible models
|
// Then we need to fetch the destructible models
|
||||||
// This is TERRIBLE but it works. Ideally we should be able to grab the destructible models from the modelpieces DynEnts list (see iGFXWorld.cpp) but it doesn't work :(
|
// This is TERRIBLE but it works. Ideally we should be able to grab the destructible models from the modelpieces DynEnts list (see iGFXWorld.cpp) but it doesn't work :(
|
||||||
Game::DB_EnumXAssetEntries(Game::IW3::XAssetType::ASSET_TYPE_XMODEL, [destructible, models, &destructiblesModelList](Game::IW3::XAssetEntryPoolEntry* poolEntry)
|
Game::DB_EnumXAssetEntries(Game::IW3::XAssetType::ASSET_TYPE_XMODEL, [destructible, &models, &destructiblesModelList](Game::IW3::XAssetEntryPoolEntry* poolEntry)
|
||||||
{
|
{
|
||||||
auto entry = &poolEntry->entry;
|
auto entry = &poolEntry->entry;
|
||||||
if (entry->inuse == 1 && entry->asset.header.model) {
|
if (entry->inuse == 1 && entry->asset.header.model) {
|
||||||
if (std::string(entry->asset.header.model->name).find(destructible) != std::string::npos) {
|
if (std::string(entry->asset.header.model->name).find(destructible) != std::string::npos) {
|
||||||
std::string model = entry->asset.header.model->name;
|
std::string model = entry->asset.header.model->name;
|
||||||
models->push_back(model);
|
models.push_back(model);
|
||||||
|
|
||||||
Components::Logger::Print("Saving XModel piece %s for destructible %s (from enumXAsset)\n", entry->asset.header.model->name, destructible.data());
|
Components::Logger::Print("Saving XModel piece %s for destructible %s (from enumXAsset)\n", entry->asset.header.model->name, destructible.data());
|
||||||
|
Components::AssetHandler::Dump(Game::IW3::XAssetType::ASSET_TYPE_XMODEL, entry->asset.header);
|
||||||
|
|
||||||
(destructiblesModelList) << model << "\n";
|
(destructiblesModelList) << model << "\n";
|
||||||
}
|
}
|
||||||
@ -81,7 +83,7 @@ namespace Utils
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return *models;
|
return models;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Entities::ConvertVehicles() {
|
bool Entities::ConvertVehicles() {
|
||||||
|
Loading…
Reference in New Issue
Block a user