Merge branch 'development' into MiscFixes20220829

This commit is contained in:
Areloch 2022-08-30 01:31:42 -05:00 committed by GitHub
commit fb5ad738e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 824 additions and 601 deletions

View file

@ -48,6 +48,8 @@
#include "platform/profiler.h"
#include "sfx/sfxTypes.h"
#include "SoundAssetInspectors.h"
//-----------------------------------------------------------------------------
IMPLEMENT_CONOBJECT(SoundAsset);
@ -225,6 +227,8 @@ bool SoundAsset::loadSound()
}
else
{// = new SFXProfile(mProfileDesc, mSoundFile, mPreload);
if (mProfileDesc.mSourceGroup == NULL)
mProfileDesc.mSourceGroup = dynamic_cast<SFXSource*>(Sim::findObject("AudioChannelMaster"));
mSFXProfile.setDescription(&mProfileDesc);
mSFXProfile.setSoundFileName(mSoundPath);
mSFXProfile.setPreload(mPreload);

View file

@ -39,7 +39,6 @@
#include "assets/assetFieldTypes.h"
#endif
#include "gui/editor/guiInspectorTypes.h"
#ifndef _ASSET_PTR_H_
#include "assets/assetPtr.h"
#endif
@ -145,33 +144,7 @@ protected:
DefineConsoleType(TypeSoundAssetPtr, SoundAsset)
DefineConsoleType(TypeSoundAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
class GuiInspectorTypeSoundAssetPtr : public GuiInspectorTypeFileName
{
typedef GuiInspectorTypeFileName Parent;
public:
GuiBitmapButtonCtrl* mEditButton;
DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetPtr);
static void consoleInit();
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
class GuiInspectorTypeSoundAssetId : public GuiInspectorTypeSoundAssetPtr
{
typedef GuiInspectorTypeSoundAssetPtr Parent;
public:
DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetId);
static void consoleInit();
};
#endif
#pragma region Singular Asset Macros
//Singular assets

View file

@ -0,0 +1,32 @@
#pragma once
#include "SoundAsset.h"
#ifndef _GUI_INSPECTOR_TYPES_H_
#include "gui/editor/guiInspectorTypes.h"
#endif
#ifdef TORQUE_TOOLS
class GuiInspectorTypeSoundAssetPtr : public GuiInspectorTypeFileName
{
typedef GuiInspectorTypeFileName Parent;
public:
GuiBitmapButtonCtrl* mEditButton;
DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetPtr);
static void consoleInit();
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
class GuiInspectorTypeSoundAssetId : public GuiInspectorTypeSoundAssetPtr
{
typedef GuiInspectorTypeSoundAssetPtr Parent;
public:
DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetId);
static void consoleInit();
};
#endif

View file

@ -817,7 +817,7 @@ void ReflectionProbe::createEditorResources()
void ReflectionProbe::prepRenderImage(SceneRenderState *state)
{
if (!mEnabled || (!RenderProbeMgr::smRenderReflectionProbes && dStrcmp(Con::getVariable("$Probes::Capturing", "0"),"1")))
if (!mEnabled || (!RenderProbeMgr::smRenderReflectionProbes && !dStrcmp(Con::getVariable("$Probes::Capturing", "0"),"1")))
return;
Point3F distVec = getRenderPosition() - state->getCameraPosition();