diff --git a/source/src/physics.cpp b/source/src/physics.cpp index febd1955..06adff5e 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -178,11 +178,13 @@ bool collide(physent *d, bool spawn, float drop, float rise, int level) // level float hi = 127, lo = -128; const float eyeheight = d->eyeheight; const float playerheight = eyeheight + d->aboveeye; + const int applyclip = d->type == ENT_PLAYER ? TAGCLIP|TAGPLCLIP : TAGCLIP; if(level&1) for(int y = y1; y<=y2; y++) for(int x = x1; x<=x2; x++) // collide with map { if(OUTBORD(x,y)) return true; sqr *s = S(x,y); + if(s->tag & applyclip) return true; // tagged clips feel like solids float ceil = s->ceil; float floor = s->floor; switch(s->type) diff --git a/source/src/world.h b/source/src/world.h index 361cc73e..24c75f4a 100644 --- a/source/src/world.h +++ b/source/src/world.h @@ -32,6 +32,13 @@ enum // hardcoded texture numbers DEFAULT_CEIL }; +enum // stuff encoded in sqr.tag +{ + TAGTRIGGERMASK = 0x3F, // room for old fashioned cube 1 triggers + TAGCLIP = 0x40, // clips all objects + TAGPLCLIP = 0x80 // clips only players +}; + #define MAXMAPVERSION 10 // defines the highest readable format #define MAPVERSION 9 // default map format version to be written (bump if map format changes, see worldio.cpp)