Skip to content

Commit

Permalink
Update SceneObject.cc
Browse files Browse the repository at this point in the history
Indentation woes
  • Loading branch information
Simon Love committed Mar 9, 2016
1 parent ef7be58 commit ac09626
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions engine/source/2d/sceneobject/SceneObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,14 @@ SceneObject::~SceneObject()
}

if (mAudioHandles.size())
{
for (typeAudioHandleVector::iterator itr = mAudioHandles.begin(); itr != mAudioHandles.end(); ++itr)
{
U32 handle = *itr;
alxStop(handle);
}
mAudioHandles.clear();
}
{
for (typeAudioHandleVector::iterator itr = mAudioHandles.begin(); itr != mAudioHandles.end(); ++itr)
{
U32 handle = *itr;
alxStop(handle);
}
mAudioHandles.clear();
}

// Decrease scene-object count.
--sGlobalSceneObjectCount;
Expand Down Expand Up @@ -889,22 +889,22 @@ void SceneObject::sceneRenderOverlay( const SceneRenderState* sceneRenderState )
}

if (debugMask & Scene::SCENE_DEBUG_AUDIO_SOURCES)
{
if (mAudioHandles.size())
{
if (mAudioHandles.size())
for (typeAudioHandleVector::iterator itr = mAudioHandles.begin(); itr != mAudioHandles.end(); ++itr)
{
for (typeAudioHandleVector::iterator itr = mAudioHandles.begin(); itr != mAudioHandles.end(); ++itr)
{
U32 handle = *itr;
ALfloat MaxDistance = 0.f;
ALfloat RefDistance = 0.f;
alxGetSourcef(handle, AL_MAX_DISTANCE, &MaxDistance);
alxGetSourcef(handle, AL_REFERENCE_DISTANCE, &RefDistance);
pScene->mDebugDraw.DrawCircle(getRenderPosition(), MaxDistance, ColorF(1.f, 0.2f, 0.2f));
pScene->mDebugDraw.DrawCircle(getRenderPosition(), RefDistance, ColorF(1.f, 0.0f, 0.0f));
}
U32 handle = *itr;
ALfloat MaxDistance = 0.f;
ALfloat RefDistance = 0.f;
alxGetSourcef(handle, AL_MAX_DISTANCE, &MaxDistance);
alxGetSourcef(handle, AL_REFERENCE_DISTANCE, &RefDistance);
pScene->mDebugDraw.DrawCircle(getRenderPosition(), MaxDistance, ColorF(1.f, 0.2f, 0.2f));
pScene->mDebugDraw.DrawCircle(getRenderPosition(), RefDistance, ColorF(1.f, 0.0f, 0.0f));
}
}

}
}
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -4095,33 +4095,33 @@ U32 SceneObject::getSound(S32 index)

void SceneObject::refreshsources()
{
if (mAudioHandles.size())
if (mAudioHandles.size())
{
S32 index = 0;
for (typeAudioHandleVector::iterator itr = mAudioHandles.begin(); itr != mAudioHandles.end(); ++itr)
{
S32 index = 0;
for (typeAudioHandleVector::iterator itr = mAudioHandles.begin(); itr != mAudioHandles.end(); ++itr)
U32 handle = *itr;

if (handle)
{
U32 handle = *itr;

if (handle) {

if (!alxIsValidHandle(handle))
mHandleDeletionList.push_back(index);
if (!alxIsValidHandle(handle))
mHandleDeletionList.push_back(index);

index++;
}
}
index++;
}
}

if (mHandleDeletionList.size())
{
if (mHandleDeletionList.size())
{

for (Vector<S32>::iterator delitr = mHandleDeletionList.begin(); delitr != mHandleDeletionList.end(); ++delitr)
{
mAudioHandles.erase(*delitr);
}
for (Vector<S32>::iterator delitr = mHandleDeletionList.begin(); delitr != mHandleDeletionList.end(); ++delitr)
{
mAudioHandles.erase(*delitr);
}
mHandleDeletionList.clear();
}
}
}
}


//------------------------------------------------------------------------------
Expand Down

0 comments on commit ac09626

Please sign in to comment.