Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "instant respawning" when dying to trigger_hurt #815

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

jensewe
Copy link
Contributor

@jensewe jensewe commented Sep 8, 2024

Clip where one of the teammate got a boomer as soon as Alyce died as boomer:
【RBT VII 瑞士轮 R7 - amagami [CN] vs r4w [SA]】 【精准空降到 10:11】 https://www.bilibili.com/video/BV1ZhWNe8EYX/?share_source=copy_web&vd_source=f80ca4a66aa762100701677bc8a0c4a8&t=611

Call chain:

  1. CTerrorPlayer::MaterializeFromGhost
  2. CBaseEntity::PhysicsRemoveTouchedList
  3. CBaseEntity::PhysicsNotifyOtherOfUntouch
  4. CBaseEntity::PhysicsRemoveToucher
  5. CTriggerHurt::EndTouch
void CTriggerHurt::EndTouch( CBaseEntity *pOther )
{
	if (PassesTriggerFilters(pOther))
	{
		EHANDLE hOther;
		hOther = pOther;

		// if this guy has never taken damage, hurt him now
		if ( !m_hurtEntities.HasElement( hOther ) )
		{
			HurtEntity( pOther, m_flDamage * 0.5 );
		}
	}
	BaseClass::EndTouch( pOther );
}

Fix:
- Fixed an issue where spawned SI might be queued to the front when killed by `trigger_hurt`.
@SirPlease SirPlease merged commit 45e7385 into SirPlease:master Sep 8, 2024
2 checks passed
@SirPlease
Copy link
Owner

Good catch, simple fix. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants