mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Fix Sneakers in Battle
This commit is contained in:
parent
4801b57fa4
commit
5bacbe6222
2 changed files with 41 additions and 30 deletions
|
|
@ -1306,7 +1306,7 @@ static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This kind of wipeout happens with no rings -- doesn't remove a bumper, has no invulnerability, and is much shorter.
|
// This kind of wipeout happens with no rings -- doesn't remove a bumper, has no invulnerability, and is much shorter.
|
||||||
static void K_BumpWipeoutPlayer(player_t *player, INT32 length)
|
static void K_DebtStingPlayer(player_t *player, INT32 length)
|
||||||
{
|
{
|
||||||
if (player->health <= 0)
|
if (player->health <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
@ -1493,7 +1493,7 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
{
|
{
|
||||||
if (mobj1->player->kartstuff[k_rings] <= 0)
|
if (mobj1->player->kartstuff[k_rings] <= 0)
|
||||||
{
|
{
|
||||||
K_BumpWipeoutPlayer(mobj1->player, TICRATE + (4 * (mobj2->player->kartweight - mobj1->player->kartweight)));
|
K_DebtStingPlayer(mobj1->player, TICRATE + (4 * (mobj2->player->kartweight - mobj1->player->kartweight)));
|
||||||
K_KartPainEnergyFling(mobj1->player);
|
K_KartPainEnergyFling(mobj1->player);
|
||||||
P_PlayRinglossSound(mobj1);
|
P_PlayRinglossSound(mobj1);
|
||||||
}
|
}
|
||||||
|
|
@ -1517,7 +1517,7 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
{
|
{
|
||||||
if (mobj2->player->kartstuff[k_rings] <= 0)
|
if (mobj2->player->kartstuff[k_rings] <= 0)
|
||||||
{
|
{
|
||||||
K_BumpWipeoutPlayer(mobj2->player, TICRATE + (4 * (mobj1->player->kartweight - mobj2->player->kartweight)));
|
K_DebtStingPlayer(mobj2->player, TICRATE + (4 * (mobj1->player->kartweight - mobj2->player->kartweight)));
|
||||||
K_KartPainEnergyFling(mobj2->player);
|
K_KartPainEnergyFling(mobj2->player);
|
||||||
P_PlayRinglossSound(mobj2);
|
P_PlayRinglossSound(mobj2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
65
src/p_map.c
65
src/p_map.c
|
|
@ -1557,39 +1557,50 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
|
||||||
{
|
{
|
||||||
K_KartBouncing(tmthing, thing, true, false);
|
// The bump has to happen last
|
||||||
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring])
|
mobj_t *mo1 = tmthing;
|
||||||
{
|
mobj_t *mo2 = thing;
|
||||||
K_StealBumper(tmthing->player, thing->player, false);
|
boolean zbounce = false;
|
||||||
K_SpinPlayer(thing->player, tmthing, 0, tmthing, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
|
||||||
{
|
|
||||||
K_KartBouncing(thing, tmthing, true, false);
|
|
||||||
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring])
|
|
||||||
{
|
|
||||||
K_StealBumper(thing->player, tmthing->player, false);
|
|
||||||
K_SpinPlayer(tmthing->player, thing, 0, thing, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
K_KartBouncing(tmthing, thing, false, false);
|
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
||||||
{
|
|
||||||
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && !(thing->player->powers[pw_flashing])) // Don't steal bumpers while intangible
|
|
||||||
{
|
{
|
||||||
K_StealBumper(thing->player, tmthing->player, false);
|
zbounce = true;
|
||||||
K_SpinPlayer(tmthing->player, thing, 0, tmthing, false);
|
mo1 = thing;
|
||||||
|
mo2 = tmthing;
|
||||||
|
|
||||||
|
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring])
|
||||||
|
{
|
||||||
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
|
K_SpinPlayer(thing->player, tmthing, 0, tmthing, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && !(tmthing->player->powers[pw_flashing]))
|
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
||||||
{
|
{
|
||||||
K_StealBumper(tmthing->player, thing->player, false);
|
zbounce = true;
|
||||||
K_SpinPlayer(thing->player, tmthing, 0, thing, false);
|
|
||||||
|
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring])
|
||||||
|
{
|
||||||
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
|
K_SpinPlayer(tmthing->player, thing, 0, thing, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (G_BattleGametype())
|
||||||
|
{
|
||||||
|
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && !(thing->player->powers[pw_flashing])) // Don't steal bumpers while intangible
|
||||||
|
{
|
||||||
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
|
K_SpinPlayer(tmthing->player, thing, 0, tmthing, false);
|
||||||
|
}
|
||||||
|
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && !(tmthing->player->powers[pw_flashing]))
|
||||||
|
{
|
||||||
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
|
K_SpinPlayer(thing->player, tmthing, 0, thing, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
K_KartBouncing(mo1, mo2, zbounce, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue