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

Missing friendlyfire after previous commit #805

Merged
merged 2 commits into from
Mar 31, 2023
Merged

Missing friendlyfire after previous commit #805

merged 2 commits into from
Mar 31, 2023

Conversation

UnrealKaraulov
Copy link
Contributor

@UnrealKaraulov UnrealKaraulov commented Jan 22, 2023

Fix #806

@wopox1337
Copy link
Collaborator

Perhaps another solution would be better

BOOL EXT_FUNC CHalfLifeMultiplay::__API_HOOK(FPlayerCanTakeDamage)(CBasePlayer *pPlayer, CBaseEntity *pAttacker)
{
if (!pAttacker || PlayerRelationship(pPlayer, pAttacker) != GR_TEAMMATE)
{
return TRUE;
}
if (friendlyfire.value != 0.0f || pAttacker == pPlayer)
{
return TRUE;
}
return FALSE;
}

Copy link
Collaborator

@wopox1337 wopox1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand it correctly, it should fit.

regamedll/dlls/vehicle.cpp Outdated Show resolved Hide resolved
Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
@s1lentq s1lentq merged commit 4a7a635 into s1lentq:master Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behavior with the new mp_legacy_vehicle_block CVar
3 participants