Fix 'LEAK in hull 0': Reading the Pointfile in CS 1.6 Maps

May 21, 2025 Daemon666 7 min read 19 преглеждания

You hit compile, the console scrolls, and near the end you see LEAK in hull 0 followed by a warning that VIS and RAD were skipped. Your map still runs, but it is fullbright, unlit and renders the entire level at once because visibility was never calculated. A leak is not a cosmetic bug — it stops the toolchain dead. The good news is that the compiler hands you an exact line to the hole; you just have to know how to read it.

1. Understand what a leak is

The HLDS engine needs the playable space to be completely sealed from the "void" — the empty outside of the map. During the hlbsp stage the compiler floods the void with a fill and checks whether that fill can reach any entity. If it can, there is a gap connecting the inside to the outside, and you get:

Warning: === LEAK in hull 0 ===
Entity info_player_start @ (  -320,   512,   -32)
A LEAK is a hole in the map, where the inside of it is exposed to the
(unwanted) outside region.

The critical detail people miss: only world brushes seal a map. A brush that has been tied to an entity — func_wall, func_detail, func_door, a trigger — is invisible to the sealing pass. If your outer shell is a func_ anything, the map leaks no matter how solid it looks.

2. Read the entity in the error

The leak line always starts at an entity, because the fill reached that entity through the hole. The compiler names it and gives its coordinates. That entity is not the problem — it is simply the closest thing the void could touch. Note the name (info_player_start, a light, an armoury_entity) so you can find it in the editor, then follow the trail from there.

3. Load the pointfile in the editor

Every leaked compile writes two files next to your .map: a plain-text mapname.pts and a mapname.lin for modern editors. The line traces the shortest path from the leaked entity, through the hole, out into the void. In J.A.C.K. or Hammer, open the map, then use Map → Load Pointfile. A red (or white) line appears in the 2D and 3D views.

mymap.pts   <- text list of XYZ points, one per line
mymap.lin   <- binary line file J.A.C.K./Hammer load automatically

Follow the line from the entity until it passes through a wall, floor or corner and exits into empty space. Where it crosses the shell is your hole. Zoom the 2D grid there and look for the gap.

4. Load the pointfile in-game

If the leak is subtle, run the (fullbright) map on your test server and use the client command to draw the same line inside the engine:

developer 1
pointfile

The engine loads maps/mapname.pts and draws the trail as a string of dots you can physically walk along until you reach the wall it passes through. This is often faster than eyeballing the 2D grid, because you see the exact brush at eye level.

5. Common causes and fixes

  • An entity is outside the map. A stray light or spawn dragged into the void will always "leak" because it is literally in the outside. Delete or move it back in.
  • The outer shell is an entity. A wall you tied to func_wall to make it non-solid-seal. Un-tie outer brushes back to world (To World), or wrap the level in a world-brush box.
  • A gap between brushes. Two walls that look flush but have a hairline gap from off-grid vertices. Snap everything to a sane grid (8 or 16 units) and rebuild the corner.
  • Carve/clip damage. The carve tool leaves micro-gaps. Avoid carve for structural geometry; build walls as explicit brushes.
Do not "fix" a leak by dropping a giant box around the whole level (the "skybox hug"). It seals the error but fills the void with playable space, which cripples VIS and tanks your FPS. Seal the actual hole.

Troubleshooting

  • No pointfile appears. You loaded the .map from a different folder than the one that compiled. The .pts/.lin sit beside the compiled output; point the editor at that directory.
  • pointfile does nothing in-game. The .pts is not in cstrike/maps/ next to the .bsp, or you are on a different map. Copy it in and reload the map.
  • Fixed one leak, now a second appears. Normal — hlbsp reports the first hole it finds. Seal it, recompile, repeat until the leak warning is gone.
  • Map still fullbright after sealing. The leak is gone but you recompiled without VIS/RAD, or you have no light entities at all. Re-run the full toolchain — see the compile parameters guide.

Verification

Recompile and watch the console. A sealed map runs hlvis and hlrad to completion with no leak warning, and the run ends with a chart of clusters and light data rather than "VIS skipped". Load the map, confirm it is lit and that only nearby geometry renders. Once it seals cleanly, tune your final compile with the VHLT parameter reference, and if you are still learning the layout side, start from making your first CS 1.6 map.

Сътрудници: Daemon666 ✦
Сподели: