From 848d0cb27d4d37078c2f2d52bcb142a215d5cd26 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 1 Aug 2024 12:40:10 +0300 Subject: viewer#2163 Crash at getReflectionProbeIsDynamic --- indra/newview/llreflectionmap.cpp | 4 ++-- indra/newview/llviewerobject.h | 4 ++++ indra/newview/llvovolume.h | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index 31fd6f3f07..8d164b6883 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -220,7 +220,7 @@ F32 LLReflectionMap::getNearClip() if (mViewerObject && mViewerObject->getVolume()) { - ret = ((LLVOVolume*)mViewerObject)->getReflectionProbeNearClip(); + ret = mViewerObject->getReflectionProbeNearClip(); } else if (mGroup) { @@ -240,7 +240,7 @@ bool LLReflectionMap::getIsDynamic() mViewerObject && mViewerObject->getVolume()) { - return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic(); + return mViewerObject->getReflectionProbeIsDynamic(); } return false; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 09584d22a8..b6846c6716 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -266,7 +266,11 @@ public: virtual bool isRiggedMesh() const { return false; } virtual bool hasLightTexture() const { return false; } virtual bool isReflectionProbe() const { return false; } + virtual F32 getReflectionProbeAmbiance() const { return 0.f; } + virtual F32 getReflectionProbeNearClip() const { return 0.f; } virtual bool getReflectionProbeIsBox() const { return false; } + virtual bool getReflectionProbeIsDynamic() const { return false; }; + virtual bool getReflectionProbeIsMirror() const { return false; }; // This method returns true if the object is over land owned by // the agent, one of its groups, or it encroaches and diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 07e02e042c..6241bf42d6 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -304,11 +304,11 @@ public: bool setReflectionProbeIsMirror(bool is_mirror); bool isReflectionProbe() const override; - F32 getReflectionProbeAmbiance() const; - F32 getReflectionProbeNearClip() const; + F32 getReflectionProbeAmbiance() const override; + F32 getReflectionProbeNearClip() const override; bool getReflectionProbeIsBox() const override; - bool getReflectionProbeIsDynamic() const; - bool getReflectionProbeIsMirror() const; + bool getReflectionProbeIsDynamic() const override; + bool getReflectionProbeIsMirror() const override; // Flexible Objects U32 getVolumeInterfaceID() const; -- cgit v1.2.3