Page MenuHomeFeedback Tracker

Other players can still hear pain noise when jumping
Closed, ResolvedPublic

Description

When a player jumps they cant hear the pain noise anymore (fixed bug ) but other players in vicinity still hear the pain sound when landing.

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10
Category
General
Steps To Reproduce

Jump near other player

Additional Information

Spaggies experimental chernarus

Event Timeline

I've already made a ticket (with video) about this but unfortunately it got closed by @Geez for being a duplicate? (Which it's not if you read it carefully) https://feedback.bistudio.com/T172487
Can't really blame him, it was almost weekend at the time... :-)

Geez changed the task status from New to Awaiting internal Testing.May 22 2023, 10:10 AM
Geez changed the task status from Awaiting internal Testing to Confirmed Internally.May 23 2023, 12:41 PM

Yes, apologies.
We have tested this and a fix is being prepared.

Geez closed this task as Resolved.May 26 2023, 12:21 PM
Geez claimed this task.

Hello again.
The issue has been resolved internally and the fix will appear in one of the future updates.

mdc added a subscriber: mdc.EditedMay 31 2023, 4:48 PM

@Geez The proposed fix does not address the root cause of the issue, which is not synchronization but is in fact incorrect calling of ProcessDirectDamage outside of intended conditions.

DayZPlayerImplementFallDamage::HandleFallDamage

Current implementation:

		if (GetGame().IsServer())
		{
			PlayerBase playerBase = PlayerBase.Cast(m_Player);
			if (playerBase)
			{
				AttachBleedingToZonesByHeight(playerBase);
				DamageAttachedGear(playerBase);
				playerBase.DamageAllLegs(BROKENLEGS_HEALTH_DAMAGE_MAX * m_FallDamageData.m_BrokenLegsCoef);
			}
			
			vector posMS = m_Player.WorldToModel(m_Player.GetPosition());

			m_Player.ProcessDirectDamage(DT_CUSTOM, m_Player, "", FALL_DAMAGE_AMMO_HEALTH, posMS, m_FallDamageData.m_HealthCoef);
			m_Player.ProcessDirectDamage(DT_CUSTOM, m_Player, "", FALL_DAMAGE_AMMO_SHOCK, posMS, m_FallDamageData.m_ShockCoef);

			if (playerBase)
				playerBase.ForceUpdateInjuredState();
		}

Correct implementation:

		if (GetGame().IsServer())
		{
			PlayerBase playerBase = PlayerBase.Cast(m_Player);
			if (playerBase)
			{
				AttachBleedingToZonesByHeight(playerBase);
				DamageAttachedGear(playerBase);
				playerBase.DamageAllLegs(BROKENLEGS_HEALTH_DAMAGE_MAX * m_FallDamageData.m_BrokenLegsCoef);
			}
			
			vector posMS = m_Player.WorldToModel(m_Player.GetPosition());

			if (pData.m_Height >= HEALTH_HEIGHT_LOW)
				m_Player.ProcessDirectDamage(DT_CUSTOM, m_Player, "", FALL_DAMAGE_AMMO_HEALTH, posMS, m_FallDamageData.m_HealthCoef);

			if (pData.m_Height >= SHOCK_HEIGHT_LOW)
				m_Player.ProcessDirectDamage(DT_CUSTOM, m_Player, "", FALL_DAMAGE_AMMO_SHOCK, posMS, m_FallDamageData.m_ShockCoef);

			if (playerBase)
				playerBase.ForceUpdateInjuredState();
		}

The sound is audible without the above fix to non-remote client instances under specific conditions, typically with a fall height as measured in CommandHandler of between 0.43 and 0.48m.