Leaks- the very mention of them can strike terror into the heart of many an inexperienced mapper... but fear not, as this page will show yoau the best known methods of finding and fixing these pesky things. Leaks are simply holes in your map; the problem is that a point based entity can 'touch' the empty void that you're making your map in. If this happens, then you'll be able to see outside your map, so the void won't be filled- and since VIS won't run, then you'll be able to see everything in your map in the direction that you're looking. This inevitably means bad r_speeds!
First of all, make sure you're not making leaks as you go along. Don't leave holes in your map and think to yourself, "oh I'll fix that later"- do it
now before you forget. Common mistakes are to-
- Leave holes when placing the SKY brushes around your level
- Not quite fit together vertex manipulated or clipped objects (e.g. rock faces)
- Forget about underwater regions
- Not put a solid wall behind a func_ entity (e.g. func_wall or func_door)
- Leave a point entity (e.g. a track entity) outside the level
Nonetheless, leaks will still happen, and thankfully there are several easy ways of finding and repairing them.
<table align=center border="0" style="border-collapse: collapse; font-size:8pt" bordercolor="#111111" width="95%" cellpadding="2" cellspacing="0">
<tr>
<td width="20%" bgcolor="#333333"><p align="center">
Pointfile</td>
<td width="80%" bgcolor="#333333"></td>
</tr>
<tr>
<td width="20%" valign="top">
pros:
easy to use
<p align="left">
cons:
slow to do
geometry leaks only
may not find leak
may cause PC crash!</td>
<td width="80%">This method involves running Half-Life and telling it to point out the leak to you.
- Run CSG and BSP programs only on your map. Then copy your map's BSP and PTS file into the game's map folder (e.g. [mapname].bsp and [mapname].pts copied into valve/maps dir for a Half-Life map). Make sure that a leak is the only problem with your map.
- Start Half-Life from an MS-DOS window by using the following commands when in the Half-Life directory:
hl.exe -console -dev -particles 80000 +sv_cheats 1
(an alternative way is merely to run Half-Life through the WC process window with the -particles 80000 command!)
This will load up 80000 'particles' for the game to trace your leak (this number can be higher/lower depending on your system and/or map size, but you shouldn't ever need more than this), and turn on cheats so you can noclip around the level.</li>
- I recommend reducing the screen resolution (to 640 X 480 or less) as drawing all the particles will slow your machine down, and may cause it to crash if the load is too great.
- Open your map from the console (with the map MAPNAME command)
- Once open, type into the console pointfile. This will cause Half-Life to draw lots of lines of particles. If it says "not enough free particles," then go back to step 2 and put in a number greater than what you used before for the -particles command. If 0 particles are loaded up, then either you haven't carried out one of the steps properly, your leak is caused by an entity outside the level, or your compilers aren't working! (ZHLT 2.5 doesn't seem to create a pointfile)
- Type into the console god and noclip. Follow the lines until they "exit" your level- it's probably easier if you find the beginning/end of the line and follow it from there.
Once you've found where the leak is, just plug it up back in Worldcraft and recompile. Note that you can load the pointfile into Worldcraft, but it's useless.
</td>
</tr>
<tr>
<td bgcolor="#333333">
<p align="center">
Block method</td>
<td bgcolor="#333333"></td>
</tr>
<tr>
<td width="20%" valign="top">
pros
finds any single leak
cons
tedious
not for multiple leaks</td>
<td width="80%">
This method involves finding really annoying leaks that pointfile may have missed.
- Place a huge block over half of the level and compile with QCSG and QBSP2 only
- If QBSP2 tells you you have a leak, it's in the region that you didn't cover up- repeat step 1. If you still have a leak, then you probably have several of them... pointfile should locate these for you. If not, then carry on with this process, but use multiple blocks.
- Repeat process until you're using a very small block (e.g. 32 X 32 X 32)
- Search for the leak using the 3D window
- Then you can copy the immediate region of the map (block off corridors etc.) into a new map and do the pointfile thing on it.
For this method to work, make sure your info_player_start isn't underneath the big block!</td>
</tr>
</table>