Skip to content

Commit

Permalink
Rename CCollision functions for readability: avoid abbreviations
Browse files Browse the repository at this point in the history
- `SetDCollisionAt` --> `SetDoorCollisionAt`
- `GetFCollisionAt` --> `GetFrontCollisionAt`
- `IntersectNoLaserNW` --> `IntersectNoLaserNoWalls`
- `GetFIndex` --> `GetFrontIndex`
- `GetFTile` --> `GetFrontTile`
- `GetFTileIndex` --> `GetFrontTileIndex`
- `GetFTileFlags` --> `GetFrontTileFlags`
- `IsFNoLaser` --> `IsFrontNoLaser`
- `IsFTimeCheckpoint` --> `IsFrontTimeCheckpoint`
  • Loading branch information
Robyt3 committed Dec 8, 2024
1 parent 366a8b1 commit 36568ec
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions src/game/client/prediction/entities/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ void CCharacter::HandleTiles(int Index)
{
int MapIndex = Index;
m_TileIndex = Collision()->GetTileIndex(MapIndex);
m_TileFIndex = Collision()->GetFTileIndex(MapIndex);
m_TileFIndex = Collision()->GetFrontTileIndex(MapIndex);
m_MoveRestrictions = Collision()->GetMoveRestrictions(IsSwitchActiveCb, this, m_Pos);

// stopper
Expand Down Expand Up @@ -984,7 +984,7 @@ void CCharacter::DDRaceTick()
int Index = Collision()->GetPureMapIndex(m_Pos);
const int aTiles[] = {
Collision()->GetTileIndex(Index),
Collision()->GetFTileIndex(Index),
Collision()->GetFrontTileIndex(Index),
Collision()->GetSwitchType(Index)};
m_Core.m_IsInFreeze = false;
for(const int Tile : aTiles)
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/prediction/entities/dragger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void CDragger::LookForPlayersToDrag()
// Dragger beams can be created only for reachable, alive players
int IsReachable =
m_IgnoreWalls ?
!Collision()->IntersectNoLaserNW(m_Pos, pTarget->m_Pos, 0, 0) :
!Collision()->IntersectNoLaserNoWalls(m_Pos, pTarget->m_Pos, 0, 0) :
!Collision()->IntersectNoLaser(m_Pos, pTarget->m_Pos, 0, 0);
if(IsReachable)
{
Expand Down Expand Up @@ -109,7 +109,7 @@ void CDragger::DraggerBeamTick()
// When the dragger can no longer reach the target player, the dragger beam dissolves
int IsReachable =
m_IgnoreWalls ?
!Collision()->IntersectNoLaserNW(m_Pos, pTarget->m_Pos, 0, 0) :
!Collision()->IntersectNoLaserNoWalls(m_Pos, pTarget->m_Pos, 0, 0) :
!Collision()->IntersectNoLaser(m_Pos, pTarget->m_Pos, 0, 0);
if(!IsReachable || distance(pTarget->m_Pos, m_Pos) >= g_Config.m_SvDraggerRange)
{
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/race.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool CRaceHelper::IsStart(vec2 Prev, vec2 Pos) const
{
if(m_pGameClient->Collision()->GetTileIndex(Index) == TILE_START)
return true;
if(m_pGameClient->Collision()->GetFTileIndex(Index) == TILE_START)
if(m_pGameClient->Collision()->GetFrontTileIndex(Index) == TILE_START)
return true;
}
}
Expand All @@ -118,7 +118,7 @@ bool CRaceHelper::IsStart(vec2 Prev, vec2 Pos) const
const int Index = m_pGameClient->Collision()->GetPureMapIndex(Pos);
if(m_pGameClient->Collision()->GetTileIndex(Index) == TILE_START)
return true;
if(m_pGameClient->Collision()->GetFTileIndex(Index) == TILE_START)
if(m_pGameClient->Collision()->GetFrontTileIndex(Index) == TILE_START)
return true;
}
}
Expand Down
38 changes: 19 additions & 19 deletions src/game/collision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ int CCollision::GetMoveRestrictions(CALLBACK_SWITCHACTIVE pfnSwitchActive, void
}
else
{
Tile = GetFTileIndex(ModMapIndex);
Flags = GetFTileFlags(ModMapIndex);
Tile = GetFrontTileIndex(ModMapIndex);
Flags = GetFrontTileFlags(ModMapIndex);
}
Restrictions |= ::GetMoveRestrictions(d, Tile, Flags);
}
Expand Down Expand Up @@ -640,9 +640,9 @@ int CCollision::IsNoLaser(int x, int y) const
return (CCollision::GetTile(x, y) == TILE_NOLASER);
}

