Modified SPB to not route through P_DamageMobj (so wehave more control over the shield dropping/item obliteration, given Sryder picking up his own Thundershield...)
This commit is contained in:
parent
d42736fe3d
commit
147b7a5786
25
src/k_kart.c
25
src/k_kart.c
|
@ -3016,7 +3016,7 @@ static void K_DoShrink(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_DoSPB(player_t *victim, player_t *source)
|
static void K_DoSPB(player_t *victim)
|
||||||
{
|
{
|
||||||
//INT32 i;
|
//INT32 i;
|
||||||
S_StartSound(victim->mo, sfx_bkpoof); // Sound the BANG!
|
S_StartSound(victim->mo, sfx_bkpoof); // Sound the BANG!
|
||||||
|
@ -3027,8 +3027,25 @@ static void K_DoSPB(player_t *victim, player_t *source)
|
||||||
P_FlashPal(&players[i], PAL_NUKE, 10);
|
P_FlashPal(&players[i], PAL_NUKE, 10);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (victim->mo && !victim->spectator)
|
if (!victim->mo || !victim->mo->health || victim->spectator)
|
||||||
P_DamageMobj(victim->mo, source->mo, source->mo, 65);
|
return;
|
||||||
|
|
||||||
|
{
|
||||||
|
mobj_t *spbexplode;
|
||||||
|
|
||||||
|
if (!victim->kartstuff[k_invincibilitytimer] && !victim->kartstuff[k_growshrinktimer])
|
||||||
|
{
|
||||||
|
K_DropHnextList(victim);
|
||||||
|
K_StripItems(victim);
|
||||||
|
}
|
||||||
|
|
||||||
|
victim->powers[pw_flashing] = 0;
|
||||||
|
|
||||||
|
spbexplode = P_SpawnMobj(victim->mo->x, victim->mo->y, victim->mo->z, MT_BLUEEXPLOSION);
|
||||||
|
|
||||||
|
if (playeringame[spbplayer] && !players[spbplayer].spectator && players[spbplayer].mo)
|
||||||
|
P_SetTarget(&spbexplode->target, players[spbplayer].mo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound)
|
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound)
|
||||||
|
@ -3820,7 +3837,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->kartstuff[k_deathsentence])
|
if (player->kartstuff[k_deathsentence])
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_deathsentence] == 1)
|
if (player->kartstuff[k_deathsentence] == 1)
|
||||||
K_DoSPB(player, &players[spbplayer]);
|
K_DoSPB(player);
|
||||||
player->kartstuff[k_deathsentence]--;
|
player->kartstuff[k_deathsentence]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3385,19 +3385,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
S_StartSound(player->mo, sfx_kc59);
|
S_StartSound(player->mo, sfx_kc59);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Self-Propelled Bomb
|
|
||||||
if (damage == 65)
|
|
||||||
{
|
|
||||||
mobj_t *spbexplode;
|
|
||||||
if (player == source->player)
|
|
||||||
return false;
|
|
||||||
// Just need to do this now! Being thrown upwards is done by the explosion.
|
|
||||||
//P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUELIGHTNING);
|
|
||||||
spbexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
|
||||||
P_SetTarget(&spbexplode->target, source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Sudden-Death mode
|
// Sudden-Death mode
|
||||||
|
|
Loading…
Reference in a new issue