mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Merge pull request #1700 from marauder2k9-torque/TSShape-HasAccumulation
fix for hasaccumulation exception
This commit is contained in:
commit
ebaacadeb9
2 changed files with 14 additions and 8 deletions
|
|
@ -1164,13 +1164,6 @@ void ShapeBase::onRemove()
|
||||||
{
|
{
|
||||||
mConvexList->nukeList();
|
mConvexList->nukeList();
|
||||||
|
|
||||||
Parent::onRemove();
|
|
||||||
|
|
||||||
// Stop any running sounds on the client
|
|
||||||
if (isGhost())
|
|
||||||
for (S32 i = 0; i < MaxSoundThreads; i++)
|
|
||||||
stopAudio(i);
|
|
||||||
|
|
||||||
// Accumulation and environment mapping
|
// Accumulation and environment mapping
|
||||||
if (isClientObject() && mShapeInstance)
|
if (isClientObject() && mShapeInstance)
|
||||||
{
|
{
|
||||||
|
|
@ -1178,6 +1171,13 @@ void ShapeBase::onRemove()
|
||||||
AccumulationVolume::removeObject(this);
|
AccumulationVolume::removeObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Parent::onRemove();
|
||||||
|
|
||||||
|
// Stop any running sounds on the client
|
||||||
|
if (isGhost())
|
||||||
|
for (S32 i = 0; i < MaxSoundThreads; i++)
|
||||||
|
stopAudio(i);
|
||||||
|
|
||||||
if ( isClientObject() )
|
if ( isClientObject() )
|
||||||
{
|
{
|
||||||
if (mCubeReflector)
|
if (mCubeReflector)
|
||||||
|
|
|
||||||
|
|
@ -239,8 +239,11 @@ void TSShapeInstance::initMeshObjects()
|
||||||
void TSShapeInstance::setMaterialList( TSMaterialList *matList )
|
void TSShapeInstance::setMaterialList( TSMaterialList *matList )
|
||||||
{
|
{
|
||||||
// get rid of old list
|
// get rid of old list
|
||||||
if ( mOwnMaterialList )
|
if (mOwnMaterialList)
|
||||||
|
{
|
||||||
delete mMaterialList;
|
delete mMaterialList;
|
||||||
|
mMaterialList = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
mMaterialList = matList;
|
mMaterialList = matList;
|
||||||
mOwnMaterialList = false;
|
mOwnMaterialList = false;
|
||||||
|
|
@ -891,6 +894,9 @@ void TSShapeInstance::prepCollision()
|
||||||
// Returns true is the shape contains any materials with accumulation enabled.
|
// Returns true is the shape contains any materials with accumulation enabled.
|
||||||
bool TSShapeInstance::hasAccumulation()
|
bool TSShapeInstance::hasAccumulation()
|
||||||
{
|
{
|
||||||
|
if (!mOwnMaterialList || mMaterialList == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
for ( U32 i = 0; i < mMaterialList->size(); ++i )
|
for ( U32 i = 0; i < mMaterialList->size(); ++i )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue