When starting out making maps most new mappers soon experience having a LEAK. They see something like this in their compile log:
Warning: === LEAK in hull 0 ===
Entity info_player_start @ ( 129,-384, 121)
Error:
A LEAK is a hole in the map, where the inside of it is exposed to the
(unwanted) outside region. The entity listed in the error is just a helpful
indication of where the beginning of the leak pointfile starts, so the
beginning of the line can be quickly found and traced to until reaching the
outside. Unless this entity is accidentally on the outside of the map, it
probably should not be deleted. Some complex rotating objects entities need
their origins outside the map. To deal with these, just enclose the origin
brush with a solid world brush
Leak pointfile generated
The error itself actually describes what a leak is, so I am not going to concern that in this tutorial. The big problem about leaks is finding them. It is here that a very nice tool by Martin Gustafsson comes in. The tool is called Leak Marker and can be downloaded from THIS LINK (original link was dead). What it does is simply marking your leak with a red box so that you can easially find it within hammer. Install
Installing the tool is quite simple. Extract the downloaded zip file into a directory that you can remember. This is so painfully simple I don't understand why I am even writing this paragraph. A Map with a Leak
For this tutorial I have just made a tiny map with an intentional Leak for the sake of demonstration. You can see a hammer screenshot of the map below.
Note that I have made some ugly vertex manipulation resulting in a leak in the roof.
When I try to compile my compile log ends up looking like the following: LOG
This indicates that there is a leak, as the LEAK warning I introduced in the introduction is appearing in the compile log. Such a leak makes the map looks like the following in game:
This is UGLY, the map is full bright. We don't want maps to be that!
Using LeakMarker
When you have compiled and the compile log shows the above mentioned LEAK error you are ready to use LeakMarker.
During the compile, Hammer will have exported your map as a .MAP file. My example map is called skytest.rmf so the exported .MAP file is called skytest.map. We will need this .MAP file when using LeakMarker.
In the directory where you extracted Leafmarker, start the LeafMarker application, by double clicking it:
LeakMarker looks like this:
Click "Select Files"
Browse to the folder you saved your .rmf that has the leak, and choose the .LIN file (1). Then press OK (2):
The next window that appears is just similar, except now you should select the .MAP file (1), and then press OK (2).
You will now notice that both a LeakFile and a MapFile has been selected, as marked with the two small orange arrows below. Press "Mark Leak" to mark the leak in the .MAP file.
A sound should play indicateting success, and the following windows hould appear.
Press OK and close LeafMarker.
Open Hammer and open the menu "File" and choose "Open..." as shown below
In the Files of type drop down box choose "Game Maps (*.map)" (1); then select your .MAP file (2) and finally click OK (3). Numbers refer to the following screenshot:
Take a flight around in your map, and you will notice a huge red brush that wasn't there before:
Marking this brush and pressing CTRL+E will make all windows center on the brush. And as you can see below, the brush indeed marks the leak that I intentionally made for the sake of demonstration:
Hoorah, never again will a "My map won't compile" post appear in my forums because of a leak, as the cure for that has been presented above.