diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 52b1ddc89..8289066ee 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -742,7 +742,6 @@ void CCharacter::ResetHook() m_Core.m_HookedPlayer = -1; m_Core.m_HookState = HOOK_RETRACTED; m_Core.m_TriggeredEvents |= COREEVENT_HOOK_RETRACT; - GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); m_Core.m_HookPos = m_Core.m_Pos; } @@ -1915,6 +1914,7 @@ void CCharacter::HandleTiles(int Index) if(!g_Config.m_SvTeleportHoldHook) { ResetHook(); + GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); } if(g_Config.m_SvTeleportLoseWeapons) { @@ -1939,6 +1939,7 @@ void CCharacter::HandleTiles(int Index) if(!g_Config.m_SvTeleportHoldHook) { ResetHook(); + GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); } return; @@ -1954,6 +1955,7 @@ void CCharacter::HandleTiles(int Index) if(!g_Config.m_SvTeleportHoldHook) { ResetHook(); + GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); } } return; @@ -2264,6 +2266,7 @@ void CCharacter::Pause(bool Pause) if(m_Core.m_HookedPlayer != -1) // Keeping hook would allow cheats { ResetHook(); + GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); } } else diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index 53c4abd90..232d6384e 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -751,6 +751,7 @@ void CGameTeams::SwapTeamCharacters(CPlayer *pPlayer, CPlayer *pTargetPlayer, in if(m_Core.Team(i) == Team && GameServer()->m_apPlayers[i]) { GameServer()->m_apPlayers[i]->GetCharacter()->ResetHook(); + GameServer()->m_World.ReleaseHooked(i); } }