mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #2088
2088: Fix antibot crash r=Learath2 a=heinrich5991 `m_Core.m_HookedPlayer` can be -1 if you get teleported the moment you'd normally attach the hook. Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
commit
477b8ff987
|
@ -772,7 +772,8 @@ void CCharacter::Tick()
|
|||
|
||||
if(m_Core.m_TriggeredEvents&COREEVENT_HOOK_ATTACH_PLAYER)
|
||||
{
|
||||
if(GameServer()->m_apPlayers[m_Core.m_HookedPlayer]->GetTeam() != -1)
|
||||
if(m_Core.m_HookedPlayer != -1
|
||||
&& GameServer()->m_apPlayers[m_Core.m_HookedPlayer]->GetTeam() != -1)
|
||||
{
|
||||
Antibot()->OnHookAttach(m_pPlayer->GetCID(), true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue