summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-11-02 20:55:56 +0800
committerErik Kundiman <erik@megapahit.org>2024-11-03 19:33:18 +0800
commit3f72f9a202bed628f838cc24fe58a0511ca0d161 (patch)
tree0684cfff91551d9b6aabdb825981b46a5cb53fe8 /indra/llprimitive
parentd302bf3c96666cfd46d7585cb3d8b6ec27bb83bf (diff)
parent9c0a6d1b0e5e9d6da6a63ff367f40ab08c064bbe (diff)
Merge remote-tracking branch 'secondlife/release/maint-c' into maint-c
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/lldaeloader.cpp4
-rw-r--r--indra/llprimitive/llgltfloader.cpp2
-rw-r--r--indra/llprimitive/llmodel.cpp7
-rw-r--r--indra/llprimitive/llmodel.h2
-rw-r--r--indra/llprimitive/llmodelloader.h4
-rw-r--r--indra/llprimitive/object_flags.h12
6 files changed, 19 insertions, 12 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 7fa4230237..b634600de0 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -1073,7 +1073,9 @@ bool LLDAELoader::OpenFile(const std::string& filename)
LLModel* mdl = *i;
if(mdl->getStatus() != LLModel::NO_ERRORS)
{
- setLoadState(ERROR_MODEL + mdl->getStatus()) ;
+ // setLoadState() values >= ERROR_MODEL are reserved to
+ // report errors with the model itself.
+ setLoadState(ERROR_MODEL + eLoadState(mdl->getStatus())) ;
return false; //abort
}
diff --git a/indra/llprimitive/llgltfloader.cpp b/indra/llprimitive/llgltfloader.cpp
index 480012699a..48249aa5c4 100644
--- a/indra/llprimitive/llgltfloader.cpp
+++ b/indra/llprimitive/llgltfloader.cpp
@@ -155,7 +155,7 @@ bool LLGLTFLoader::parseMeshes()
}
else
{
- setLoadState(ERROR_MODEL + pModel->getStatus());
+ setLoadState(ERROR_MODEL + eLoadState(pModel->getStatus()));
delete(pModel);
return false;
}
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 4e3e49ec9f..2fb1956301 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -66,7 +66,12 @@ LLModel::~LLModel()
{
if (mDecompID >= 0)
{
- LLConvexDecomposition::getInstance()->deleteDecomposition(mDecompID);
+ // can be null on shutdown
+ LLConvexDecomposition* decomp = LLConvexDecomposition::getInstance();
+ if (decomp)
+ {
+ decomp->deleteDecomposition(mDecompID);
+ }
}
mPhysics.mMesh.clear();
}
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 309c5df64c..af5bbf2da8 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -207,7 +207,7 @@ public:
void trimVolumeFacesToSize(U32 new_count = LL_SCULPT_MESH_MAX_FACES, LLVolume::face_list_t* remainder = NULL);
void remapVolumeFaces();
void optimizeVolumeFaces();
- void offsetMesh( const LLVector3& pivotPoint );
+ void offsetMesh(const LLVector3& pivotPoint);
void getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out) const;
LLVector3 getTransformedCenter(const LLMatrix4& mat);
diff --git a/indra/llprimitive/llmodelloader.h b/indra/llprimitive/llmodelloader.h
index 530e61e2b8..637dabe08a 100644
--- a/indra/llprimitive/llmodelloader.h
+++ b/indra/llprimitive/llmodelloader.h
@@ -156,12 +156,12 @@ public:
bool loadFromSLM(const std::string& filename);
void loadModelCallback();
- void loadTextures() ; // called in the main thread.
+ void loadTextures(); // called in the main thread.
void setLoadState(U32 state);
void stretch_extents(const LLModel* model, const LLMatrix4& mat);
- S32 mNumOfFetchingTextures ; // updated in the main thread
+ S32 mNumOfFetchingTextures; // updated in the main thread
bool areTexturesReady() { return !mNumOfFetchingTextures; } // called in the main thread.
bool verifyCount( int expected, int result );
diff --git a/indra/llprimitive/object_flags.h b/indra/llprimitive/object_flags.h
index e2cdba072a..06e216ba49 100644
--- a/indra/llprimitive/object_flags.h
+++ b/indra/llprimitive/object_flags.h
@@ -57,16 +57,16 @@ const U32 FLAGS_CAMERA_SOURCE = (1U << 22);
//const U32 FLAGS_UNUSED_001 = (1U << 23); // was FLAGS_CAST_SHADOWS
-//const U32 FLAGS_UNUSED_002 = (1U << 24);
-//const U32 FLAGS_UNUSED_003 = (1U << 25);
-//const U32 FLAGS_UNUSED_004 = (1U << 26);
-//const U32 FLAGS_UNUSED_005 = (1U << 27);
+const U32 FLAGS_SERVER_AUTOPILOT = (1U << 24); // Update was for an agent AND that agent is being autopiloted from the server
+//const U32 FLAGS_UNUSED_002 = (1U << 25);
+//const U32 FLAGS_UNUSED_003 = (1U << 26);
+//const U32 FLAGS_UNUSED_004 = (1U << 27);
const U32 FLAGS_OBJECT_OWNER_MODIFY = (1U << 28);
const U32 FLAGS_TEMPORARY_ON_REZ = (1U << 29);
-//const U32 FLAGS_UNUSED_006 = (1U << 30); // was FLAGS_TEMPORARY
-//const U32 FLAGS_UNUSED_007 = (1U << 31); // was FLAGS_ZLIB_COMPRESSED
+//const U32 FLAGS_UNUSED_005 = (1U << 30); // was FLAGS_TEMPORARY
+//const U32 FLAGS_UNUSED_006 = (1U << 31); // was FLAGS_ZLIB_COMPRESSED
const U32 FLAGS_LOCAL = FLAGS_ANIM_SOURCE | FLAGS_CAMERA_SOURCE;
const U32 FLAGS_WORLD = FLAGS_USE_PHYSICS | FLAGS_PHANTOM | FLAGS_TEMPORARY_ON_REZ;