Only let items and player hit special UFO

This commit is contained in:
James R 2023-12-22 23:54:43 -08:00
parent 7744a2823e
commit d1739feda9

View file

@ -834,6 +834,14 @@ static UINT8 GetUFODamage(mobj_t *inflictor, UINT8 damageType)
ret = 10;
break;
}
case MT_GARDENTOP:
{
// Garden Top is not classified as a "field
// item" because the player can ride it. So
// an explicit case is necessary.
ret = 10;
break;
}
case MT_PLAYER:
{
// Players deal damage relative to how many sneakers they used.
@ -849,6 +857,11 @@ static UINT8 GetUFODamage(mobj_t *inflictor, UINT8 damageType)
}
default:
{
// General hazards cannot damage the UFO
if (P_IsKartFieldItem(inflictor->type) == false)
{
return 0;
}
break;
}
}