mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-04 04:36:21 +00:00
Merge branch 'ufo-no-hit' into 'master'
Only let items and player hit special UFO; fix SPB not registering hit on UFO correctly Closes #774 See merge request KartKrew/Kart!1707
This commit is contained in:
commit
66e2610236
1 changed files with 18 additions and 1 deletions
|
|
@ -813,9 +813,13 @@ static UINT8 GetUFODamage(mobj_t *inflictor, UINT8 damageType)
|
|||
break;
|
||||
}
|
||||
case MT_SPB:
|
||||
case MT_SPBEXPLOSION:
|
||||
{
|
||||
if (inflictor->type != MT_SPBEXPLOSION || inflictor->threshold == KITEM_SPB)
|
||||
{
|
||||
targetdamaging |= UFOD_SPB;
|
||||
}
|
||||
// SPB deals triple damage.
|
||||
targetdamaging |= UFOD_SPB;
|
||||
ret = 30;
|
||||
break;
|
||||
}
|
||||
|
|
@ -834,6 +838,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 +861,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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue