Restore object rotation code to fix Issue 454
Just a partial revert of aca3e8f6c4
_PREHASH_ObjectRotation and sendRotationUpdate
This commit is contained in:
@@ -1048,6 +1048,7 @@ char const* const _PREHASH_SimIP = LLMessageStringTable::getInstance()->getStrin
|
||||
char const* const _PREHASH_GodID = LLMessageStringTable::getInstance()->getString("GodID");
|
||||
char const* const _PREHASH_TeleportMinPrice = LLMessageStringTable::getInstance()->getString("TeleportMinPrice");
|
||||
char const* const _PREHASH_VoteItem = LLMessageStringTable::getInstance()->getString("VoteItem");
|
||||
char const* const _PREHASH_ObjectRotation = LLMessageStringTable::getInstance()->getString("ObjectRotation");
|
||||
char const* const _PREHASH_SitRotation = LLMessageStringTable::getInstance()->getString("SitRotation");
|
||||
char const* const _PREHASH_SnapSelection = LLMessageStringTable::getInstance()->getString("SnapSelection");
|
||||
char const* const _PREHASH_SoundTrigger = LLMessageStringTable::getInstance()->getString("SoundTrigger");
|
||||
|
||||
@@ -1048,6 +1048,7 @@ extern char const* const _PREHASH_SimIP;
|
||||
extern char const* const _PREHASH_GodID;
|
||||
extern char const* const _PREHASH_TeleportMinPrice;
|
||||
extern char const* const _PREHASH_VoteItem;
|
||||
extern char const* const _PREHASH_ObjectRotation;
|
||||
extern char const* const _PREHASH_SitRotation;
|
||||
extern char const* const _PREHASH_SnapSelection;
|
||||
extern char const* const _PREHASH_SoundTrigger;
|
||||
|
||||
@@ -4168,6 +4168,22 @@ void LLViewerObject::sendMaterialUpdate() const
|
||||
|
||||
}
|
||||
|
||||
// formerly send_object_rotation
|
||||
void LLViewerObject::sendRotationUpdate() const
|
||||
{
|
||||
LLViewerRegion* regionp = getRegion();
|
||||
if(!regionp) return;
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectRotation);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
|
||||
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, mLocalID);
|
||||
gMessageSystem->addQuatFast(_PREHASH_Rotation, getRotationEdit());
|
||||
//llinfos << "Sent rotation " << getRotationEdit() << llendl;
|
||||
gMessageSystem->sendReliable( regionp->getHost() );
|
||||
}
|
||||
|
||||
//formerly send_object_shape(LLViewerObject *object)
|
||||
void LLViewerObject::sendShapeUpdate()
|
||||
{
|
||||
|
||||
@@ -316,6 +316,7 @@ public:
|
||||
|
||||
inline void setRotation(const F32 x, const F32 y, const F32 z, BOOL damped = FALSE);
|
||||
inline void setRotation(const LLQuaternion& quat, BOOL damped = FALSE);
|
||||
void sendRotationUpdate() const;
|
||||
|
||||
/*virtual*/ void setNumTEs(const U8 num_tes);
|
||||
/*virtual*/ void setTE(const U8 te, const LLTextureEntry &texture_entry);
|
||||
|
||||
@@ -1068,6 +1068,7 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
|
||||
//if (mPrimImportIter != mThisGroup.endMap())
|
||||
// mPrimImportIter++;
|
||||
|
||||
object->sendRotationUpdate();
|
||||
object->sendTEUpdate();
|
||||
object->sendShapeUpdate();
|
||||
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_SCALE | UPD_POSITION);
|
||||
|
||||
Reference in New Issue
Block a user