mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
cleanups for sound assets
removed redundant get<foo>Profile calls, correctly used a few in proxmine
This commit is contained in:
parent
3c30a905c3
commit
93faa243ac
11 changed files with 25 additions and 81 deletions
|
|
@ -1172,27 +1172,27 @@ void RigidShape::updatePos(F32 dt)
|
|||
if (collSpeed >= mDataBlock->softImpactSpeed)
|
||||
impactSound = RigidShapeData::Body::SoftImpactSound;
|
||||
|
||||
if (impactSound != -1 && mDataBlock->getBodySounds(impactSound) != NULL)
|
||||
SFX->playOnce(mDataBlock->getBodySoundProfile(impactSound), &getTransform());
|
||||
if (impactSound != -1 && mDataBlock->getBodySoundsProfile(impactSound))
|
||||
SFX->playOnce(mDataBlock->getBodySoundsProfile(impactSound), &getTransform());
|
||||
}
|
||||
|
||||
// Water volume sounds
|
||||
F32 vSpeed = getVelocity().len();
|
||||
if (!inLiquid && mWaterCoverage >= 0.8f) {
|
||||
if (vSpeed >= mDataBlock->hardSplashSoundVel)
|
||||
SFX->playOnce(mDataBlock->getWaterSoundProfile(RigidShapeData::ImpactHard), &getTransform());
|
||||
SFX->playOnce(mDataBlock->getWaterSoundsProfile(RigidShapeData::ImpactHard), &getTransform());
|
||||
else
|
||||
if (vSpeed >= mDataBlock->medSplashSoundVel)
|
||||
SFX->playOnce(mDataBlock->getWaterSoundProfile(RigidShapeData::ImpactMedium), &getTransform());
|
||||
SFX->playOnce(mDataBlock->getWaterSoundsProfile(RigidShapeData::ImpactMedium), &getTransform());
|
||||
else
|
||||
if (vSpeed >= mDataBlock->softSplashSoundVel)
|
||||
SFX->playOnce(mDataBlock->getWaterSoundProfile(RigidShapeData::ImpactSoft), &getTransform());
|
||||
SFX->playOnce(mDataBlock->getWaterSoundsProfile(RigidShapeData::ImpactSoft), &getTransform());
|
||||
inLiquid = true;
|
||||
}
|
||||
else
|
||||
if (inLiquid && mWaterCoverage < 0.8f) {
|
||||
if (vSpeed >= mDataBlock->exitSplashSoundVel)
|
||||
SFX->playOnce(mDataBlock->getWaterSoundProfile(RigidShapeData::ExitWater), &getTransform());
|
||||
SFX->playOnce(mDataBlock->getWaterSoundsProfile(RigidShapeData::ExitWater), &getTransform());
|
||||
inLiquid = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue