3216 {
3217 vector orientation;
3219 HumanMovementState state = new HumanMovementState();
3220 GetMovementState(state);
3221
3222 #ifndef SERVER
3223 DayZPlayerTypeStepSoundLookupTable table = type.GetStepSoundLookupTable();
3225 if (pUserInt < 100)
3226 {
3227 string surface;
3228 if (pUserInt % 2 == 1)
3229 {
3231 if (surface.
Length() == 0)
3233 }
3234 else
3235 {
3237 if (surface.
Length() == 0)
3239 }
3240
3241 if (surface.
Length() != 0)
3243
3245 {
3247 int stepParticleID = Surface.GetStepsParticleID(surface);
3248
3249 if (stepParticleID > 0)
3250 {
3252 }
3253 }
3254
3256 }
3257 else
3258 {
3260 if (surface2.
Length() != 0)
3262
3264 }
3265
3266 if (soundBuilder != NULL &&
g_Game.GetPlayer())
3267 {
3268 orientation =
Vector(0, 0, 0);
3269 vector edgeLength =
Vector(1.5, 3.0, 1.5);
3270 array<Object> excludedObjects = new array<Object>;
3271 excludedObjects.Insert(this);
3272 array<Object> collidedObjects = new array<Object>;
3273
3274 if (
g_Game.IsBoxCollidingGeometry(
GetPosition(), orientation, edgeLength, ObjIntersectView, ObjIntersectNone, excludedObjects, collidedObjects))
3275 {
3276 for (int i = 0; i < collidedObjects.Count(); ++i)
3277 {
3280 MiscEffects.PlayVegetationCollideParticles(colObject, this);
3281
3282 if (colObject && colObject.HasPlayerCollisionSound())
3283 {
3284 for (
int j = 0; j < type.GetVegetationSounds().
Count(); ++j)
3285 {
3287
3289 {
3292
3293 if (vegSoundObject != NULL)
3294 {
3296 PlaySound(vegSoundObject, vegSoundObjectBuilder);
3297 }
3298
3299 break;
3300 }
3301 }
3302
3303 break;
3304 }
3305 }
3306 }
3307
3308 SoundObject soundObject = soundBuilder.BuildSoundObject();
3309 if (soundObject != NULL)
3310 {
3313 }
3314 }
3315 #endif
3316
3318 {
3320
3321 float noiseMultiplier = 0;
3322
3325 noiseParams = type.GetNoiseParamsStand();
3327 noiseParams = type.GetNoiseParamsCrouch();
3329 noiseParams = type.GetNoiseParamsProne();
3330 else
3331 {
3332 Debug.Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)", state.
m_iStanceIdx));
3333 noiseParams = type.GetNoiseParamsStand();
3334 }
3335
3336 noiseMultiplier = NoiseAIEvaluate.GetNoiseMultiplier(
this) * NoiseAIEvaluate.GetNoiseReduction(
g_Game.GetWeather());
3337
3338 AddNoise(noiseParams, noiseMultiplier);
3339
3340 if ((
m_StepCounter % PlayerConstants.CHECK_EVERY_N_STEP) == 0)
3341 {
3343 }
3344 }
3345 }
class NoiseSystem NoiseParams()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
string GetSurfaceType(SurfaceAnimationBone limbType)
void ProcessFeetDamageServer(int pUserInt)
void AttenuateSoundIfNecessary(SoundObject soundObject)
int m_LastSurfaceUnderHash
AnimBootsType GetBootsType()
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
SoundObjectBuilder GetSoundBuilder(int eventId, int pMovement, int pSurfaceHash, AnimBootsType pBoots)
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
int m_iStanceIdx
current command's id
SoundObjectBuilder GetSoundObjectBuilder()
TIntArray GetAnimEventIds()
void VegetationSound(SoundObjectBuilder soundObjectBuilder, TIntArray animEventIds)
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
DayZPlayerConstants
defined in C++
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
void SoundObject(SoundParams soundParams)
vector GetPosition()
Get the world position of the Effect.
proto native int Length()
Returns length of string.
proto native int Hash()
Returns hash of string.