mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:23:54 +00:00
Warn about cellrefs with an empty refId (Bug #3238)
This commit is contained in:
parent
d0aba0d9ee
commit
3e6cf17665
2 changed files with 11 additions and 3 deletions
|
@ -194,7 +194,7 @@ namespace MWWorld
|
|||
else
|
||||
{
|
||||
std::cerr
|
||||
<< "Error: could not resolve cell reference " << ref.mRefID
|
||||
<< "Error: could not resolve cell reference '" << ref.mRefID << "'"
|
||||
<< " (dropping reference)" << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ namespace MWWorld
|
|||
case ESM::REC_WEAP: mWeapons.load(ref, deleted, store); break;
|
||||
case ESM::REC_BODY: mBodyParts.load(ref, deleted, store); break;
|
||||
|
||||
case 0: std::cerr << "Cell reference " + ref.mRefID + " not found!\n"; break;
|
||||
case 0: std::cerr << "Cell reference '" + ref.mRefID + "' not found!\n"; break;
|
||||
|
||||
default:
|
||||
std::cerr
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "cellref.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
|
||||
|
@ -43,7 +45,13 @@ void ESM::CellRef::loadId (ESMReader& esm, bool wideRefNum)
|
|||
|
||||
mRefNum.load (esm, wideRefNum);
|
||||
|
||||
mRefID = esm.getHNString ("NAME");
|
||||
mRefID = esm.getHNOString ("NAME");
|
||||
if (mRefID.empty())
|
||||
{
|
||||
std::ios::fmtflags f(std::cerr.flags());
|
||||
std::cerr << "Warning: got CellRef with empty RefId in " << esm.getName() << " 0x" << std::hex << esm.getFileOffset() << std::endl;
|
||||
std::cerr.flags(f);
|
||||
}
|
||||
}
|
||||
|
||||
void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted)
|
||||
|
|
Loading…
Reference in a new issue