Spawn a poof if you get hit while karmegg.

(I've moved the comebacktimer set into one level up from that conditional; don't worry, I checked - there's nowhere that accesses this field while you have bumpers, it's just always set here for some dastardly reason.)
This commit is contained in:
toaster 2018-10-09 22:40:42 +01:00
parent 66d00b7cc6
commit a8a1f1b444

View file

@ -1796,11 +1796,20 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem
K_CalculateBattleWanted();
}
if (!player->kartstuff[k_bumper])
{
player->kartstuff[k_comebacktimer] = comebacktime;
if (player->kartstuff[k_comebackmode])
{
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
player->kartstuff[k_comebackmode] = 0;
}
}
K_CheckBumpers();
}
player->kartstuff[k_comebacktimer] = comebacktime;
player->kartstuff[k_spinouttype] = type;
if (player->kartstuff[k_spinouttype] <= 0)
@ -1878,11 +1887,20 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
K_CalculateBattleWanted();
}
if (!player->kartstuff[k_bumper])
{
player->kartstuff[k_comebacktimer] = comebacktime;
if (player->kartstuff[k_comebackmode])
{
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
player->kartstuff[k_comebackmode] = 0;
}
}
K_CheckBumpers();
}
player->kartstuff[k_comebacktimer] = comebacktime;
player->kartstuff[k_squishedtimer] = 2*TICRATE;
player->powers[pw_flashing] = K_GetKartFlashing(player);
@ -1957,11 +1975,20 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
K_CalculateBattleWanted();
}
if (!player->kartstuff[k_bumper])
{
player->kartstuff[k_comebacktimer] = comebacktime;
if (player->kartstuff[k_comebackmode])
{
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
player->kartstuff[k_comebackmode] = 0;
}
}
K_CheckBumpers();
}
player->kartstuff[k_comebacktimer] = comebacktime;
player->kartstuff[k_spinouttype] = 1;
player->kartstuff[k_spinouttimer] = 2*TICRATE+(TICRATE/2);