Skip to content

Commit

Permalink
Fix an issue were vmap extractor generates duplicate files on some sy…
Browse files Browse the repository at this point in the history
…stems (#2833)
  • Loading branch information
Gamemechanicwow authored Dec 7, 2024
1 parent 1d267c7 commit 4987b3e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions contrib/vmap_extractor/vmapextract/adtfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY, StringSet& failed
while (p < buf + size)
{
fixnamen(p, strlen(p));
char* s = GetPlainName(p);
fixname2(s, strlen(s));
string path(p); // Store copy after name fixed

std::string fixedName;
Expand Down
1 change: 1 addition & 0 deletions contrib/vmap_extractor/vmapextract/gameobject_extract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ bool ExtractSingleModel(std::string& origPath, std::string& fixedName, StringSet
return ch == ' ' ? '_' : ch;
});

fixnamen((char*)s.c_str(), s.size());
fixedName = s;

std::string output(szWorkDirWmo); // Stores output filename (possible changed)
Expand Down
2 changes: 1 addition & 1 deletion contrib/vmap_extractor/vmapextract/wmo.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct WMODoodadData
std::vector<WMO::MODS> Sets;
std::unique_ptr<char[]> Paths;
std::vector<WMO::MODD> Spawns;
std::unordered_set<uint16> References;
std::set<uint16> References;
};

class WMORoot
Expand Down

0 comments on commit 4987b3e

Please sign in to comment.