mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Bail quake is multiversal
Everyone should feel that shit
This commit is contained in:
parent
b131b44353
commit
71a1175315
2 changed files with 15 additions and 7 deletions
15
src/k_kart.c
15
src/k_kart.c
|
|
@ -10054,6 +10054,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->bailquake)
|
if (player->bailquake)
|
||||||
player->bailquake--;
|
player->bailquake--;
|
||||||
|
|
||||||
|
// bail camera shake
|
||||||
|
if (player->bailquake > 0 && !player->mo->hitlag) // only start after hitlag ends
|
||||||
|
{
|
||||||
|
P_StartQuakeFromMobj(1, 50 * player->mo->scale, 2048 * player->mo->scale, player->mo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The precise ordering of start-of-level made me want to cut my head off,
|
// The precise ordering of start-of-level made me want to cut my head off,
|
||||||
// so let's try this instead. Whatever!
|
// so let's try this instead. Whatever!
|
||||||
if (leveltime <= starttime || player->gradingpointnum == 0)
|
if (leveltime <= starttime || player->gradingpointnum == 0)
|
||||||
|
|
@ -14036,7 +14044,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->baildrop = baildrop * BAIL_DROPFREQUENCY + 1;
|
player->baildrop = baildrop * BAIL_DROPFREQUENCY + 1;
|
||||||
|
|
||||||
K_AddHitLag(player->mo, TICRATE/4, false);
|
K_AddHitLag(player->mo, TICRATE/4, false);
|
||||||
player->bailquake = player->mo->hitlag + TICRATE; // the quake effect that uses this will ignore it during hitlag and trigger after, so it needs to be longer than the hitlag
|
player->bailquake = player->mo->hitlag; // the quake effect that uses this will ignore it during hitlag and trigger after, so it needs to be longer than the hitlag
|
||||||
|
|
||||||
|
//if (player->mo->hitlag > 0) // bail blink; make the player invisible during the swish, like classic games.
|
||||||
|
//{
|
||||||
|
//player->mo->renderflags |= RF_DONTDRAW;
|
||||||
|
//}
|
||||||
|
|
||||||
if (P_PlayerInPain(player))
|
if (P_PlayerInPain(player))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9654,12 +9654,7 @@ void P_DoQuakeOffset(UINT8 view, mappoint_t *viewPos, mappoint_t *offset)
|
||||||
addZ += ir;
|
addZ += ir;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add bail effect
|
|
||||||
if (viewer->bailquake > 0 && !viewer->mo->hitlag) // only start after hitlag ends
|
|
||||||
{
|
|
||||||
ir = FixedMul((viewer->bailquake * FRACUNIT * 5) / 17, mapobjectscale);
|
|
||||||
addZ += ir;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t maxShake = FixedMul(cv_cam_height[view].value, mapobjectscale) * 3 / 4;
|
fixed_t maxShake = FixedMul(cv_cam_height[view].value, mapobjectscale) * 3 / 4;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue