Discs no longer blast players with collision disabled

This commit is contained in:
Boondorl 2024-11-08 21:58:45 -05:00 committed by Ricardo Luís Vaz Silva
commit 268dad18f7
3 changed files with 14 additions and 1 deletions

View file

@ -121,13 +121,20 @@ TArray<spechit_t> portalhit;
//
//==========================================================================
bool P_ShouldPassThroughPlayer(AActor *self, AActor *other)
static int P_ShouldPassThroughPlayer(AActor *self, AActor *other)
{
return (dmflags3 & DF3_NO_PLAYER_CLIP) &&
other->player && other->player->mo == other &&
self->IsFriend(other);
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, ShouldPassThroughPlayer, P_ShouldPassThroughPlayer)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_OBJECT_NOT_NULL(other, AActor);
ACTION_RETURN_BOOL(P_ShouldPassThroughPlayer(self, other));
}
//==========================================================================
//
// CanCollideWith