Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to fix those leaks - A Tutorial for Counter-Strike 1.6

Have a leak in your map? Read this!

This tutorial was made for J.A.C.K., but almost every method described here will work with Hammer 3.x.x and Sledge Editor.
One method where some features are J.A.C.K.-only also contains a workaround, so do not worry.

The tutorial is not really step-by-step, but rather made with a "problem and solution" approach.

Seriously, leaks are simply too annoying. Imagine yourself trying to wash your hands and then the pipes start leaking water in your bathroom.

That's pretty much what mapping leaks are. The compilers are working to compile the map, but there's a big problem: the hulls are leaking.

Simply put, a leak is a hole in the map where the contents of the map are exposed to the so-called void.

Well, before we start fixing them, we need to recognise leaks.
Leaks can be caused by a handful of errors. I'll list some of them and then give a solution.

When the compilers discover a leak, they will produce a .pts file (i.e. a pointfile) which will try to assist you in finding the leak.
It's basically a lot of connected 3D lines and they should go through the leak itself at one point.

Tip: In the 3D view, click any brush, then press Escape.
After that, press Shift+Z, and then press Z and move with the WASD keys.
That's a much easier way to follow the lines (i.e. with the mouse) rather than using the arrow keys to look.
When you want to return, press Z and Shift+Z again.

The first type of leaks would be placing specific entities outside of the map.

1. Light outside the map

Basically, if you'd place a light into the void, the compilers would expect that it's a useable area, some place where they need to calculate visibility and/or lightmaps.
But no, it's the void. There's nothing to do in the void.
The reason behind this type of leak is the fact that you just can't calculate lighting in the void. The void is seemingly infinite, and it would be a big problem.

Solution: Please, do not place your light entities outside the map:

Always keep them inside. :)

I've made an example map for this tutorial to take the screenshots (the map extremely lacks detail, but it's leaks what we're looking for, not detail.

2. Tiny gap

This is a very popular cause for leaks. Let's see an example:

The solution for this specific scenario is a simple VM tool tweak:

Then press Shift+S to return to the Select tool.

We have another scenario:

You can see a teeny, tiny gap between the brushes.

This is what happens when you don't use the snap-on-grid function.
Solution: Just nudge it downwards.

Since this is a skybox, I'll advise you to never literally make a hollow cube around the map. NEVER.
Always try wrapping the sky brushes around that area where they are needed.

3. Invalid brushes

Invalid brushes usually get removed by the compilers, and the map becomes as if some brushes weren't even there.

This might be a reason why the leak line goes straight through a brush.
You might think that the compilers have gone crazy, right?

Well, it's because of this:

Why are my brushes like that?

Do not click Fix. Don't.

As you can see, I have moved the vertexes for some reason. There are many reasons to move vertexes like that (e.g. when doing the brushwork for caves), so you might do something like this someday.

This is also why many people avoid the VM tool. The truth is, they don't know how to use it properly.

I'll also give a small explanation of the "face is not planar" error:
This is simple geometry. A face occupies a plane. But if you move a vertex where you shouldn't, the face needs to "bend" its plane.
This is simply impossible.
You cannot bend or twist a plane.
However, what you can do is split the face in two faces which occupy 2 planes.

Many noobs won't understand this concept so well at first, and that's why you need to learn maths in school! So you can know how to deal with GoldSRC mapping errors. >:(

"Alright", you say, "but how do we fix this"?
If you're using J.A.C.K., it will be easy to fix that.

Select the invalid brushes and then press Shift+V to go into the VM tool.

And then, press this key combination:

Either that, or make them "stand still", just like walls should.
That will make the faces planar again without the need for triangulation, but you still won't have a bent wall or anything like that.

Then go back to the Select tool, Shift+S.

If you're not a J.A.C.K. user, don't worry either, because there's a command which does a similar thing.

Basically, select 2 vertexes and press Ctrl+F. You'll get a line between them, and your newly-made faces will become planar.

4. Entities do not seal the map

Yup, entities aren't considered when calculating the portals and visleaves.
Not even func_detail which acts like worldspawn.
Some beginners do this without knowing that it will cause leaks, and they ask for help about it later.

There aren't any lines on the front side:

But from the back:

Guess which one is an entity here?

This is, by far, the easiest one to solve.

Just select the brush entity and press Ctrl+W.
Or press this button:

So far, this would be it for the tutorial.

Happy mapping! :)
  • KonataHamster avatar
    KonataHamster Joined 11y ago
    31,968 points Ranked 174th
    36 medals 3 legendary 8 rare
    • Returned 5000 times Medal icon
    • Became a Ripe Supporter Medal icon
    • 10 years a member Medal icon
    • Returned 1000 times Medal icon
    • 10 submissions featured Medal icon
    • 6 years a member Medal icon
    4y 4y
    Fixing leaks without calling a plumber

    Jokes aside this is very thorough. Spoken in plain english instead of some administrative document instruction, those are the main reason I never gained much from tutorials, but if they were like this, well, if my math class tutorials were like this, I mighta done better than a D. And as with many CS: 1.6 tutorials, they are still relevant due to Hammer Editor not having changed in over a decade. This, as you'd expect, applies for Half Life 2, Counter Strike Source, and a myriad of other games, so that is extremely useful. 
    • Thanks x 1
    Oversensitive sociopath avatar
    Oversensitive sociopath
    URL to post:
  • Ghost1420071 avatar
    Ghost1420071 Joined 7y ago
    2,086 points Ranked 22,171st
    22 medals 5 rare
    • Returned 1000 times Medal icon
    • Received thanks 50 times Medal icon
    • GameBanana’s Christmas Giveaway 2017 Day Nine Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2017 Day Fifteen Winner! Medal icon
    • 8-14 Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • One month a member Medal icon
    Nice, keep pumping out tutorials.

    Tips for everyone else: entities define a playable area. You can have entities outside of your map and the 'void' will become the playable area, with your map becoming the new void.

    That being said, to create a room disconnected from the rest of your map you need at least one entity inside of it or it will be ignored by the compiler
    • Funny x 1
    • Agree x 1
    • Win x 1
    • High five x 1
    URL to post: