From 583b3bb4a7946fb8793cc08bafdc2c028452fb7a Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 9 Apr 2019 12:25:11 -0400 Subject: [PATCH] 2 more tweaks - Ring pickup is disabled while SPB is locked onto you (HUD animation to signify this is not implemented yet) - Ring afterimages only spawn while in the air, to reduce lag --- src/k_kart.c | 2 +- src/p_enemy.c | 3 ++- src/p_inter.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index d73f48b83..405815b15 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -863,7 +863,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean sp POWERITEMODDS(newodds); break; case KITEM_THUNDERSHIELD: - if (thunderisout) + if (thunderisout || spbplace != -1) newodds = 0; else POWERITEMODDS(newodds); diff --git a/src/p_enemy.c b/src/p_enemy.c index 848264b69..00cf2f395 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3670,7 +3670,8 @@ void A_AttractChase(mobj_t *actor) actor->momy = FixedMul(FixedDiv(actor->momy, oldspeed), newspeed); } - P_SpawnGhostMobj(actor)->tics = 3; + if (!P_IsObjectOnGround(actor)) + P_SpawnGhostMobj(actor)->tics = 3; } if (actor->tracer && actor->tracer->player && actor->tracer->health diff --git a/src/p_inter.c b/src/p_inter.c index 0a8b3ee8f..1d4e538db 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -690,6 +690,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (special->extravalue1) return; + // No picking up rings while SPB is targetting you + if (player->kartstuff[k_position] == spbplace) + return; + // Don't immediately pick up spilled rings if (special->threshold > 0 || player->kartstuff[k_squishedtimer]