mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[General] Temporarily include target names in mwmp::Target
These will be removed once the server can get the names matching refIds by reading content files.
This commit is contained in:
parent
691b332d03
commit
f02492a593
2 changed files with 5 additions and 0 deletions
|
@ -116,6 +116,7 @@ mwmp::Target MechanicsHelper::getTarget(const MWWorld::Ptr& ptr)
|
||||||
target.refId = ptrRef->getRefId();
|
target.refId = ptrRef->getRefId();
|
||||||
target.refNumIndex = ptrRef->getRefNum().mIndex;
|
target.refNumIndex = ptrRef->getRefNum().mIndex;
|
||||||
target.mpNum = ptrRef->getMpNum();
|
target.mpNum = ptrRef->getMpNum();
|
||||||
|
target.name = ptr.getClass().getName(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return target;
|
return target;
|
||||||
|
@ -127,6 +128,8 @@ void MechanicsHelper::clearTarget(mwmp::Target& target)
|
||||||
target.refId.clear();
|
target.refId.clear();
|
||||||
target.refNumIndex = -1;
|
target.refNumIndex = -1;
|
||||||
target.mpNum = -1;
|
target.mpNum = -1;
|
||||||
|
|
||||||
|
target.name.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MechanicsHelper::isEmptyTarget(const mwmp::Target& target)
|
bool MechanicsHelper::isEmptyTarget(const mwmp::Target& target)
|
||||||
|
|
|
@ -30,6 +30,8 @@ namespace mwmp
|
||||||
int refNumIndex;
|
int refNumIndex;
|
||||||
int mpNum;
|
int mpNum;
|
||||||
|
|
||||||
|
std::string name; // Remove this once the server can get names corresponding to different refIds
|
||||||
|
|
||||||
RakNet::RakNetGUID guid;
|
RakNet::RakNetGUID guid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue