Snarkpit Articles


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.

Pointfile


pros:

easy to use

cons:
slow to do
geometry leaks only
may not find leak
may cause PC crash!

This method involves running Half-Life and telling it to point out the leak to you.
  1. 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.
  2. 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.
  3. 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.
  4. Open your map from the console (with the map MAPNAME command)
  5. 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)
  6. 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.

Block method


pros
finds any single leak

cons
tedious
not for multiple leaks

This method involves finding really annoying leaks that pointfile may have missed.
  1. Place a huge block over half of the level and compile with QCSG and QBSP2 only
  2. 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.
  3. Repeat process until you're using a very small block (e.g. 32 X 32 X 32)
  4. Search for the leak using the 3D window
  5. 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!



Post ReplyView Topic
Discussion
0 starsPosted by Guessmyname on Wed Dec 22nd 2004 at 1:39pm

0 starsPosted by $loth on Fri May 21st 2004 at 1:08pm

Great tut lep, it just helped me with my hogwarts map /me gives lep a salute
0 starsPosted by OtZman on Sun Apr 11th 2004 at 6:05pm

Wow, simpel but good. A pointfile just saved me from pain and eternal madness. Everyone should read this tut!!
0 starsPosted by fishy on Tue Mar 16th 2004 at 12:43pm

i dont know if the 'load pointfile' option was any different before 3.4, but since i found it, i haven't had to run halflife to find a leak.
i think its a great tool.
0 starsPosted by Sinner_D on Wed Oct 1st 2003 at 9:49am

another thing ive noticed, when changing the shape of a brush, i often forget that i vertexed the end to save on faces visable, but that can lead to leaks if your not careful.

Great tut!!! and im not just kissing azz :P
0 starsPosted by Dred_furst on Wed Sep 3rd 2003 at 7:39pm

Nevr new what the pointfile did before smiley
Great tut, i got a leak, its really annoying
0 starsPosted by Vash on Fri Aug 29th 2003 at 5:35pm

Very Good Tutorial(and first comment on SP4)
Post ReplyView Topic