private static bool IsCoordSafe(Player player, CoordS currentCoord, CoordF closestCoord)
 {
     // Check if current coord is safe to be used as a return point when the character falls off the map
     return(MapMetadataStorage.BlockExists(player.MapId, closestCoord.ToShort()) &&
            !player.OnAirMount && (player.SafeBlock - closestCoord).Length() > 350 &&
            player.FieldPlayer.Coord.Z == currentCoord.Z);
 }
示例#2
0
 private static bool IsCoordSafe(GameSession session, CoordS currentCoord, CoordF closestCoord)
 {
     // Save last coord if player is not falling and not in a air mount
     return(MapMetadataStorage.BlockExists(session.Player.MapId, closestCoord.ToShort()) &&
            !session.Player.OnAirMount &&
            (session.Player.SafeBlock - closestCoord).Length() > 350 &&
            session.FieldPlayer.Coord.Z == currentCoord.Z);
 }