Make evil (red) teleports work as normal (blue) teleports when weapons- or hook-through-teleport are activated

This commit is contained in:
def 2013-07-22 17:37:14 +02:00
parent d4c0f31b32
commit 3a80c5f5fb

View file

@ -1440,16 +1440,19 @@ void CCharacter::HandleTiles(int Index)
}
int evilz = GameServer()->Collision()->IsEvilTeleport(MapIndex);
if(evilz && !m_Super && Controller->m_TeleOuts[evilz-1].size())
{
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))