BSP flags (Quake and GoldSrc): Difference between revisions
SirYodaJedi (talk | contribs) m (→Contents types) |
SirYodaJedi (talk | contribs) |
||
Line 30: | Line 30: | ||
| -2 || CONTENTS_SOLID || || Default. | | -2 || CONTENTS_SOLID || || Default. | ||
|- | |- | ||
| -3 || CONTENTS_WATER || || A liquid, usually water. Textures with the {{code|!}} prefix are usually | | -3 || CONTENTS_WATER || || A liquid, usually water. Textures with the {{code|!}} prefix are usually water when part of worldspawn, unless they are slime, lava, or a current. | ||
|- | |- | ||
| -4 || CONTENTS_SLIME || || | | -4 || CONTENTS_SLIME || || Like water, deals damage to the player and some monsters when touched. | ||
|- | |- | ||
| -5 || CONTENTS_LAVA || || | | -5 || CONTENTS_LAVA || || Like slime, but deals double the damage. | ||
|- | |- | ||
| -6 || CONTENTS_SKY || || | | -6 || CONTENTS_SKY || || | ||
Line 43: | Line 43: | ||
| -8 || CONTENTS_CLIP || changed to contents_solid || | | -8 || CONTENTS_CLIP || changed to contents_solid || | ||
|- | |- | ||
| -9 || CONTENTS_CURRENT_0 || | | -9 || CONTENTS_CURRENT_0 || | ||
| rowspan=6 | Acts like water combined with a {{ent|trigger_push (GoldSrc)|alt=trigger_push}} with a speed of 2048 in the given direction | |||
|- | |- | ||
| -10 || CONTENTS_CURRENT_90 || | | -10 || CONTENTS_CURRENT_90 || | ||
|- | |- | ||
| -11 || CONTENTS_CURRENT_180 | | -11 || CONTENTS_CURRENT_180 || | ||
|- | |- | ||
| -12 || CONTENTS_CURRENT_270 || | | -12 || CONTENTS_CURRENT_270 || | ||
|- | |- | ||
| -13 || CONTENTS_UP || | | -13 || CONTENTS_UP || | ||
|- | |- | ||
| -14 || CONTENTS_DOWN | | -14 || CONTENTS_DOWN || | ||
|- | |- | ||
| -15 || CONTENTS_TRANSLUCENT {{quake|not}} || || Like water, but never solid. Despite this, it still affects VIS. | | -15 || CONTENTS_TRANSLUCENT {{quake|not}} || || Like water, but never solid. Despite this, it still affects VIS. | ||
|- | |- | ||
| -16 || CONTENTS_LADDER {{quake|not}} || || Climbable. | | -16 || CONTENTS_LADDER {{quake|not}} || || Climbable. Usually set via the game code for the func_ladder entity. | ||
|- | |- | ||
| -17 || CONTENTS_FLYFIELD {{quake|not}} || || Zero gravity | | -17 || CONTENTS_FLYFIELD {{quake|not}} || || Zero gravity |
Revision as of 14:19, 6 June 2024

Remember to check for any notes left by the tagger at this article's talk page.

Surface flags
Despite having a 32-bit integer available to be used, most flags go unused. Vanilla Quake engines and GoldSrc only use TEX_SPECIAL.
Bit | Flag name | Dev comment | Notes |
---|---|---|---|
0x00000001 | TEX_SPECIAL | sky or slime, no lightmap or 256 subdivision | Surface does not have a lightmap.
Used by |
0x00000002 | TEX_MISSING | johnfitz -- this texinfo does not have a texture | Used by fitzquake and derivatives to indicate a missing texture |
0x00000800 | ??? | N/A | Used by VERTEXNORMALS BSPX lump to indicate a face that should have smooth shading based upon its vertex normals. |
Contents types
Contents are stored as a signed 32-bit integer, and are always negative. Some entities, such as func_illusionary and func_water, allow using the skin KV to override the contents of the entity.
Value | Internal name | Dev comment | Notes |
---|---|---|---|
-1 | CONTENTS_EMPTY | ||
-2 | CONTENTS_SOLID | Default. | |
-3 | CONTENTS_WATER | A liquid, usually water. Textures with the ! prefix are usually water when part of worldspawn, unless they are slime, lava, or a current. | |
-4 | CONTENTS_SLIME | Like water, deals damage to the player and some monsters when touched. | |
-5 | CONTENTS_LAVA | Like slime, but deals double the damage. | |
-6 | CONTENTS_SKY | ||
-7 | CONTENTS_ORIGIN | removed at csg time | Replaces an entity's origin KV, then is removed by CSG (does not exist in compiled BSP).
In GoldSrc, if a brush has this contents at runtime, it will be treated like water (and is referred . |
-8 | CONTENTS_CLIP | changed to contents_solid | |
-9 | CONTENTS_CURRENT_0 | Acts like water combined with a trigger_push with a speed of 2048 in the given direction | |
-10 | CONTENTS_CURRENT_90 | ||
-11 | CONTENTS_CURRENT_180 | ||
-12 | CONTENTS_CURRENT_270 | ||
-13 | CONTENTS_UP | ||
-14 | CONTENTS_DOWN | ||
-15 | CONTENTS_TRANSLUCENT (not in ![]() |
Like water, but never solid. Despite this, it still affects VIS. | |
-16 | CONTENTS_LADDER (not in ![]() |
Climbable. Usually set via the game code for the func_ladder entity. | |
-17 | CONTENTS_FLYFIELD (not in ![]() |
Zero gravity | |
-18 | CONTENTS_GRAVITY_FLYFIELD (not in ![]() |
||
-19 | CONTENTS_FOG (not in ![]() |
Ambient Types
Ambients are stored as an array of 4 unsigned bytes, indicating volume. Only Quake uses them, and it only uses AMBIENT_SKY and AMBIENT_WATER, which are hardcoded in the engine to play specific sounds when a visleaf containing the given ambient type is in the current PVS.
