During mapping, you may inadvertently leave holes that lead outside of the map into the void. These are known as leaks. You will not be able to properly compile and vis your map until it is fully sealed from the void.
Your QBSP tool already has some functionality built in that facilitates in finding leaks, but there is an editor side as well. When QBSP detects a leak, it generates a 'pointfile'. This is a file with the .pts extension and provides a way for a map editor to communicate the QBSP tool's findings. In order to make use of this file, you must place it alongside the map file as it is loaded in Trenchbroom, so if you have a separate folder where you compile your maps, you will need to copy the .pts file back into the map folder. Once this is done, use the Load Pointfile command () and Trenchbroom will draw a line which will help you find where the leak in your map is. You can use the and commands to navigate the camera along the line.
If you open the file menu again, you will notice that the command has been replaced with the command. You can use this command to reload the pointfile after making changes to your map and recompiling.
Once all leaks have been closed and you are done with the pointfile line, you can use the Unload Pointfile command () to stop displaying the line in the editor.
When loading a map that was made in another editor, you may see this error: Skipping malformed brush at line # where # is a line number in the map file. This means Trenchbroom was unable to parse a particular line in the map file and therefore skipped the brush entirely. Check the map file at the line in question to find out the brush number and then see if you can load the brush into another editor to be sure that it is correct.
During the course of editing, you may end up with vertices which have non-integer coordinates. Sometimes this will be intentional, where you disabled grid snap, and other times it could be a product of floating point imprecision on the part of the editor. Regardless, there will be times when you want to snap the vertices of a brush to integer coordinates or in other words, the round off the vertex coordinates of a brush or multiple brushes. Trenchbroom provides this functionality in two ways: Correct Vertices and Snap Vertices.
Accessible through the menu with: , this command is aimed primarily at correcting floating point imprecisions. It will snap vertices to integer coordinates in the current selection if they are less than 0.002 units off.
Accessible through the menu with: , this command will snap vertices in the current selection to integer coordinates no matter their offsets.
Note that both these functions work with multiple brushes in the selection, but they are unavailable if entities are selected.
TrenchBroom makes automatic backups of your map roughly every 5 minutes. This protects you from losing a lot of work if the editor crashes. You can find the backup map files in the sub folder autosave within the folder where your map file is stored. The backups are numbered in ascending order, i.e. the latest backup is the one with highest number.