mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-22 03:53:52 +00:00
Use load message system for moved ref target cell error logging.
This commit is contained in:
parent
47b5fa9dae
commit
de5ce7059e
1 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,5 @@
|
||||||
#include "refcollection.hpp"
|
#include "refcollection.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include <components/misc/stringops.hpp>
|
#include <components/misc/stringops.hpp>
|
||||||
#include <components/esm/loadcell.hpp>
|
#include <components/esm/loadcell.hpp>
|
||||||
|
|
||||||
|
@ -82,10 +80,13 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
||||||
// message
|
// message
|
||||||
if (index.first != mref.mTarget[0] || index.second != mref.mTarget[1])
|
if (index.first != mref.mTarget[0] || index.second != mref.mTarget[1])
|
||||||
{
|
{
|
||||||
std::cerr << "The Position of moved ref "
|
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Cell, mCells.getId (cellIndex));
|
||||||
<< ref.mRefID << " does not match the target cell" << std::endl;
|
messages.add (id, "The Position of moved ref " + ref.mRefID + " (#"
|
||||||
std::cerr << "Position: #" << index.first << " " << index.second
|
+ std::to_string(index.first) + " " + std::to_string(index.second)
|
||||||
<<", Target #"<< mref.mTarget[0] << " " << mref.mTarget[1] << std::endl;
|
+ ") does not match the target cell (#"
|
||||||
|
+ std::to_string(mref.mTarget[0]) + " " + std::to_string(mref.mTarget[1]) + ")",
|
||||||
|
/*hint*/"",
|
||||||
|
CSMDoc::Message::Severity_Warning);
|
||||||
|
|
||||||
// overwrite
|
// overwrite
|
||||||
ref.mCell = "#" + std::to_string(mref.mTarget[0]) + " " + std::to_string(mref.mTarget[1]);
|
ref.mCell = "#" + std::to_string(mref.mTarget[0]) + " " + std::to_string(mref.mTarget[1]);
|
||||||
|
|
Loading…
Reference in a new issue