forked from mirror/openmw-tes3mp
[Client] Add a multiplayer object index and matching methods to CellRef
This commit is contained in:
parent
d242f3790f
commit
06acd3cbc4
4 changed files with 66 additions and 0 deletions
|
@ -20,6 +20,32 @@ namespace MWWorld
|
||||||
mCellRef.mRefNum.unset();
|
mCellRef.mRefNum.unset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Get the mMpNum (unique multiplayer reference number) of a CellRef
|
||||||
|
*/
|
||||||
|
int CellRef::getMpNum() const
|
||||||
|
{
|
||||||
|
return mCellRef.mMpNum;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Set the mMpNum (unique multiplayer reference number) of a CellRef
|
||||||
|
*/
|
||||||
|
void CellRef::setMpNum(int index)
|
||||||
|
{
|
||||||
|
mCellRef.mMpNum = index;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
std::string CellRef::getRefId() const
|
std::string CellRef::getRefId() const
|
||||||
{
|
{
|
||||||
return mCellRef.mRefID;
|
return mCellRef.mRefID;
|
||||||
|
|
|
@ -28,6 +28,26 @@ namespace MWWorld
|
||||||
// Set RefNum to its default state.
|
// Set RefNum to its default state.
|
||||||
void unsetRefNum();
|
void unsetRefNum();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Get the mMpNum (unique multiplayer reference number) of a CellRef
|
||||||
|
*/
|
||||||
|
int getMpNum() const;
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Set the mMpNum (unique multiplayer reference number) of a CellRef
|
||||||
|
*/
|
||||||
|
void setMpNum(int index);
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
/// Does the RefNum have a content file?
|
/// Does the RefNum have a content file?
|
||||||
bool hasContentFile() const;
|
bool hasContentFile() const;
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,16 @@ void ESM::CellRef::blank()
|
||||||
mPos.pos[i] = 0;
|
mPos.pos[i] = 0;
|
||||||
mPos.rot[i] = 0;
|
mPos.rot[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Set the mMpNum (unique multiplayer reference number) to 0 by default
|
||||||
|
*/
|
||||||
|
mMpNum = 0;
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ESM::operator== (const RefNum& left, const RefNum& right)
|
bool ESM::operator== (const RefNum& left, const RefNum& right)
|
||||||
|
|
|
@ -38,6 +38,16 @@ namespace ESM
|
||||||
// Note: Currently unused for items in containers
|
// Note: Currently unused for items in containers
|
||||||
RefNum mRefNum;
|
RefNum mRefNum;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Keep track of a multiplayer-only number unique to this object
|
||||||
|
*/
|
||||||
|
int mMpNum;
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
std::string mRefID; // ID of object being referenced
|
std::string mRefID; // ID of object being referenced
|
||||||
|
|
||||||
float mScale; // Scale applied to mesh
|
float mScale; // Scale applied to mesh
|
||||||
|
|
Loading…
Reference in a new issue