mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
suggested revisions
This commit is contained in:
parent
62506214d0
commit
c60be9a17e
2 changed files with 3 additions and 2 deletions
|
|
@ -6873,7 +6873,7 @@ void Player::playFootstepSound( bool triggeredLeft, Material* contactMaterial, S
|
||||||
// Play default sound.
|
// Play default sound.
|
||||||
|
|
||||||
S32 sound = -1;
|
S32 sound = -1;
|
||||||
if( contactMaterial && contactMaterial->mFootstepSoundId != -1 )
|
if (contactMaterial && (contactMaterial->mImpactSoundId>-1 && contactMaterial->mImpactSoundId<PlayerData::MaxSoundOffsets))
|
||||||
sound = contactMaterial->mFootstepSoundId;
|
sound = contactMaterial->mFootstepSoundId;
|
||||||
else if( contactObject && contactObject->getTypeMask() & VehicleObjectType )
|
else if( contactObject && contactObject->getTypeMask() & VehicleObjectType )
|
||||||
sound = 2;
|
sound = 2;
|
||||||
|
|
@ -6904,7 +6904,7 @@ void Player:: playImpactSound()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
S32 sound = -1;
|
S32 sound = -1;
|
||||||
if( material && (material->mImpactSoundId>=0) )
|
if (material && (material->mImpactSoundId>-1 && material->mImpactSoundId<PlayerData::MaxSoundOffsets))
|
||||||
sound = material->mImpactSoundId;
|
sound = material->mImpactSoundId;
|
||||||
else if( rInfo.object->getTypeMask() & VehicleObjectType )
|
else if( rInfo.object->getTypeMask() & VehicleObjectType )
|
||||||
sound = 2; // Play metal;
|
sound = 2; // Play metal;
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ struct PlayerData: public ShapeBaseData {
|
||||||
FootHard,
|
FootHard,
|
||||||
FootMetal,
|
FootMetal,
|
||||||
FootSnow,
|
FootSnow,
|
||||||
|
MaxSoundOffsets,
|
||||||
FootShallowSplash,
|
FootShallowSplash,
|
||||||
FootWading,
|
FootWading,
|
||||||
FootUnderWater,
|
FootUnderWater,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue