@@ -771,7 +771,7 @@ bool P_CheckLineBlocksThing(line_t *ld, const linkoffset_t *link, PODCollection<
771771 {
772772 clip.blockline = ld;
773773 bool result = clip.unstuck && !untouched (ld, link) &&
774- FixedMul (clip.x - clip.thing ->x , ld->dy ) > FixedMul (clip.y - clip.thing ->y , ld->dx );
774+ FixedMul (clip.x - clip.thing ->x , ld->dy ) > FixedMul (clip.y - clip.thing ->y , ld->dx );
775775 if (!result && pushhit && ld->special && full_demo_version >= make_full_version (401 , 0 ))
776776 {
777777 pushhit->add (ld);
@@ -2030,8 +2030,8 @@ bool P_TryMove(Mobj *thing, fixed_t x, fixed_t y, int dropoff)
20302030 int oldside;
20312031 if ((oldside = P_PointOnLineSide (ox, oy, line)) != P_PointOnLineSide (tx, ty, line))
20322032 {
2033- if (!P_LevelIsVanillaHexen () && line->intflags & MLI_DYNASEGLINE && line-> flags & ML_TWOSIDED &&
2034- line->backsector )
2033+ if (demo_version >= 406 && !P_LevelIsVanillaHexen () && line->intflags & MLI_DYNASEGLINE &&
2034+ line->flags & ML_TWOSIDED && line-> backsector )
20352035 {
20362036 Thinker::AddMobileCrossLine (line, oldside, thing);
20372037 }
@@ -3056,17 +3056,24 @@ enum class SecnodeType
30563056//
30573057// killough 11/98: reformatted
30583058//
3059- static msecnode_t *P_AddSecnode (sector_t *s, msecnode_t *sector_t ::*which_thinglist, Mobj *thing, msecnode_t *nextnode, SecnodeType type)
3059+ static msecnode_t *P_AddSecnode (sector_t *s, msecnode_t *sector_t ::*which_thinglist, Mobj *thing, msecnode_t *nextnode,
3060+ SecnodeType type)
30603061{
30613062 msecnode_t *node;
30623063
3064+ bool foundNormalNode = false ;
30633065 for (node = nextnode; node; node = node->m_tnext )
30643066 {
30653067 if (node->m_sector == s) // Already have a node for this sector?
30663068 {
3069+ if (node->m_thing == thing && !(node->flags & MSN_POLYLINE ))
3070+ foundNormalNode = true ;
30673071 node->m_thing = thing; // Yes. Setting m_thing says 'keep it'.
3072+
30683073 if (type == SecnodeType::normal)
30693074 node->flags &= ~MSN_POLYLINE ;
3075+ else if (type == SecnodeType::polyline && !foundNormalNode)
3076+ node->flags |= MSN_POLYLINE ;
30703077 return nextnode;
30713078 }
30723079 }
@@ -3196,7 +3203,7 @@ static bool PIT_GetSectors(line_t *ld, polyobj_t *po, void *vcontext)
31963203 bbox[BOXTOP ] = pClip->bbox [BOXTOP ] + link->y ;
31973204 bbox[BOXBOTTOM ] = pClip->bbox [BOXBOTTOM ] + link->y ;
31983205
3199- const bool polyline = Polyobj_IsLine (*ld);
3206+ const bool polyline = Polyobj_IsLine (*ld);
32003207 const SecnodeType type =
32013208 polyline && !(ld->intflags & MLI_1SPORTALLINE ) ? SecnodeType::polyline : SecnodeType::normal;
32023209
@@ -3263,7 +3270,8 @@ static bool PIT_GetSectors(line_t *ld, polyobj_t *po, void *vcontext)
32633270 }
32643271 else
32653272 frontsector = ld->frontsector ;
3266- pClip->sector_list = P_AddSecnode (frontsector, context->which_thinglist , pClip->thing , pClip->sector_list , type);
3273+ pClip->sector_list =
3274+ P_AddSecnode (frontsector, context->which_thinglist , pClip->thing , pClip->sector_list , type);
32673275
32683276 if (ld->pflags & PS_PASSABLE && context->master )
32693277 {
0 commit comments