Shift around flashing bump stuff

This commit is contained in:
Sally Cochenour 2019-01-30 15:57:46 -05:00
parent 9984f0e217
commit 34b027e8ba

View file

@ -1068,19 +1068,24 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|| (mobj2->player && mobj2->player->kartstuff[k_respawn])) || (mobj2->player && mobj2->player->kartstuff[k_respawn]))
return; return;
// Don't bump if you're flashing { // Don't bump if you're flashing
if (mobj1->player && mobj1->player->powers[pw_flashing] > 0 INT32 flash;
&& mobj1->player->powers[pw_flashing] < K_GetKartFlashing(mobj1->player)-1)
{
mobj1->player->powers[pw_flashing]++;
return;
}
if (mobj2->player && mobj2->player->powers[pw_flashing] > 0 flash = K_GetKartFlashing(mobj1->player);
&& mobj2->player->powers[pw_flashing] < K_GetKartFlashing(mobj2->player)-1) if (mobj1->player && mobj1->player->powers[pw_flashing] > 0 && mobj1->player->powers[pw_flashing] < flash)
{ {
mobj2->player->powers[pw_flashing]++; if (mobj1->player->powers[pw_flashing] < flash-1)
return; mobj1->player->powers[pw_flashing]++;
return;
}
flash = K_GetKartFlashing(mobj2->player);
if (mobj2->player && mobj2->player->powers[pw_flashing] > 0 && mobj2->player->powers[pw_flashing] < flash)
{
if (mobj2->player->powers[pw_flashing] < flash-1)
mobj2->player->powers[pw_flashing]++;
return;
}
} }
// Don't bump if you've recently bumped // Don't bump if you've recently bumped