mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-17 10:11:12 +00:00
Move some A_ItemPop stuff into P_CanPickupItem
This commit is contained in:
parent
e7de9502ba
commit
4c877a6490
2 changed files with 16 additions and 35 deletions
|
@ -8090,6 +8090,9 @@ void A_ItemPop(mobj_t *actor)
|
||||||
{
|
{
|
||||||
mobj_t *remains;
|
mobj_t *remains;
|
||||||
|
|
||||||
|
if (!(actor->target && actor->target->player && P_CanPickupItem(actor->target->player, false)))
|
||||||
|
return;
|
||||||
|
|
||||||
// de-solidify
|
// de-solidify
|
||||||
//P_UnsetThingPosition(actor);
|
//P_UnsetThingPosition(actor);
|
||||||
//actor->flags &= ~MF_SOLID;
|
//actor->flags &= ~MF_SOLID;
|
||||||
|
@ -8123,20 +8126,7 @@ void A_ItemPop(mobj_t *actor)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->target && actor->target->player // These used to be &2's and &8's for box only, but are now universal.
|
if (actor->target && actor->target->player)
|
||||||
&& !(actor->target->player->kartstuff[k_greenshell] || actor->target->player->kartstuff[k_triplegreenshell]
|
|
||||||
|| actor->target->player->kartstuff[k_redshell] || actor->target->player->kartstuff[k_tripleredshell]
|
|
||||||
|| actor->target->player->kartstuff[k_banana] || actor->target->player->kartstuff[k_triplebanana]
|
|
||||||
|| actor->target->player->kartstuff[k_fakeitem] & 2 || actor->target->player->kartstuff[k_magnet]
|
|
||||||
|| actor->target->player->kartstuff[k_bobomb] || actor->target->player->kartstuff[k_blueshell]
|
|
||||||
|| actor->target->player->kartstuff[k_mushroom] || actor->target->player->kartstuff[k_fireflower]
|
|
||||||
|| actor->target->player->kartstuff[k_star] || actor->target->player->kartstuff[k_goldshroom]
|
|
||||||
|| actor->target->player->kartstuff[k_lightning] || actor->target->player->kartstuff[k_megashroom]
|
|
||||||
|| actor->target->player->kartstuff[k_itemroulette]
|
|
||||||
|| actor->target->player->kartstuff[k_boo] || actor->target->player->kartstuff[k_bootaketimer]
|
|
||||||
|| actor->target->player->kartstuff[k_boostolentimer]
|
|
||||||
|| actor->target->player->kartstuff[k_growshrinktimer] > 1
|
|
||||||
|| actor->target->player->kartstuff[k_goldshroomtimer]))
|
|
||||||
actor->target->player->kartstuff[k_itemroulette] = 1;
|
actor->target->player->kartstuff[k_itemroulette] = 1;
|
||||||
else if (cv_debug && !(actor->target && actor->target->player))
|
else if (cv_debug && !(actor->target && actor->target->player))
|
||||||
CONS_Printf("ERROR: Powerup has no target!\n");
|
CONS_Printf("ERROR: Powerup has no target!\n");
|
||||||
|
|
|
@ -150,28 +150,19 @@ boolean P_CanPickupItem(player_t *player, boolean weapon)
|
||||||
//if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] <= flashingtics)
|
//if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] <= flashingtics)
|
||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
if (player->kartstuff[k_bootaketimer]
|
if (player->kartstuff[k_greenshell] || player->kartstuff[k_triplegreenshell]
|
||||||
|
|| player->kartstuff[k_redshell] || player->kartstuff[k_tripleredshell]
|
||||||
|
|| player->kartstuff[k_banana] || player->kartstuff[k_triplebanana]
|
||||||
|
|| player->kartstuff[k_fakeitem] & 2 || player->kartstuff[k_magnet]
|
||||||
|
|| player->kartstuff[k_bobomb] || player->kartstuff[k_blueshell]
|
||||||
|
|| player->kartstuff[k_mushroom] || player->kartstuff[k_fireflower]
|
||||||
|
|| player->kartstuff[k_star] || player->kartstuff[k_goldshroom]
|
||||||
|
|| player->kartstuff[k_lightning] || player->kartstuff[k_megashroom]
|
||||||
|
|| player->kartstuff[k_itemroulette]
|
||||||
|
|| player->kartstuff[k_boo] || player->kartstuff[k_bootaketimer]
|
||||||
|| player->kartstuff[k_boostolentimer]
|
|| player->kartstuff[k_boostolentimer]
|
||||||
|| player->kartstuff[k_magnet]
|
|| player->kartstuff[k_growshrinktimer] > 1
|
||||||
|| player->kartstuff[k_boo]
|
|| player->kartstuff[k_goldshroomtimer])
|
||||||
|| player->kartstuff[k_mushroom]
|
|
||||||
|| player->kartstuff[k_megashroom]
|
|
||||||
|| player->kartstuff[k_goldshroom]
|
|
||||||
|| player->kartstuff[k_star]
|
|
||||||
|| player->kartstuff[k_triplebanana] == 0x8
|
|
||||||
|| player->kartstuff[k_fakeitem] == 0x2
|
|
||||||
|| player->kartstuff[k_banana] == 0x2
|
|
||||||
|| player->kartstuff[k_greenshell] == 0x2
|
|
||||||
|| player->kartstuff[k_redshell] == 0x2
|
|
||||||
|| player->kartstuff[k_laserwisp]
|
|
||||||
|| player->kartstuff[k_triplegreenshell] == 0x8
|
|
||||||
|| player->kartstuff[k_bobomb] == 0x2
|
|
||||||
|| player->kartstuff[k_blueshell]
|
|
||||||
|| player->kartstuff[k_jaws] == 0x4
|
|
||||||
|| player->kartstuff[k_fireflower]
|
|
||||||
|| player->kartstuff[k_tripleredshell] == 0x8
|
|
||||||
|| player->kartstuff[k_lightning]
|
|
||||||
|| player->kartstuff[k_kitchensink])
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue