Talk:Trace
From GMod Wiki
Keeping Record
Just to keep record of the other useful mask list:
MASK_ALL (0xFFFFFFFF) MASK_SOLID (SOLID | MOVEABLE | WINDOW | MONSTER | GRATE) MASK_PLAYERSOLID (SOLID | MOVEABLE | PLAYERCLIP | WINDOW | MONSTER | GRATE) MASK_NPCSOLID (SOLID | MOVEABLE | MONSTERCLIP | WINDOW | MONSTER | GRATE) MASK_WATER (WATER | MOVEABLE | SLIME) MASK_OPAQUE (SOLID | MOVEABLE | OPAQUE) MASK_OPAQUE_AND_NPCS (MASK_OPAQUE | MONSTER) MASK_VISIBLE (MASK_OPAQUE | IGNORE_NODRAW_OPAQUE) MASK_VISIBLE_AND_NPCS (MASK_OPAQUE_AND_NPCS | IGNORE_NODRAW_OPAQUE) MASK_SHOT (SOLID | MOVEABLE | MONSTER | WINDOW | DEBRIS | HITBOX) MASK_SHOT_HULL (SOLID | MOVEABLE | MONSTER | WINDOW | DEBRIS | GRATE) MASK_SHOT_PORTAL (SOLID | MOVEABLE | WINDOW) MASK_SOLID_BRUSHONLY (SOLID | MOVEABLE | WINDOW | GRATE) MASK_PLAYERSOLID_BRUSHONLY (SOLID | MOVEABLE | WINDOW | PLAYERCLIP | GRATE) MASK_NPCSOLID_BRUSHONLY (SOLID | MOVEABLE | WINDOW | MONSTERCLIP | GRATE) MASK_NPCWORLDSTATIC (SOLID | WINDOW | MONSTERCLIP | GRATE) MASK_SPLITAREAPORTAL (WATER | SLIME) MASK_CURRENT (CURRENT_0 | CURRENT_...) MASK_WATERWORLD (SOLID | WINDOW | GRATE | SLIME | WATER | MOVEABLE | MONSTERCLIP) In binary: 100100000000111011, so the above is my best guess
And content:
You can also create your own masks by using CONTENTS_* enumerations. // lower bits are stronger, and will eat weaker brushes completely #define CONTENTS_EMPTY 0 // No contents #define CONTENTS_SOLID 0x1 // an eye is never valid in a solid #define CONTENTS_WINDOW 0x2 // translucent, but not watery (glass) #define CONTENTS_AUX 0x4 #define CONTENTS_GRATE 0x8 // alpha-tested "grate" textures. Bullets/sight pass through, but solids don't #define CONTENTS_SLIME 0x10 #define CONTENTS_WATER 0x20 #define CONTENTS_MIST 0x40 #define CONTENTS_OPAQUE 0x80 // things that cannot be seen through (may be non-solid though) #define LAST_VISIBLE_CONTENTS 0x80 #define ALL_VISIBLE_CONTENTS (LAST_VISIBLE_CONTENTS | (LAST_VISIBLE_CONTENTS-1)) #define CONTENTS_TESTFOGVOLUME 0x100 // unused // NOTE: If it's visible, grab from the top + update LAST_VISIBLE_CONTENTS // if not visible, then grab from the bottom. #define CONTENTS_UNUSED5 0x200 #define CONTENTS_UNUSED6 0x4000 #define CONTENTS_TEAM1 0x800 // per team contents used to differentiate collisions #define CONTENTS_TEAM2 0x1000 // between players and objects on different teams // ignore CONTENTS_OPAQUE on surfaces that have SURF_NODRAW #define CONTENTS_IGNORE_NODRAW_OPAQUE 0x2000 // hits entities which are MOVETYPE_PUSH (doors, plats, etc.) #define CONTENTS_MOVEABLE 0x4000 // remaining contents are non-visible, and don't eat brushes #define CONTENTS_AREAPORTAL 0x8000 #define CONTENTS_PLAYERCLIP 0x10000 #define CONTENTS_MONSTERCLIP 0x20000 // currents can be added to any other contents, and may be mixed #define CONTENTS_CURRENT_0 0x40000 #define CONTENTS_CURRENT_90 0x80000 #define CONTENTS_CURRENT_180 0x100000 #define CONTENTS_CURRENT_270 0x200000 #define CONTENTS_CURRENT_UP 0x400000 #define CONTENTS_CURRENT_DOWN 0x800000 #define CONTENTS_ORIGIN 0x1000000 // removed before bsping an entity #define CONTENTS_MONSTER 0x2000000 // should never be on a brush, only in game #define CONTENTS_DEBRIS 0x4000000 #define CONTENTS_DETAIL 0x8000000 // brushes to be added after vis leafs #define CONTENTS_TRANSLUCENT 0x10000000 // auto set if any surface has trans #define CONTENTS_LADDER 0x20000000 #define CONTENTS_HITBOX 0x40000000 // use accurate hitboxes on trace
--Unrealomega 17:04, 12 September 2009 (UTC)