From 97d7d2e9922fe18d40e53f4b146fe7b03aa9c220 Mon Sep 17 00:00:00 2001 From: James Urquhart Date: Sat, 4 Nov 2023 22:06:13 +0000 Subject: [PATCH 1/3] Alternate fix for castRay issue --- Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp | 4 ++-- Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.h | 2 +- Engine/source/scene/sceneContainer.cpp | 3 +-- Engine/source/scene/sceneContainer.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp b/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp index 8acd5ef16..c37aff66b 100644 --- a/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp +++ b/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp @@ -1768,10 +1768,10 @@ void GuiConvexEditorCtrl::submitUndo( UndoType type, const Vector mIsDirty = true; } -bool GuiConvexEditorCtrl::_cursorCastCallback( RayInfo* ri ) +bool GuiConvexEditorCtrl::_cursorCastCallback( SceneObject* object ) { // Reject anything that's not a ConvexShape. - return dynamic_cast< ConvexShape* >( ri->object ); + return dynamic_cast< ConvexShape* >( object ); } bool GuiConvexEditorCtrl::_cursorCast( const Gui3DMouseEvent &event, ConvexShape **hitShape, S32 *hitFace ) diff --git a/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.h b/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.h index 1600a4e50..1c64e964a 100644 --- a/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.h +++ b/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.h @@ -169,7 +169,7 @@ protected: void _renderObject( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *matInst ); bool _cursorCast( const Gui3DMouseEvent &event, ConvexShape **hitShape, S32 *hitFace ); - static bool _cursorCastCallback( RayInfo* ri ); + static bool _cursorCastCallback( SceneObject* object ); protected: diff --git a/Engine/source/scene/sceneContainer.cpp b/Engine/source/scene/sceneContainer.cpp index 024d833aa..57bb9760b 100644 --- a/Engine/source/scene/sceneContainer.cpp +++ b/Engine/source/scene/sceneContainer.cpp @@ -318,10 +318,9 @@ struct SceneRayHelper xformedEnd.convolveInverse(ptr->mObjScale); RayInfo ri; - ri.object = ptr; ri.generateTexCoord = info->generateTexCoord; - if (mFunc && !mFunc(&ri)) + if (mFunc && !mFunc(ptr)) return false; bool result = false; diff --git a/Engine/source/scene/sceneContainer.h b/Engine/source/scene/sceneContainer.h index ce6f6a023..9892a3bc5 100644 --- a/Engine/source/scene/sceneContainer.h +++ b/Engine/source/scene/sceneContainer.h @@ -668,7 +668,7 @@ class SceneContainer /// @name Line intersection /// @{ - typedef bool ( *CastRayCallback )( RayInfo* ri ); + typedef bool ( *CastRayCallback )( SceneObject* object ); /// Test against collision geometry -- fast. bool castRay( const Point3F &start, const Point3F &end, U32 mask, RayInfo* info, CastRayCallback callback = NULL ); From 12d0688abd3e5a69e1230afaa6358dcf33632e37 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sun, 5 Nov 2023 15:30:19 -0600 Subject: [PATCH 2/3] fix playAudio crash --- Engine/source/T3D/shapeBase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index e6656fb15..878afe0cc 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -2301,8 +2301,9 @@ void ShapeBase::updateAudioState(SoundThread& st) if ( isGhost() ) { // if asset is valid, play - if (st.asset->isAssetValid() ) + if (st.asset.notNull()) { + st.asset->loadSound(); st.sound = SFX->createSource( st.asset->getSFXTrack() , &getTransform() ); if ( st.sound ) st.sound->play(); From b0aadfb6e60946004883c48a64648d0bff80bf7e Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Fri, 10 Nov 2023 02:31:58 -0600 Subject: [PATCH 3/3] fix getPrototypeSig for cases of no input values whatsoever for a given method --- Engine/source/console/consoleInternal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine/source/console/consoleInternal.cpp b/Engine/source/console/consoleInternal.cpp index 65bcf3ae9..9652e460a 100644 --- a/Engine/source/console/consoleInternal.cpp +++ b/Engine/source/console/consoleInternal.cpp @@ -1567,6 +1567,7 @@ String Namespace::Entry::getPrototypeSig() const str.append(cb.mCallbackName); else str.append(mFunctionName); + str.append("("); if (mHeader) { Vector< String > argList; @@ -1574,7 +1575,7 @@ String Namespace::Entry::getPrototypeSig() const const U32 numArgs = argList.size(); - str.append("(%this"); + str.append("%this"); if (numArgs > 0) str.append(','); @@ -1591,9 +1592,8 @@ String Namespace::Entry::getPrototypeSig() const sGetArgNameAndType(argList[i], type, name); str.append(name); } - str.append(')'); } - + str.append(')'); return str.end(); } //-----------------------------------------------------------------------------