mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Some safeguards for K_DropRocketSneaker usage
This commit is contained in:
parent
0637ed89aa
commit
943a898352
2 changed files with 7 additions and 3 deletions
|
@ -3872,11 +3872,17 @@ void K_DropItems(player_t *player)
|
|||
|
||||
void K_DropRocketSneaker(player_t *player)
|
||||
{
|
||||
if (!(player->mo && !P_MobjWasRemoved(player->mo) && player->mo->hnext && !P_MobjWasRemoved(player->mo->hnext)))
|
||||
return;
|
||||
|
||||
mobj_t *shoe = player->mo;
|
||||
fixed_t flingangle;
|
||||
boolean leftshoe = true; //left shoie is first
|
||||
while ((shoe = shoe->hnext) && !P_MobjWasRemoved(shoe))
|
||||
{
|
||||
if (shoe->type != MT_ROCKETSNEAKER)
|
||||
return; //woah, not a rocketsneaker, bail! safeguard in case this gets used when you're holding non-rocketsneakers
|
||||
|
||||
shoe->flags2 &= ~MF2_DONTDRAW;
|
||||
shoe->flags &= ~MF_NOGRAVITY;
|
||||
shoe->angle += ANGLE_45;
|
||||
|
|
|
@ -408,9 +408,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (player->kartstuff[k_rocketsneakertimer])
|
||||
K_DropRocketSneaker(player);
|
||||
|
||||
K_DropRocketSneaker(player);
|
||||
K_DropItems(player); //K_StripItems(player);
|
||||
//K_StripOther(player);
|
||||
player->kartstuff[k_itemroulette] = 1;
|
||||
|
|
Loading…
Reference in a new issue