diff --git a/regamedll/dlls/career_tasks.cpp b/regamedll/dlls/career_tasks.cpp index 0b0c45a5..200c6755 100644 --- a/regamedll/dlls/career_tasks.cpp +++ b/regamedll/dlls/career_tasks.cpp @@ -136,10 +136,14 @@ void CCareerTask::OnWeaponKill(int weaponId, int weaponClassId, bool headshot, b if (!pHostage->IsAlive()) continue; +#ifndef REGAMEDLL_FIXES if (!pHostage->IsFollowingSomeone()) continue; if (pHostage->m_target == pVictim) +#else + if (pHostage->IsFollowing(pVictim)) +#endif hostagesCount++; } @@ -211,11 +215,14 @@ void CCareerTask::OnEvent(GameEventType event, CBasePlayer *pVictim, CBasePlayer { if (!pHostage->IsAlive()) continue; - +#ifndef REGAMEDLL_FIXES if (!pHostage->IsFollowingSomeone()) continue; if (pHostage->m_target == pAttacker) +#else + if (pHostage->IsFollowing(pAttacker)) +#endif hostagesCount++; } diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 6e524918..794ee80b 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -2046,8 +2046,27 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib) } TheCareerTasks->HandleDeath(m_iTeam, this); + +#ifdef REGAMEDLL_FIXES + if (!m_bKilledByBomb) + { + CBasePlayer *pAttacker = CBasePlayer::Instance(pevAttacker); + + if(pAttacker /*safety*/ && !pAttacker->IsBot() && pAttacker->m_iTeam != m_iTeam) + { + if (pAttacker->HasShield()) + killerHasShield = true; + + if (IsBot() && IsBlind()) // dystopm: shouldn't be !IsBot() ? + wasBlind = true; + + TheCareerTasks->HandleEnemyKill(wasBlind, GetWeaponName(g_pevLastInflictor, pevAttacker), m_bHeadshotKilled, killerHasShield, pAttacker, this); // last 2 param swapped to match function definition + } + } +#endif } +#ifndef REGAMEDLL_FIXES if (!m_bKilledByBomb) { CBasePlayer *pAttacker = CBasePlayer::Instance(pevAttacker); @@ -2077,6 +2096,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib) } } } +#endif } if (!m_bKilledByBomb)