mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Make evil (red) teleports work as normal (blue) teleports when weapons- or hook-through-teleport are activated
This commit is contained in:
parent
d4c0f31b32
commit
3a80c5f5fb
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue