summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index e108f9c268..fd85d75d98 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1521,7 +1521,12 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
S32 size = mesgsys->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_ExtraParams);
if (size > 0)
{
- U8 *buffer = new U8[size];
+ U8 *buffer = new(std::nothrow) U8[size];
+ if (!buffer)
+ {
+ LLError::LLUserWarningMsg::showOutOfMemory();
+ LL_ERRS() << "Bad memory allocation for buffer, size: " << size << LL_ENDL;
+ }
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ExtraParams, buffer, size, block_num);
LLDataPackerBinaryBuffer dp(buffer, size);
@@ -1940,14 +1945,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if(mesgsys != NULL)
{
- LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ gObjectList.getUUIDFromLocal(parent_uuid,
parent_id,
mesgsys->getSenderIP(),
mesgsys->getSenderPort());
}
else
{
- LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ gObjectList.getUUIDFromLocal(parent_uuid,
parent_id,
mRegionp->getHost().getAddress(),
mRegionp->getHost().getPort());
@@ -2062,7 +2067,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// Debugging for suspected problems with local ids.
//LLUUID parent_uuid;
- //LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() );
+ //gObjectList.getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() );
//if (parent_uuid != cur_parentp->getID() )
//{
// LL_ERRS() << "Local ID match but UUID mismatch of viewer object" << LL_ENDL;
@@ -2085,14 +2090,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if(mesgsys != NULL)
{
- LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ gObjectList.getUUIDFromLocal(parent_uuid,
parent_id,
gMessageSystem->getSenderIP(),
gMessageSystem->getSenderPort());
}
else
{
- LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ gObjectList.getUUIDFromLocal(parent_uuid,
parent_id,
mRegionp->getHost().getAddress(),
mRegionp->getHost().getPort());
@@ -2451,7 +2456,7 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &frame_time)
{
// calculate dt from last update
F32 time_dilation = mRegionp ? mRegionp->getTimeDilation() : 1.0f;
- F32 dt_raw = ((F64Seconds)frame_time - mLastInterpUpdateSecs).value();
+ F32 dt_raw = (F32)((F64Seconds)frame_time - mLastInterpUpdateSecs).value();
F32 dt = time_dilation * dt_raw;
applyAngularVelocity(dt);
@@ -2950,7 +2955,7 @@ void LLViewerObject::fetchInventoryDelayed(const F64 &time_seconds)
//static
void LLViewerObject::fetchInventoryDelayedCoro(const LLUUID task_inv, const F64 time_seconds)
{
- llcoro::suspendUntilTimeout(time_seconds);
+ llcoro::suspendUntilTimeout((float)time_seconds);
LLViewerObject *obj = gObjectList.findObject(task_inv);
if (obj)
{
@@ -3676,6 +3681,8 @@ bool LLViewerObject::updateLOD()
bool LLViewerObject::updateGeometry(LLDrawable *drawable)
{
+ // return true means "update complete", return false means "try again next frame"
+ // default should be return true
return true;
}
@@ -4416,6 +4423,7 @@ void LLViewerObject::moveGLTFNode(S32 node_index, const LLVector3& offset)
matMul(trans, mat, mat);
node.mMatrix = glm::make_mat4(mat.getF32ptr());
+ node.mTRSValid = false;
// TODO -- only update transforms for this node and its children (or use a dirty flag)
mGLTFAsset->updateTransforms();