|
@@ -231,7 +231,8 @@ Material::Material()
|
|
|
|
|
|
mFootstepSoundId = -1; mImpactSoundId = -1;
|
|
|
mImpactFXIndex = -1;
|
|
|
- mFootstepSoundCustom = 0; mImpactSoundCustom = 0;
|
|
|
+ INIT_ASSET(CustomFootstepSound);
|
|
|
+ INIT_ASSET(CustomImpactSound);
|
|
|
mFriction = 0.0;
|
|
|
|
|
|
mDirectSoundOcclusion = 1.f;
|
|
@@ -476,7 +477,7 @@ void Material::initPersistFields()
|
|
|
"- 16: PlayerData::impactWaterHard\n"
|
|
|
"- 17: PlayerData::exitingWater\n");
|
|
|
|
|
|
- addField("customFootstepSound", TypeSFXTrackName, Offset(mFootstepSoundCustom, Material),
|
|
|
+ INITPERSISTFIELD_SOUNDASSET(CustomFootstepSound, Material,
|
|
|
"The sound to play when the player walks over the material. If this is set, it overrides #footstepSoundId. This field is "
|
|
|
"useful for directly assigning custom footstep sounds to materials without having to rely on the PlayerData sound assignment.\n\n"
|
|
|
"@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too.");
|
|
@@ -488,7 +489,7 @@ void Material::initPersistFields()
|
|
|
"What FX to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater "
|
|
|
"than PlayerData::groundImpactMinSpeed.\n\n"
|
|
|
"For a list of IDs, see #impactFXId");
|
|
|
- addField("customImpactSound", TypeSFXTrackName, Offset(mImpactSoundCustom, Material),
|
|
|
+ INITPERSISTFIELD_SOUNDASSET(CustomImpactSound, Material,
|
|
|
"The sound to play when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. "
|
|
|
"If this is set, it overrides #impactSoundId. This field is useful for directly assigning custom impact sounds to materials "
|
|
|
"without having to rely on the PlayerData sound assignment.\n\n"
|