Remove unnecessary check. Fixes #714

This commit is contained in:
Learath2 2017-04-02 19:05:28 +02:00 committed by heinrich5991
parent 1211746491
commit 079c53471c

View file

@ -302,16 +302,13 @@ void CGameContext::ConTeleport(IConsole::IResult *pResult, void *pUserData)
if (pResult->NumArguments() > 0)
Tele = pResult->GetVictim();
if (pSelf->m_apPlayers[TeleTo])
CCharacter* pChr = pSelf->GetPlayerChar(Tele);
if (pChr && pSelf->GetPlayerChar(TeleTo))
{
CCharacter* pChr = pSelf->GetPlayerChar(Tele);
if (pChr && pSelf->GetPlayerChar(TeleTo))
{
pChr->Core()->m_Pos = pSelf->m_apPlayers[TeleTo]->m_ViewPos;
pChr->m_Pos = pSelf->m_apPlayers[TeleTo]->m_ViewPos;
pChr->m_PrevPos = pSelf->m_apPlayers[TeleTo]->m_ViewPos;
pChr->m_DDRaceState = DDRACE_CHEAT;
}
pChr->Core()->m_Pos = pSelf->m_apPlayers[TeleTo]->m_ViewPos;
pChr->m_Pos = pSelf->m_apPlayers[TeleTo]->m_ViewPos;
pChr->m_PrevPos = pSelf->m_apPlayers[TeleTo]->m_ViewPos;
pChr->m_DDRaceState = DDRACE_CHEAT;
}
}