Skip to content

Commit

Permalink
Merge pull request #27 from bretonium/fix-score-on-infected
Browse files Browse the repository at this point in the history
Fix zombie score on human infected
  • Loading branch information
bretonium authored Jan 10, 2020
2 parents 9561bc9 + 6dd0ff4 commit 59743f9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/game/server/entities/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,12 @@ void CCharacter::Die(int Killer, int Weapon)
GameServer()->CreateDeath(m_Pos, m_pPlayer->GetCID());

/* INFECTION MODIFICATION START ***************************************/
CPlayer* pKillerPlayer = nullptr;
if(Killer >=0 && Killer < MAX_CLIENTS)
{
pKillerPlayer = GameServer()->m_apPlayers[Killer];
}

if(GetClass() == PLAYERCLASS_BOOMER && !IsFrozen() && Weapon != WEAPON_GAME && !(IsInLove() && Weapon == WEAPON_SELF) )
{
GameServer()->CreateSound(m_Pos, SOUND_GRENADE_EXPLODE);
Expand All @@ -2797,7 +2803,7 @@ void CCharacter::Die(int Killer, int Weapon)
}
else
{
m_pPlayer->StartInfection(false);
m_pPlayer->Infect(pKillerPlayer);
}
if (m_Core.m_Passenger) {
m_Core.m_Passenger->m_IsPassenger = false; // InfClassR taxi mode
Expand All @@ -2806,12 +2812,6 @@ void CCharacter::Die(int Killer, int Weapon)
}
/* INFECTION MODIFICATION END *****************************************/

CPlayer* pKillerPlayer = nullptr;
if(Killer >=0 && Killer < MAX_CLIENTS)
{
pKillerPlayer = GameServer()->m_apPlayers[Killer];
}

if(pKillerPlayer && (pKillerPlayer != m_pPlayer))
{
pKillerPlayer->IncreaseNumberKills();
Expand Down

0 comments on commit 59743f9

Please sign in to comment.