int CCollision::IsFNoLaser(int x, int y) const
int CCollision::IsFrontNoLaser(int x, int y) const
{
return (CCollision::GetFTile(x, y) == TILE_NOLASER);
return (CCollision::GetFrontTile(x, y) == TILE_NOLASER);
}

int CCollision::IsTeleport(int Index) const
Expand Down Expand Up @@ -969,7 +969,7 @@ int CCollision::GetTileIndex(int Index) const
return m_pTiles[Index].m_Index;
}

int CCollision::GetFTileIndex(int Index) const
int CCollision::GetFrontTileIndex(int Index) const
{
if(Index < 0 || !m_pFront)
return 0;
Expand All @@ -983,7 +983,7 @@ int CCollision::GetTileFlags(int Index) const
return m_pTiles[Index].m_Flags;
}

int CCollision::GetFTileFlags(int Index) const
int CCollision::GetFrontTileFlags(int Index) const
{
if(Index < 0 || !m_pFront)
return 0;
Expand Down Expand Up @@ -1027,14 +1027,14 @@ int CCollision::GetIndex(vec2 PrevPos, vec2 Pos) const
return -1;
}

int CCollision::GetFIndex(int Nx, int Ny) const
int CCollision::GetFrontIndex(int Nx, int Ny) const
{
if(!m_pFront)
return 0;
return m_pFront[Ny * m_Width + Nx].m_Index;
}

int CCollision::GetFTile(int x, int y) const
int CCollision::GetFrontTile(int x, int y) const
{
if(!m_pFront)
return 0;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ void CCollision::SetCollisionAt(float x, float y, int Index)
m_pTiles[Ny * m_Width + Nx].m_Index = Index;
}

