mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 06:09:42 +00:00
Revert "Implement overwriting pathgrid records"
This broke pathgrid loading in exterior cells due to an unexpected problem in the pathgrid record system (bug #2195).
This reverts commit dd0cea21b0
.
This commit is contained in:
parent
ddad963312
commit
04a68fc976
1 changed files with 2 additions and 30 deletions
|
@ -876,36 +876,8 @@ namespace MWWorld
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void load(ESM::ESMReader &esm, const std::string &id) {
|
void load(ESM::ESMReader &esm, const std::string &id) {
|
||||||
|
mStatic.push_back(ESM::Pathgrid());
|
||||||
ESM::Pathgrid pathgrid;
|
mStatic.back().load(esm);
|
||||||
pathgrid.load(esm);
|
|
||||||
|
|
||||||
// Try to overwrite existing record
|
|
||||||
// Can't use search() because we aren't sorted yet
|
|
||||||
if (!pathgrid.mCell.empty())
|
|
||||||
{
|
|
||||||
for (std::vector<ESM::Pathgrid>::iterator it = mStatic.begin(); it != mStatic.end(); ++it)
|
|
||||||
{
|
|
||||||
if ((*it).mCell == pathgrid.mCell)
|
|
||||||
{
|
|
||||||
(*it) = pathgrid;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (std::vector<ESM::Pathgrid>::iterator it = mStatic.begin(); it != mStatic.end(); ++it)
|
|
||||||
{
|
|
||||||
if ((*it).mData.mX == pathgrid.mData.mX && (*it).mData.mY == pathgrid.mData.mY)
|
|
||||||
{
|
|
||||||
(*it) = pathgrid;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mStatic.push_back(pathgrid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t getSize() const {
|
size_t getSize() const {
|
||||||
|
|
Loading…
Reference in a new issue