3240 {
3241 vector orientation;
3243 HumanMovementState state = new HumanMovementState();
3244 GetMovementState(state);
3245
3246 #ifndef SERVER
3247 DayZPlayerTypeStepSoundLookupTable table = type.GetStepSoundLookupTable();
3249 if (pUserInt < 100)
3250 {
3251 string surface;
3252 if (pUserInt % 2 == 1)
3253 {
3255 if (surface.
Length() == 0)
3257 }
3258 else
3259 {
3261 if (surface.
Length() == 0)
3263 }
3264
3265 if (surface.
Length() != 0)
3267
3269 {
3271 int stepParticleID = Surface.GetStepsParticleID(surface);
3272
3273 if (stepParticleID > 0)
3274 {
3276 }
3277 }
3278
3280 }
3281 else
3282 {
3284 if (surface2.
Length() != 0)
3286
3288 }
3289
3291 {
3292 orientation =
Vector(0, 0, 0);
3293 vector edgeLength =
Vector(1.5, 3.0, 1.5);
3294 array<Object> excludedObjects = new array<Object>;
3295 excludedObjects.Insert(this);
3296 array<Object> collidedObjects = new array<Object>;
3297
3298 if (
GetGame().IsBoxCollidingGeometry(
GetPosition(), orientation, edgeLength, ObjIntersectView, ObjIntersectNone, excludedObjects, collidedObjects))
3299 {
3300 for (int i = 0; i < collidedObjects.Count(); ++i)
3301 {
3304 MiscEffects.PlayVegetationCollideParticles(colObject, this);
3305
3306 if (colObject && colObject.HasPlayerCollisionSound())
3307 {
3308 for (
int j = 0; j < type.GetVegetationSounds().
Count(); ++j)
3309 {
3311
3313 {
3316
3317 if (vegSoundObject != NULL)
3318 {
3320 PlaySound(vegSoundObject, vegSoundObjectBuilder);
3321 }
3322
3323 break;
3324 }
3325 }
3326
3327 break;
3328 }
3329 }
3330 }
3331
3332 SoundObject soundObject = soundBuilder.BuildSoundObject();
3333 if (soundObject != NULL)
3334 {
3337 }
3338 }
3339 #endif
3340
3342 {
3344
3345 float noiseMultiplier = 0;
3346
3349 noiseParams = type.GetNoiseParamsStand();
3351 noiseParams = type.GetNoiseParamsCrouch();
3353 noiseParams = type.GetNoiseParamsProne();
3354 else
3355 {
3356 Debug.Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)", state.
m_iStanceIdx));
3357 noiseParams = type.GetNoiseParamsStand();
3358 }
3359
3360 noiseMultiplier = NoiseAIEvaluate.GetNoiseMultiplier(
this) * NoiseAIEvaluate.GetNoiseReduction(
GetGame().GetWeather());
3361
3362 AddNoise(noiseParams, noiseMultiplier);
3363
3364 if ((
m_StepCounter % PlayerConstants.CHECK_EVERY_N_STEP) == 0)
3365 {
3367 }
3368 }
3369 }
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 CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
void SoundObject(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
proto native int Length()
Returns length of string.
proto native int Hash()
Returns hash of string.