Finding & fixing leaks
By Iceman
Leaks- the thing that can couz mappers to comit crimes. (joke) But do not fear, this tutorial will show you the best known methods of finding and fixing these nasty leaks. Leaks are simply holes in your map, where a point based entity can touch the empty space that you're making your map in. If this happens, then you'll be able to see outside your map, so the space won't be filled- and VIS won't run, then you'll be able to see everything in your map in the direction that you're looking. To see out in empty space means VERY bad r_speeds!
Index
How to avoid LEAKS
Pointfile
Block method
Comments
Latest Comment
How to avoid leaks
First of all, make sure you're not making leaks as you go along with your map. Don't leave holes in your map and think, "oh I'll fix that later" Move your lazy ass and do it right now. I'll gurantee that you will forget. Common mistakes are as below... ->
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
Of course will leaks allways exist, and of corce will allways different methods to find and repair your leaks....
Pointfile This method involves running Half-Life and telling it to point out the leak to you.
| PROS
| CONS
|
|---|
| Easy to use | Slow to do
geometry leaks only
may not find leak
may cause PC crash!
|
Run CSG and BSP programs only on your map. Then copy your map's BSP and PTS file into the game's map folder (ex. [mapname].bsp and [mapname].pts copied into valve/maps dir for a Half-Life map). Make sure that the leak is the only error that you get on your map when you complie.
Start Half-Life from an MS-DOS window by using the following commands when you are in the Half-Life directory:
hl.exe -console -dev -particles 80000 +sv_cheats 1
(an alternative way is to run Half-Life through the WC process window but with the -particles 80000 command)
This will load up 80000 particles (this number can be highered/lowered depending on your system and/or your map size, but you shouldn't need more than 80000). Remember to turn on cheats mode so you can use the noclip cheat and "cruise" around.
I recommend that you reduce the screen resolution (to 640 X 480 or less) as Half-Life drawes all the particles that 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 changemap command)
Once the map is open, type pointfile in the console. 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 done one of the steps properly, your leak may be 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". It's easier if you find the beginning/end of the line and follow it from there.
Once you've found where the leak is, just fire up Worldcraft and fix it.
NOTE You can load the pointfile into Worldcraft (or better Valve Hammer Editor), but it's much harder...
Block method This method involves finding really annoying leaks that pointfile may have missed.
| PROS
| CONS
| Find any single leak | Not for multiple leaks
| |
|---|
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 have several of different leaks... but the pointfile method should locate these for you. If not, then continue on with this process, but use multiple blocks.
Repeat process until you're using a very small block (ex. 32 X 32 X 32)
Search for the leak using the 3D window
Then you can copy parts of the map (block off corridors etc.) into a new map and (complie to see if the leak/leaks was there) or do the pointfile thing again.
To get this method to work, you might have to move the info_player_start entity so it's not under the block...
Back
Last updated 9th of june 2003- Copyright www.egir.dk
|