WIP: the sequel

This commit is contained in:
AJ Martinez 2023-05-17 01:50:17 -07:00
parent 18c45d8a8a
commit a3cc422706
7 changed files with 46 additions and 14 deletions

View file

@ -3948,7 +3948,7 @@ state_t states[NUMSTATES] =
{SPR_SLPT, FF_PAPERSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_SLIPTIDEZIP
{SPR_IWHP, FF_FLOORSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_INSTAWHIP
{SPR_IWHP, FF_FLOORSPRITE|FF_ANIMATE|0, -1, {NULL}, 6, 2, S_NULL}, // S_INSTAWHIP
{SPR_SGNS, FF_ADD|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_SIGNSPARK2}, // S_SIGNSPARK1
{SPR_SGNS, FF_ADD|FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_SIGNSPARK3}, // S_SIGNSPARK2

View file

@ -793,7 +793,9 @@ boolean K_InstaWhipCollide(mobj_t *t1, mobj_t *t2)
{
if (t2 != t1->target && !P_PlayerInPain(t2->player) && t2->player->flashing == 0)
{
P_DamageMobj(t2, t1, t1, 1, DMG_NORMAL);
P_PlayRinglossSound(t2);
P_PlayerRingBurst(t2->player, 5);
P_DamageMobj(t2, t1, t1, 1, DMG_STUMBLE);
K_AddHitLag(t2, 10, true);
K_AddHitLag(t1->target, 2, false);
t1->hitlag = t1->target->hitlag;
@ -806,9 +808,10 @@ boolean K_InstaWhipCollide(mobj_t *t1, mobj_t *t2)
if (t2->type == MT_ORBINAUT || t2->type == MT_JAWZ || t2->type == MT_GACHABOM
|| t2->type == MT_BANANA || t2->type == MT_EGGMANITEM || t2->type == MT_BALLHOG
|| t2->type == MT_SSMINE || t2->type == MT_LANDMINE || t2->type == MT_SINK
|| t2->type == MT_GARDENTOP || t2->type == MT_DROPTARGET)
|| t2->type == MT_GARDENTOP || t2->type == MT_DROPTARGET || t2->type == MT_BATTLECAPSULE
|| t2->type == MT_MONITOR)
{
P_RemoveMobj(t2);
P_DamageMobj(t2, t1, t1, 1, DMG_NORMAL);
K_AddHitLag(t1->target, 2, false);
t1->hitlag = t1->target->hitlag;
}

View file

@ -7878,7 +7878,12 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
player->gateBoost--;
if (player->instaShieldCooldown)
{
player->instaShieldCooldown--;
if (!P_IsObjectOnGround(player->mo))
player->instaShieldCooldown = max(player->instaShieldCooldown, 1);
}
if (player->startboost > 0 && onground == true)
{
@ -10533,16 +10538,24 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
// Ring boosting
if (player->pflags & PF_USERINGS)
{
if (ATTACK_IS_DOWN && player->rings <= 0 && players->instaShieldCooldown == 0)
if (ATTACK_IS_DOWN && player->rings <= 0)
{
player->instaShieldCooldown = 2*TICRATE/3;
S_StartSound(player->mo, sfx_join);
mobj_t *whip = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_INSTAWHIP);
P_SetScale(whip, player->mo->scale);
P_SetTarget(&whip->target, player->mo);
K_MatchGenericExtraFlags(whip, player->mo);
whip->fuse = 10;
player->flashing = max(player->flashing, 10);
if (players->instaShieldCooldown)
{
S_StartSound(player->mo, sfx_s1a9);
}
else
{
player->instaShieldCooldown = 50;
S_StartSound(player->mo, sfx_iwhp);
mobj_t *whip = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_INSTAWHIP);
P_SetScale(whip, player->mo->scale);
P_SetTarget(&whip->target, player->mo);
K_MatchGenericExtraFlags(whip, player->mo);
whip->fuse = 12; // Changing instawhip animation duration? Look here
player->flashing = max(player->flashing, 12);
player->mo->momz += FRACUNIT;
}
}
if ((cmd->buttons & BT_ATTACK) && !player->ringdelay && player->rings > 0)

View file

@ -15,6 +15,15 @@ void Obj_InstaWhipThink (mobj_t *whip)
P_MoveOrigin(whip, whip->target->x, whip->target->y, whip->target->z + whip->target->height/2);
whip->flags |= MF_NOCLIPTHING;
whip->angle = whip->target->angle + (ANG30 * 2 * whip->fuse);
whip->renderflags |= RF_NOSPLATBILLBOARD;
if (whip->renderflags & RF_DONTDRAW)
whip->renderflags &= ~RF_DONTDRAW;
else
whip->renderflags |= RF_DONTDRAW;
P_SetScale(whip, whip->target->scale);
}
}

View file

@ -615,7 +615,10 @@ Obj_MonitorGetDamage
}
else
{
damage = FRACUNIT; // kill instantly
if (inflictor->type == MT_INSTAWHIP)
damage = FRACUNIT/3;
else
damage = FRACUNIT; // kill instantly
}
return damage;

View file

@ -1184,6 +1184,8 @@ sfxinfo_t S_sfx[NUMSFX] =
{"monch", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"etexpl", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Game crash"},
{"iwhp", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Grow alarm
// SRB2Kart - Engine sounds
// Engine class A
{"krta00", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""},

View file

@ -1253,6 +1253,8 @@ typedef enum
sfx_monch,
sfx_etexpl,
sfx_iwhp,
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
// Engine class A - Low Speed, Low Weight
sfx_krta00,