From 1de0bacf539f97a5a58a1452575b0f2246c532b7 Mon Sep 17 00:00:00 2001 From: Unreal Karaulov Date: Sun, 22 Jan 2023 13:10:22 +0300 Subject: [PATCH 1/2] Missing friendlyfire after previous commit Fixes https://github.com/s1lentq/ReGameDLL_CS/pull/798 issue. --- regamedll/dlls/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regamedll/dlls/vehicle.cpp b/regamedll/dlls/vehicle.cpp index 3089c9164..3dc2c5abb 100644 --- a/regamedll/dlls/vehicle.cpp +++ b/regamedll/dlls/vehicle.cpp @@ -150,7 +150,7 @@ void CFuncVehicle::Blocked(CBaseEntity *pOther) if (pOther->Classify() == CLASS_PLAYER) { CBasePlayer* playerOther = static_cast(pOther); - if (!playerDriver || g_pGameRules->PlayerRelationship(playerDriver, playerOther) == GR_TEAMMATE) + if (!playerDriver || (!friendlyfire.value && g_pGameRules->PlayerRelationship(playerDriver, playerOther) == GR_TEAMMATE)) { // Just kick player return; From b1394ef1f7e12e74cda2b2427195a23d86d49c5d Mon Sep 17 00:00:00 2001 From: Unreal Karaulov Date: Sun, 22 Jan 2023 17:54:49 +0300 Subject: [PATCH 2/2] Update regamedll/dlls/vehicle.cpp Co-authored-by: Sergey Shorokhov --- regamedll/dlls/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regamedll/dlls/vehicle.cpp b/regamedll/dlls/vehicle.cpp index 3dc2c5abb..3ff84b941 100644 --- a/regamedll/dlls/vehicle.cpp +++ b/regamedll/dlls/vehicle.cpp @@ -150,7 +150,7 @@ void CFuncVehicle::Blocked(CBaseEntity *pOther) if (pOther->Classify() == CLASS_PLAYER) { CBasePlayer* playerOther = static_cast(pOther); - if (!playerDriver || (!friendlyfire.value && g_pGameRules->PlayerRelationship(playerDriver, playerOther) == GR_TEAMMATE)) + if (!playerDriver || !g_pGameRules->FPlayerCanTakeDamage(playerOther, playerDriver)) { // Just kick player return;