mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Check if player still in team when loading hook
This commit is contained in:
parent
7427e41959
commit
839fd08d6a
|
@ -179,7 +179,15 @@ void CSaveTee::load(CCharacter *pChr, int Team)
|
|||
pChr->m_Core.m_HookTick = m_HookTick;
|
||||
|
||||
pChr->m_Core.m_HookState = m_HookState;
|
||||
pChr->m_Core.m_HookedPlayer = m_HookedPlayer;
|
||||
if(m_HookedPlayer != -1 && pChr->Teams()->m_Core.Team(m_HookedPlayer) != Team)
|
||||
{
|
||||
pChr->m_Core.m_HookedPlayer = -1;
|
||||
pChr->m_Core.m_HookState = HOOK_FLYING;
|
||||
}
|
||||
else
|
||||
{
|
||||
pChr->m_Core.m_HookedPlayer = m_HookedPlayer;
|
||||
}
|
||||
pChr->m_Core.m_NewHook = m_NewHook;
|
||||
pChr->m_SavedInput.m_Direction = m_InputDirection;
|
||||
pChr->m_SavedInput.m_Jump = m_InputJump;
|
||||
|
|
Loading…
Reference in a new issue