diff --git a/src/info.c b/src/info.c index caf458a3d..57713644e 100644 --- a/src/info.c +++ b/src/info.c @@ -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 diff --git a/src/k_collide.cpp b/src/k_collide.cpp index 43f3ee64b..3aebcf365 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -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; } diff --git a/src/k_kart.c b/src/k_kart.c index 716a23bad..bd50a31ed 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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) diff --git a/src/objects/instawhip.c b/src/objects/instawhip.c index 30587c762..974ca70fd 100644 --- a/src/objects/instawhip.c +++ b/src/objects/instawhip.c @@ -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); } } \ No newline at end of file diff --git a/src/objects/monitor.c b/src/objects/monitor.c index 8f5be65eb..fccb1a0f9 100644 --- a/src/objects/monitor.c +++ b/src/objects/monitor.c @@ -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; diff --git a/src/sounds.c b/src/sounds.c index ebf43289a..2f5edb9c6 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -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, ""}, diff --git a/src/sounds.h b/src/sounds.h index 427731ec5..fda612893 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -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,