3174 {
3175 vector orientation;
3177 HumanMovementState state = new HumanMovementState();
3178 GetMovementState(state);
3179
3180 #ifndef SERVER
3181 DayZPlayerTypeStepSoundLookupTable table = type.GetStepSoundLookupTable();
3183 if (pUserInt < 100)
3184 {
3185 string surface;
3186 if (pUserInt % 2 == 1)
3187 {
3189 if (surface.
Length() == 0)
3191 }
3192 else
3193 {
3195 if (surface.
Length() == 0)
3197 }
3198
3199 if (surface.
Length() != 0)
3201
3203 {
3205 int stepParticleID = Surface.GetStepsParticleID(surface);
3206
3207 if (stepParticleID > 0)
3208 {
3210 }
3211 }
3212
3214 }
3215 else
3216 {
3218 if (surface2.
Length() != 0)
3220
3222 }
3223
3225 {
3226 orientation =
Vector(0, 0, 0);
3227 vector edgeLength =
Vector(1.5, 3.0, 1.5);
3228 array<Object> excludedObjects = new array<Object>;
3229 excludedObjects.Insert(this);
3230 array<Object> collidedObjects = new array<Object>;
3231
3232 if (
GetGame().IsBoxCollidingGeometry(
GetPosition(), orientation, edgeLength, ObjIntersectView, ObjIntersectNone, excludedObjects, collidedObjects))
3233 {
3234 for (int i = 0; i < collidedObjects.Count(); ++i)
3235 {
3238 MiscEffects.PlayVegetationCollideParticles(colObject, this);
3239
3240 if (colObject && colObject.HasPlayerCollisionSound())
3241 {
3242 for (
int j = 0; j < type.GetVegetationSounds().
Count(); ++j)
3243 {
3245
3247 {
3250
3251 if (vegSoundObject != NULL)
3252 {
3254 PlaySound(vegSoundObject, vegSoundObjectBuilder);
3255 }
3256
3257 break;
3258 }
3259 }
3260
3261 break;
3262 }
3263 }
3264 }
3265
3266 SoundObject soundObject = soundBuilder.BuildSoundObject();
3267 if (soundObject != NULL)
3268 {
3271 }
3272 }
3273 #endif
3274
3276 {
3278
3279 float noiseMultiplier = 0;
3280
3283 noiseParams = type.GetNoiseParamsStand();
3285 noiseParams = type.GetNoiseParamsCrouch();
3287 noiseParams = type.GetNoiseParamsProne();
3288 else
3289 {
3290 Debug.Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)", state.
m_iStanceIdx));
3291 noiseParams = type.GetNoiseParamsStand();
3292 }
3293
3294 noiseMultiplier = NoiseAIEvaluate.GetNoiseMultiplier(
this) * NoiseAIEvaluate.GetNoiseReduction(
GetGame().GetWeather());
3295
3296 AddNoise(noiseParams, noiseMultiplier);
3297
3298 if ((
m_StepCounter % PlayerConstants.CHECK_EVERY_N_STEP) == 0)
3299 {
3301 }
3302 }
3303 }
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.