From 3a80c5f5fb813ca0311e5c2398a5a2ab1c86480a Mon Sep 17 00:00:00 2001 From: def Date: Mon, 22 Jul 2013 17:37:14 +0200 Subject: [PATCH] Make evil (red) teleports work as normal (blue) teleports when weapons- or hook-through-teleport are activated --- src/game/server/entities/character.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 8ef6df4fa..e32be9e54 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -1441,15 +1441,18 @@ void CCharacter::HandleTiles(int Index) int evilz = GameServer()->Collision()->IsEvilTeleport(MapIndex); if(evilz && !m_Super && Controller->m_TeleOuts[evilz-1].size()) { - m_Core.m_HookedPlayer = -1; - m_Core.m_HookState = HOOK_RETRACTED; - m_Core.m_TriggeredEvents |= COREEVENT_HOOK_RETRACT; - m_Core.m_HookState = HOOK_RETRACTED; - GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); + if (!g_Config.m_SvTeleportHook && !g_Config.m_SvTeleportWeapons) + { + m_Core.m_HookedPlayer = -1; + m_Core.m_HookState = HOOK_RETRACTED; + m_Core.m_TriggeredEvents |= COREEVENT_HOOK_RETRACT; + m_Core.m_HookState = HOOK_RETRACTED; + GameWorld()->ReleaseHooked(GetPlayer()->GetCID()); + m_Core.m_Vel = vec2(0,0); + } int Num = Controller->m_TeleOuts[evilz-1].size(); m_Core.m_Pos = Controller->m_TeleOuts[evilz-1][(!Num)?Num:rand() % Num]; m_Core.m_HookPos = m_Core.m_Pos; - m_Core.m_Vel = vec2(0,0); return; } if(GameServer()->Collision()->IsCheckTeleport(MapIndex))