mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-27 13:31:43 +00:00
Fix eggman items having no collision
This commit is contained in:
parent
4e63b39ccb
commit
88709aafaa
3 changed files with 8 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
10
src/p_map.c
10
src/p_map.c
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue