diff --git a/src/game/client/prediction/entities/character.cpp b/src/game/client/prediction/entities/character.cpp index a3369651b29..69d41eddaff 100644 --- a/src/game/client/prediction/entities/character.cpp +++ b/src/game/client/prediction/entities/character.cpp @@ -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 @@ -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) diff --git a/src/game/client/prediction/entities/dragger.cpp b/src/game/client/prediction/entities/dragger.cpp index 24c35f290e5..f268d9e6b44 100644 --- a/src/game/client/prediction/entities/dragger.cpp +++ b/src/game/client/prediction/entities/dragger.cpp @@ -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) { @@ -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) { diff --git a/src/game/client/race.cpp b/src/game/client/race.cpp index 2b5c5f4ef6b..1d86da27c1c 100644 --- a/src/game/client/race.cpp +++ b/src/game/client/race.cpp @@ -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; } } @@ -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; } } diff --git a/src/game/collision.cpp b/src/game/collision.cpp index dcc7beac352..20ee5f188d9 100644 --- a/src/game/collision.cpp +++ b/src/game/collision.cpp @@ -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); } @@ -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 @@ -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; @@ -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; @@ -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; @@ -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; @@ -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); } @@ -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; @@ -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; @@ -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; } @@ -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; } @@ -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; diff --git a/src/game/collision.h b/src/game/collision.h index 17913275196..fef1b673a8b 100644 --- a/src/game/collision.h +++ b/src/game/collision.h @@ -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 @@ -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); } @@ -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; @@ -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; diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 0a16aeca018..13205acb563 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -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())) @@ -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) { @@ -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; @@ -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) diff --git a/src/game/server/entities/door.cpp b/src/game/server/entities/door.cpp index c0ad7b0f8b4..e21915f33ef 100644 --- a/src/game/server/entities/door.cpp +++ b/src/game/server/entities/door.cpp @@ -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); diff --git a/src/game/server/entities/dragger.cpp b/src/game/server/entities/dragger.cpp index 0993d01d352..9816eda140e 100644 --- a/src/game/server/entities/dragger.cpp +++ b/src/game/server/entities/dragger.cpp @@ -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()) { diff --git a/src/game/server/entities/dragger_beam.cpp b/src/game/server/entities/dragger_beam.cpp index 5dace37f676..91e4588efd4 100644 --- a/src/game/server/entities/dragger_beam.cpp +++ b/src/game/server/entities/dragger_beam.cpp @@ -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()) diff --git a/src/game/server/entities/laser.cpp b/src/game/server/entities/laser.cpp index ba15d94f5ac..ce535d20e91 100644 --- a/src/game/server/entities/laser.cpp +++ b/src/game/server/entities/laser.cpp @@ -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); diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index c2bdac75fd6..7331e6db066 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -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; diff --git a/src/game/server/gamemodes/DDRace.cpp b/src/game/server/gamemodes/DDRace.cpp index a2959a885d0..7baa0f64fac 100644 --- a/src/game/server/gamemodes/DDRace.cpp +++ b/src/game/server/gamemodes/DDRace.cpp @@ -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)); @@ -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;