Skip to content

Commit

Permalink
Update world.cpp (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
dystopm authored Sep 24, 2023
1 parent 6f03190 commit 5ec8c29
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion rehlds/engine/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1190,13 +1190,15 @@ void SV_ClipToLinks(areanode_t *node, moveclip_t *clip)
if (touch->v.solid == SOLID_TRIGGER)
Sys_Error("%s: Trigger in clipping list", __func__);

#ifndef REHLDS_OPT_PEDANTIC
if (gNewDLLFunctions.pfnShouldCollide && !gNewDLLFunctions.pfnShouldCollide(touch, clip->passedict))
#ifdef REHLDS_FIXES
// https://github.com/dreamstalker/rehlds/issues/46
continue;
#else
return;
#endif
#endif // REHLDS_FIXES
#endif // REHLDS_OPT_PEDANTIC

// monsterclip filter
if (touch->v.solid == SOLID_BSP)
Expand Down Expand Up @@ -1248,6 +1250,16 @@ void SV_ClipToLinks(areanode_t *node, moveclip_t *clip)
continue; // don't clip against owner
}

#ifdef REHLDS_OPT_PEDANTIC
if (gNewDLLFunctions.pfnShouldCollide && !gNewDLLFunctions.pfnShouldCollide(touch, clip->passedict))
#ifdef REHLDS_FIXES
// https://github.com/dreamstalker/rehlds/issues/46
continue;
#else
return;
#endif // REHLDS_FIXES
#endif // REHLDS_OPT_PEDANTIC

trace_t trace;
if (touch->v.flags & FL_MONSTER)
trace = SV_ClipMoveToEntity(touch, clip->start, clip->mins2, clip->maxs2, clip->end);
Expand Down

0 comments on commit 5ec8c29

Please sign in to comment.