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

Osprey engine damage effects are shown on wrong engine #3263

Open
SamVanheer opened this issue Mar 15, 2022 · 0 comments
Open

Osprey engine damage effects are shown on wrong engine #3263

SamVanheer opened this issue Mar 15, 2022 · 0 comments

Comments

@SamVanheer
Copy link

When an Osprey's engines are damaged the engine is supposed to smoke to show that it's damaged. However, for some reason the variables used to enable the smoke are swapped:

halflife/dlls/osprey.cpp

Lines 771 to 788 in c7240b9

// only so much per engine
if (ptr->iHitgroup == 3)
{
if (m_flRightHealth < 0)
return;
else
m_flRightHealth -= flDamage;
m_iDoLeftSmokePuff = 3 + (flDamage / 5.0);
}
if (ptr->iHitgroup == 2)
{
if (m_flLeftHealth < 0)
return;
else
m_flLeftHealth -= flDamage;
m_iDoRightSmokePuff = 3 + (flDamage / 5.0);
}

Hitgroup 2 is the left engine, group 3 is the right engine. The health variables are checked correctly, but the puff variables are not.

To fix this they need to be swapped:

// only so much per engine
if (ptr->iHitgroup == 3)
{
	if (m_flRightHealth < 0)
		return;
	else
		m_flRightHealth -= flDamage;
	m_iDoRightSmokePuff = 3 + (flDamage / 5.0);
}

if (ptr->iHitgroup == 2)
{
	if (m_flLeftHealth < 0)
		return;
	else
		m_flLeftHealth -= flDamage;
	m_iDoLeftSmokePuff = 3 + (flDamage / 5.0);
}
SamVanheer added a commit to twhl-community/halflife-op4-updated that referenced this issue Mar 15, 2022
Fix Black Ops Osprey engine damage effects showing on wrong engine
Resolves ValveSoftware/halflife#3263
FreeSlave added a commit to FreeSlave/halflife-featureful that referenced this issue Jun 6, 2022
@SamVanheer SamVanheer reopened this May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants