Fix eggman items having no collision

This commit is contained in:
Sally Cochenour 2020-03-24 12:55:48 -04:00
parent 4e63b39ccb
commit 88709aafaa
3 changed files with 8 additions and 10 deletions

View file

@ -183,7 +183,9 @@ boolean K_EggItemCollide(mobj_t *t1, mobj_t *t2)
if (t2->type == MT_RANDOMITEM || t2->type == MT_EGGMANITEM)
P_InstaThrust(t1, R_PointToAngle2(t2->x, t2->y, t1->x, t1->y), t2->radius/4);
// Player collision is handled by TouchSpecial
if (t1->type == MT_EGGMANITEM && t2->player)
P_TouchSpecialThing(t1, t2, false);
return true;
}

View file

@ -117,9 +117,7 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon)
if (weapon == 2)
{
// Invulnerable
if (player->powers[pw_flashing] > 0
|| (player->kartstuff[k_spinouttimer] > 0 && player->kartstuff[k_spinouttype] != 2)
|| player->kartstuff[k_squishedtimer] > 0)
if (player->powers[pw_flashing] > 0)
return false;
// Already have fake

View file

@ -841,7 +841,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return K_SMKIceBlockCollide(thing, tmthing);
}
if (tmthing->type == MT_EGGMANITEM)
if (tmthing->type == MT_EGGMANITEM || tmthing->type == MT_EGGMANITEM_SHIELD)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
@ -849,10 +849,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
K_EggItemCollide(tmthing, thing);
return true;
return K_EggItemCollide(tmthing, thing);
}
else if (thing->type == MT_EGGMANITEM)
else if (thing->type == MT_EGGMANITEM || thing->type == MT_EGGMANITEM_SHIELD)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
@ -860,8 +859,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
K_EggItemCollide(thing, tmthing);
return true;
return K_EggItemCollide(thing, tmthing);
}
if (tmthing->type == MT_RANDOMITEM)