void CCollision::SetDCollisionAt(float x, float y, int Type, int Flags, int Number)
void CCollision::SetDoorCollisionAt(float x, float y, int Type, int Flags, int Number)
{
if(!m_pDoor)
return;
Expand Down Expand Up @@ -1147,14 +1147,14 @@ int CCollision::IntersectNoLaser(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2
vec2 Pos = mix(Pos0, Pos1, a);
int Nx = clamp(round_to_int(Pos.x) / 32, 0, m_Width - 1);
int Ny = clamp(round_to_int(Pos.y) / 32, 0, m_Height - 1);
if(GetIndex(Nx, Ny) == TILE_SOLID || GetIndex(Nx, Ny) == TILE_NOHOOK || GetIndex(Nx, Ny) == TILE_NOLASER || GetFIndex(Nx, Ny) == TILE_NOLASER)
if(GetIndex(Nx, Ny) == TILE_SOLID || GetIndex(Nx, Ny) == TILE_NOHOOK || GetIndex(Nx, Ny) == TILE_NOLASER || GetFrontIndex(Nx, Ny) == TILE_NOLASER)
{
if(pOutCollision)
*pOutCollision = Pos;
if(pOutBeforeCollision)
*pOutBeforeCollision = Last;
if(GetFIndex(Nx, Ny) == TILE_NOLASER)
return GetFCollisionAt(Pos.x, Pos.y);
if(GetFrontIndex(Nx, Ny) == TILE_NOLASER)
return GetFrontCollisionAt(Pos.x, Pos.y);
else
return GetCollisionAt(Pos.x, Pos.y);
}
Expand All @@ -1167,7 +1167,7 @@ int CCollision::IntersectNoLaser(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2
return 0;
}

int CCollision::IntersectNoLaserNW(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const
int CCollision::IntersectNoLaserNoWalls(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const
{
float d = distance(Pos0, Pos1);
vec2 Last = Pos0;
Expand All @@ -1176,7 +1176,7 @@ int CCollision::IntersectNoLaserNW(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, ve
{
float a = (float)i / d;
vec2 Pos = mix(Pos0, Pos1, a);
if(IsNoLaser(round_to_int(Pos.x), round_to_int(Pos.y)) || IsFNoLaser(round_to_int(Pos.x), round_to_int(Pos.y)))
if(IsNoLaser(round_to_int(Pos.x), round_to_int(Pos.y)) || IsFrontNoLaser(round_to_int(Pos.x), round_to_int(Pos.y)))
{
if(pOutCollision)
*pOutCollision = Pos;
Expand All @@ -1185,7 +1185,7 @@ int CCollision::IntersectNoLaserNW(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, ve
if(IsNoLaser(round_to_int(Pos.x), round_to_int(Pos.y)))
return GetCollisionAt(Pos.x, Pos.y);
else
return GetFCollisionAt(Pos.x, Pos.y);
return GetFrontCollisionAt(Pos.x, Pos.y);
}
Last = Pos;
}
Expand All @@ -1205,18 +1205,18 @@ int CCollision::IntersectAir(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pO
{
float a = (float)i / d;
vec2 Pos = mix(Pos0, Pos1, a);
if(IsSolid(round_to_int(Pos.x), round_to_int(Pos.y)) || (!GetTile(round_to_int(Pos.x), round_to_int(Pos.y)) && !GetFTile(round_to_int(Pos.x), round_to_int(Pos.y))))
if(IsSolid(round_to_int(Pos.x), round_to_int(Pos.y)) || (!GetTile(round_to_int(Pos.x), round_to_int(Pos.y)) && !GetFrontTile(round_to_int(Pos.x), round_to_int(Pos.y))))
{
if(pOutCollision)
*pOutCollision = Pos;
if(pOutBeforeCollision)
*pOutBeforeCollision = Last;
if(!GetTile(round_to_int(Pos.x), round_to_int(Pos.y)) && !GetFTile(round_to_int(Pos.x), round_to_int(Pos.y)))
if(!GetTile(round_to_int(Pos.x), round_to_int(Pos.y)) && !GetFrontTile(round_to_int(Pos.x), round_to_int(Pos.y)))
return -1;
else if(!GetTile(round_to_int(Pos.x), round_to_int(Pos.y)))
return GetTile(round_to_int(Pos.x), round_to_int(Pos.y));
else
return GetFTile(round_to_int(Pos.x), round_to_int(Pos.y));
return GetFrontTile(round_to_int(Pos.x), round_to_int(Pos.y));
}
Last = Pos;
}
Expand All @@ -1238,7 +1238,7 @@ int CCollision::IsTimeCheckpoint(int Index) const
return -1;
}

int CCollision::IsFTimeCheckpoint(int Index) const
int CCollision::IsFrontTimeCheckpoint(int Index) const
{
if(Index < 0 || !m_pFront)
return -1;
Expand Down
18 changes: 9 additions & 9 deletions src/game/collision.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ class CCollision

// DDRace
void SetCollisionAt(float x, float y, int Index);
void SetDCollisionAt(float x, float y, int Type, int Flags, int Number);
void SetDoorCollisionAt(float x, float y, int Type, int Flags, int Number);
void GetDoorTile(int Index, CDoorTile *pDoorTile) const;
int GetFCollisionAt(float x, float y) const { return GetFTile(round_to_int(x), round_to_int(y)); }
int GetFrontCollisionAt(float x, float y) const { return GetFrontTile(round_to_int(x), round_to_int(y)); }
int IntersectNoLaser(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const;
int IntersectNoLaserNW(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const;
int IntersectNoLaserNoWalls(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const;
int IntersectAir(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision) const;
int GetIndex(int x, int y) const;
int GetIndex(vec2 PrevPos, vec2 Pos) const;
int GetFIndex(int x, int y) const;
int GetFrontIndex(int x, int y) const;

int GetMoveRestrictions(CALLBACK_SWITCHACTIVE pfnSwitchActive, void *pUser, vec2 Pos, float Distance = 18.0f, int OverrideCenterTileIndex = -1) const;
int GetMoveRestrictions(vec2 Pos, float Distance = 18.0f) const
Expand All @@ -71,7 +71,7 @@ class CCollision
}

int GetTile(int x, int y) const;
int GetFTile(int x, int y) const;
int GetFrontTile(int x, int y) const;
int Entity(int x, int y, int Layer) const;
int GetPureMapIndex(float x, float y) const;
int GetPureMapIndex(vec2 Pos) const { return GetPureMapIndex(Pos.x, Pos.y); }
Expand All @@ -81,9 +81,9 @@ class CCollision
bool TileExistsNext(int Index) const;
vec2 GetPos(int Index) const;
int GetTileIndex(int Index) const;
int GetFTileIndex(int Index) const;
int GetFrontTileIndex(int Index) const;
int GetTileFlags(int Index) const;
int GetFTileFlags(int Index) const;
int GetFrontTileFlags(int Index) const;
int IsTeleport(int Index) const;
int IsEvilTeleport(int Index) const;
bool IsCheckTeleport(int Index) const;
Expand All @@ -103,10 +103,10 @@ class CCollision
bool IsHookBlocker(int x, int y, vec2 Pos0, vec2 Pos1) const;
int IsWallJump(int Index) const;
int IsNoLaser(int x, int y) const;
int IsFNoLaser(int x, int y) const;
int IsFrontNoLaser(int x, int y) const;

int IsTimeCheckpoint(int Index) const;
int IsFTimeCheckpoint(int Index) const;
int IsFrontTimeCheckpoint(int Index) const;

int MoverSpeed(int x, int y, vec2 *pSpeed) const;

Expand Down
14 changes: 7 additions & 7 deletions src/game/server/entities/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1380,10 +1380,10 @@ void CCharacter::HandleSkippableTiles(int Index)
Collision()->GetCollisionAt(m_Pos.x + GetProximityRadius() / 3.f, m_Pos.y + GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetCollisionAt(m_Pos.x - GetProximityRadius() / 3.f, m_Pos.y - GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetCollisionAt(m_Pos.x - GetProximityRadius() / 3.f, m_Pos.y + GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFCollisionAt(m_Pos.x + GetProximityRadius() / 3.f, m_Pos.y - GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFCollisionAt(m_Pos.x + GetProximityRadius() / 3.f, m_Pos.y + GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFCollisionAt(m_Pos.x - GetProximityRadius() / 3.f, m_Pos.y - GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFCollisionAt(m_Pos.x - GetProximityRadius() / 3.f, m_Pos.y + GetProximityRadius() / 3.f) == TILE_DEATH) &&
Collision()->GetFrontCollisionAt(m_Pos.x + GetProximityRadius() / 3.f, m_Pos.y - GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFrontCollisionAt(m_Pos.x + GetProximityRadius() / 3.f, m_Pos.y + GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFrontCollisionAt(m_Pos.x - GetProximityRadius() / 3.f, m_Pos.y - GetProximityRadius() / 3.f) == TILE_DEATH ||
Collision()->GetFrontCollisionAt(m_Pos.x - GetProximityRadius() / 3.f, m_Pos.y + GetProximityRadius() / 3.f) == TILE_DEATH) &&
!m_Core.m_Super && !m_Core.m_Invincible && !(Team() && Teams()->TeeFinished(m_pPlayer->GetCid())))
{
if(Team() && Teams()->IsPractice(Team()))
Expand Down Expand Up @@ -1506,7 +1506,7 @@ void CCharacter::HandleTiles(int Index)
int MapIndex = Index;
//int PureMapIndex = Collision()->GetPureMapIndex(m_Pos);
m_TileIndex = Collision()->GetTileIndex(MapIndex);
m_TileFIndex = Collision()->GetFTileIndex(MapIndex);
m_TileFIndex = Collision()->GetFrontTileIndex(MapIndex);
m_MoveRestrictions = Collision()->GetMoveRestrictions(IsSwitchActiveCb, this, m_Pos, 18.0f, MapIndex);
if(Index < 0)
{
Expand All @@ -1516,7 +1516,7 @@ void CCharacter::HandleTiles(int Index)
return;
}
SetTimeCheckpoint(Collision()->IsTimeCheckpoint(MapIndex));
SetTimeCheckpoint(Collision()->IsFTimeCheckpoint(MapIndex));
SetTimeCheckpoint(Collision()->IsFrontTimeCheckpoint(MapIndex));
int TeleCheckpoint = Collision()->IsTeleCheckpoint(MapIndex);
if(TeleCheckpoint)
m_TeleCheckpoint = TeleCheckpoint;
Expand Down Expand Up @@ -2127,7 +2127,7 @@ void CCharacter::DDRaceTick()
int Index = Collision()->GetPureMapIndex(m_Pos);
const int aTiles[] = {
Collision()->GetTileIndex(Index),
Collision()->GetFTileIndex(Index),
Collision()->GetFrontTileIndex(Index),
Collision()->GetSwitchType(Index)};
m_Core.m_IsInFreeze = false;
for(const int Tile : aTiles)
Expand Down
4 changes: 2 additions & 2 deletions src/game/server/entities/door.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ void CDoor::ResetCollision()
{
vec2 CurrentPos(m_Pos.x + (m_Direction.x * i),
m_Pos.y + (m_Direction.y * i));
if(GameServer()->Collision()->CheckPoint(CurrentPos) || GameServer()->Collision()->GetTile(m_Pos.x, m_Pos.y) || GameServer()->Collision()->GetFTile(m_Pos.x, m_Pos.y))
if(GameServer()->Collision()->CheckPoint(CurrentPos) || GameServer()->Collision()->GetTile(m_Pos.x, m_Pos.y) || GameServer()->Collision()->GetFrontTile(m_Pos.x, m_Pos.y))
break;
else
GameServer()->Collision()->SetDCollisionAt(
GameServer()->Collision()->SetDoorCollisionAt(
m_Pos.x + (m_Direction.x * i),
m_Pos.y + (m_Direction.y * i), TILE_STOPA, 0 /*Flags*/,
m_Number);
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/entities/dragger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void CDragger::LookForPlayersToDrag()
// Dragger beams can be created only for reachable, alive players
int IsReachable =
m_IgnoreWalls ?
!GameServer()->Collision()->IntersectNoLaserNW(m_Pos, pTarget->m_Pos, 0, 0) :
!GameServer()->Collision()->IntersectNoLaserNoWalls(m_Pos, pTarget->m_Pos, 0, 0) :
!GameServer()->Collision()->IntersectNoLaser(m_Pos, pTarget->m_Pos, 0, 0);
if(IsReachable && pTarget->IsAlive())
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/entities/dragger_beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void CDraggerBeam::Tick()
// When the dragger can no longer reach the target player, the dragger beam dissolves
int IsReachable =
m_IgnoreWalls ?
!GameServer()->Collision()->IntersectNoLaserNW(m_Pos, pTarget->m_Pos, 0, 0) :
!GameServer()->Collision()->IntersectNoLaserNoWalls(m_Pos, pTarget->m_Pos, 0, 0) :
!GameServer()->Collision()->IntersectNoLaser(m_Pos, pTarget->m_Pos, 0, 0);
if(!IsReachable ||
distance(pTarget->m_Pos, m_Pos) >= g_Config.m_SvDraggerRange || !pTarget->IsAlive())
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/entities/laser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void CLaser::DoBounce()
else if(m_Owner >= 0)
{
int MapIndex = GameServer()->Collision()->GetPureMapIndex(Coltile);
int TileFIndex = GameServer()->Collision()->GetFTileIndex(MapIndex);
int TileFIndex = GameServer()->Collision()->GetFrontTileIndex(MapIndex);
bool IsSwitchTeleGun = GameServer()->Collision()->GetSwitchType(MapIndex) == TILE_ALLOW_TELE_GUN;
bool IsBlueSwitchTeleGun = GameServer()->Collision()->GetSwitchType(MapIndex) == TILE_ALLOW_BLUE_TELE_GUN;
int IsTeleInWeapon = GameServer()->Collision()->IsTeleportWeapon(MapIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/entities/projectile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void CProjectile::Tick()
((m_Type == WEAPON_GRENADE && pOwnerChar->HasTelegunGrenade()) || (m_Type == WEAPON_GUN && pOwnerChar->HasTelegunGun())))
{
int MapIndex = GameServer()->Collision()->GetPureMapIndex(pTargetChr ? pTargetChr->m_Pos : ColPos);
int TileFIndex = GameServer()->Collision()->GetFTileIndex(MapIndex);
int TileFIndex = GameServer()->Collision()->GetFrontTileIndex(MapIndex);
bool IsSwitchTeleGun = GameServer()->Collision()->GetSwitchType(MapIndex) == TILE_ALLOW_TELE_GUN;
bool IsBlueSwitchTeleGun = GameServer()->Collision()->GetSwitchType(MapIndex) == TILE_ALLOW_BLUE_TELE_GUN;

Expand Down
10 changes: 5 additions & 5 deletions src/game/server/gamemodes/DDRace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void CGameControllerDDRace::HandleCharacterTiles(CCharacter *pChr, int MapIndex)
const int ClientId = pPlayer->GetCid();

int TileIndex = GameServer()->Collision()->GetTileIndex(MapIndex);
int TileFIndex = GameServer()->Collision()->GetFTileIndex(MapIndex);
int TileFIndex = GameServer()->Collision()->GetFrontTileIndex(MapIndex);

//Sensitivity
int S1 = GameServer()->Collision()->GetPureMapIndex(vec2(pChr->GetPos().x + pChr->GetProximityRadius() / 3.f, pChr->GetPos().y - pChr->GetProximityRadius() / 3.f));
Expand All @@ -45,10 +45,10 @@ void CGameControllerDDRace::HandleCharacterTiles(CCharacter *pChr, int MapIndex)
int Tile2 = GameServer()->Collision()->GetTileIndex(S2);
int Tile3 = GameServer()->Collision()->GetTileIndex(S3);
int Tile4 = GameServer()->Collision()->GetTileIndex(S4);
int FTile1 = GameServer()->Collision()->GetFTileIndex(S1);
int FTile2 = GameServer()->Collision()->GetFTileIndex(S2);
int FTile3 = GameServer()->Collision()->GetFTileIndex(S3);
int FTile4 = GameServer()->Collision()->GetFTileIndex(S4);
int FTile1 = GameServer()->Collision()->GetFrontTileIndex(S1);
int FTile2 = GameServer()->Collision()->GetFrontTileIndex(S2);
int FTile3 = GameServer()->Collision()->GetFrontTileIndex(S3);
int FTile4 = GameServer()->Collision()->GetFrontTileIndex(S4);

const int PlayerDDRaceState = pChr->m_DDRaceState;
bool IsOnStartTile = (TileIndex == TILE_START) || (TileFIndex == TILE_START) || FTile1 == TILE_START || FTile2 == TILE_START || FTile3 == TILE_START || FTile4 == TILE_START || Tile1 == TILE_START || Tile2 == TILE_START || Tile3 == TILE_START || Tile4 == TILE_START;
Expand Down

0 comments on commit 36568ec

Please sign in to comment.