mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
revert teleport useless change
This commit is contained in:
parent
5ec06369c5
commit
79226352af
|
@ -1104,27 +1104,27 @@ void CCharacter::HandleTiles(int Index)
|
||||||
}
|
}
|
||||||
m_LastBooster = MapIndex;
|
m_LastBooster = MapIndex;
|
||||||
int z = GameServer()->Collision()->IsTeleport(MapIndex);
|
int z = GameServer()->Collision()->IsTeleport(MapIndex);
|
||||||
if(z && DDRace()->m_TeleOuts[z-1].size())
|
if(z && ((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts[z-1].size())
|
||||||
{
|
{
|
||||||
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;
|
||||||
m_Core.m_HookState = HOOK_RETRACTED;
|
m_Core.m_HookState = HOOK_RETRACTED;
|
||||||
int Num = (DDRace()->m_TeleOuts[z-1].size());
|
int Num = (((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts[z-1].size());
|
||||||
m_Core.m_Pos = DDRace()->m_TeleOuts[z-1][(!Num)?Num:rand() % Num];
|
m_Core.m_Pos = ((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts[z-1][(!Num)?Num:rand() % Num];
|
||||||
m_Core.m_HookPos = m_Core.m_Pos;
|
m_Core.m_HookPos = m_Core.m_Pos;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int evilz = GameServer()->Collision()->IsEvilTeleport(MapIndex);
|
int evilz = GameServer()->Collision()->IsEvilTeleport(MapIndex);
|
||||||
if(evilz && !m_Super && DDRace()->m_TeleOuts[evilz-1].size())
|
if(evilz && !m_Super && ((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts[evilz-1].size())
|
||||||
{
|
{
|
||||||
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;
|
||||||
m_Core.m_HookState = HOOK_RETRACTED;
|
m_Core.m_HookState = HOOK_RETRACTED;
|
||||||
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
GameWorld()->ReleaseHooked(GetPlayer()->GetCID());
|
||||||
int Num = (DDRace()->m_TeleOuts[evilz-1].size());
|
int Num = (((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts[evilz-1].size());
|
||||||
m_Core.m_Pos = DDRace()->m_TeleOuts[evilz-1][(!Num)?Num:rand() % Num];
|
m_Core.m_Pos = ((CGameControllerDDRace*)GameServer()->m_pController)->m_TeleOuts[evilz-1][(!Num)?Num:rand() % Num];
|
||||||
m_Core.m_HookPos = m_Core.m_Pos;
|
m_Core.m_HookPos = m_Core.m_Pos;
|
||||||
m_Core.m_Vel = vec2(0,0);
|
m_Core.m_Vel = vec2(0,0);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -29,7 +29,6 @@ class CCharacter : public CEntity
|
||||||
void HandleTiles(int Index);
|
void HandleTiles(int Index);
|
||||||
float m_Time;
|
float m_Time;
|
||||||
int m_LastBroadcast;
|
int m_LastBroadcast;
|
||||||
class CGameControllerDDRace* m_pDDRace;
|
|
||||||
public:
|
public:
|
||||||
//character's size
|
//character's size
|
||||||
static const int ms_PhysSize = 28;
|
static const int ms_PhysSize = 28;
|
||||||
|
@ -82,7 +81,6 @@ public:
|
||||||
|
|
||||||
bool IsAlive() const { return m_Alive; }
|
bool IsAlive() const { return m_Alive; }
|
||||||
class CPlayer *GetPlayer() { return m_pPlayer; }
|
class CPlayer *GetPlayer() { return m_pPlayer; }
|
||||||
class CGameControllerDDRace *DDRace() { return m_pDDRace; }
|
|
||||||
// the player core for the physics
|
// the player core for the physics
|
||||||
CCharacterCore m_Core;
|
CCharacterCore m_Core;
|
||||||
struct WeaponStat
|
struct WeaponStat
|
||||||
|
|
Loading…
Reference in a new issue