From cffae9c33cdb2119841c060bbbdd6fb4920ac10e Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 25 Nov 2011 21:49:03 +0000 Subject: [PATCH] - Applied Thomas's patch to fix physics with non-solid polyobjs, but adjusted it to work with 3D mid textures as well (at least as well as I could). SVN r3320 (trunk) --- src/po_man.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/po_man.cpp b/src/po_man.cpp index 856ff9341..8a18269e4 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -21,6 +21,7 @@ #include "tables.h" #include "s_sndseq.h" #include "a_sharedglobal.h" +#include "p_3dmidtex.h" #include "p_lnspec.h" #include "r_data/r_interpolate.h" #include "g_level.h" @@ -1291,6 +1292,22 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd) checker.Push (mobj); if ((mobj->flags&MF_SOLID) && !(mobj->flags&MF_NOCLIP)) { + fixed_t top = -INT_MAX, bottom = INT_MAX; + bool above; + // [TN] Check wether this actor gets blocked by the line. + if(!(ld->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING)) + && !(ld->flags & ML_BLOCK_PLAYERS && mobj->player) + && !(ld->flags & ML_BLOCKMONSTERS && mobj->flags3 & MF3_ISMONSTER) + && !((mobj->flags & MF_FLOAT) && (ld->flags & ML_BLOCK_FLOATERS)) + && (!(ld->flags & ML_3DMIDTEX) || + (!P_LineOpening_3dMidtex(mobj, ld, bottom, top, &above) && + (mobj->z + mobj->height < bottom) + ) || (above && mobj->z > mobj->floorz)) + ) + { + continue; + } + FBoundingBox box(mobj->x, mobj->y, mobj->radius); if (box.Right() <= ld->bbox[BOXLEFT]