mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Kept hook when needed
This commit is contained in:
parent
b1c4148e9c
commit
b4a5956f72
|
@ -742,7 +742,6 @@ void CCharacter::ResetHook()
|
||||||
m_Core.m_HookedPlayer = -1;
|
m_Core.m_HookedPlayer = -1;
|
||||||
m_Core.m_HookState = HOOK_RETRACTED;
|
m_Core.m_HookState = HOOK_RETRACTED;
|
||||||
m_Core.m_TriggeredEvents |= COREEVENT_HOOK_RETRACT;
|
m_Core.m_TriggeredEvents |= COREEVENT_HOOK_RETRACT;
|
||||||
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
|
||||||
m_Core.m_HookPos = m_Core.m_Pos;
|
m_Core.m_HookPos = m_Core.m_Pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1915,6 +1914,7 @@ void CCharacter::HandleTiles(int Index)
|
||||||
if(!g_Config.m_SvTeleportHoldHook)
|
if(!g_Config.m_SvTeleportHoldHook)
|
||||||
{
|
{
|
||||||
ResetHook();
|
ResetHook();
|
||||||
|
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
||||||
}
|
}
|
||||||
if(g_Config.m_SvTeleportLoseWeapons)
|
if(g_Config.m_SvTeleportLoseWeapons)
|
||||||
{
|
{
|
||||||
|
@ -1939,6 +1939,7 @@ void CCharacter::HandleTiles(int Index)
|
||||||
if(!g_Config.m_SvTeleportHoldHook)
|
if(!g_Config.m_SvTeleportHoldHook)
|
||||||
{
|
{
|
||||||
ResetHook();
|
ResetHook();
|
||||||
|
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -1954,6 +1955,7 @@ void CCharacter::HandleTiles(int Index)
|
||||||
if(!g_Config.m_SvTeleportHoldHook)
|
if(!g_Config.m_SvTeleportHoldHook)
|
||||||
{
|
{
|
||||||
ResetHook();
|
ResetHook();
|
||||||
|
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -2264,6 +2266,7 @@ void CCharacter::Pause(bool Pause)
|
||||||
if(m_Core.m_HookedPlayer != -1) // Keeping hook would allow cheats
|
if(m_Core.m_HookedPlayer != -1) // Keeping hook would allow cheats
|
||||||
{
|
{
|
||||||
ResetHook();
|
ResetHook();
|
||||||
|
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -751,6 +751,7 @@ void CGameTeams::SwapTeamCharacters(CPlayer *pPlayer, CPlayer *pTargetPlayer, in
|
||||||
if(m_Core.Team(i) == Team && GameServer()->m_apPlayers[i])
|
if(m_Core.Team(i) == Team && GameServer()->m_apPlayers[i])
|
||||||
{
|
{
|
||||||
GameServer()->m_apPlayers[i]->GetCharacter()->ResetHook();
|
GameServer()->m_apPlayers[i]->GetCharacter()->ResetHook();
|
||||||
|
GameServer()->m_World.ReleaseHooked(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue