Entity Attribute: Contents Last edited 10 months ago2023-12-27 11:56:12 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
The Contents (skin) attribute is applicable to all brush entities, and can be used to define its contents.

Definition

The following code block in const.h of the SDK lists accepted values:
// contents of a spot in the world
#define CONTENTS_EMPTY      -1
#define CONTENTS_SOLID      -2
#define CONTENTS_WATER      -3
#define CONTENTS_SLIME      -4
#define CONTENTS_LAVA       -5
#define CONTENTS_SKY        -6
/* These additional contents constants are defined in bspfile.h
#define CONTENTS_ORIGIN     -7      // removed at csg time
#define CONTENTS_CLIP       -8      // changed to contents_solid
#define CONTENTS_CURRENT_0      -9
#define CONTENTS_CURRENT_90     -10
#define CONTENTS_CURRENT_180    -11
#define CONTENTS_CURRENT_270    -12
#define CONTENTS_CURRENT_UP     -13
#define CONTENTS_CURRENT_DOWN   -14
#define CONTENTS_TRANSLUCENT    -15
*/
#define CONTENTS_LADDER             -16

#define CONTENT_FLYFIELD            -17
#define CONTENT_GRAVITY_FLYFIELD    -18
#define CONTENT_FOG                 -19

Usage

While this property may apply to all brush entities, in most cases, you don't need to add this attribute to your brush entities, and FGDs usually give only a subset to entities where it's relevant (e.g. func_water).

Depending on how a brush is textured, CSG also automatically coerces brushes (including world brushes) into non-solid content. E.g.: Brush content is really a relic of Half-Life's Quake ancestry, and its entity system has largely sidestepped it, so use the equivalent func_ entities instead:

Comments

You must log in to post a comment. You can login or register a new account.