mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 07:22:03 +00:00
Merge branch 'water-update' into 'next'
Water update See merge request KartKrew/Kart-Public!83
This commit is contained in:
commit
f08c8d018e
2 changed files with 20 additions and 3 deletions
19
src/k_kart.c
19
src/k_kart.c
|
@ -1401,7 +1401,7 @@ void K_RespawnChecker(player_t *player)
|
|||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
P_SetTarget(&mo->target, player->mo);
|
||||
mo->angle = newangle+ANGLE_90;
|
||||
mo->momz = (8*FRACUNIT)*P_MobjFlip(player->mo);
|
||||
mo->momz = (8<<FRACBITS) * P_MobjFlip(player->mo);
|
||||
P_SetScale(mo, (mo->destscale = FRACUNIT));
|
||||
}
|
||||
}
|
||||
|
@ -2214,6 +2214,9 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b
|
|||
player->mo->momz *= 2;
|
||||
}
|
||||
|
||||
if (player->mo->eflags & MFE_UNDERWATER)
|
||||
player->mo->momz = (117 * player->mo->momz) / 200;
|
||||
|
||||
if (player->mo->state != &states[S_KART_SPIN])
|
||||
P_SetPlayerMobjState(player->mo, S_KART_SPIN);
|
||||
|
||||
|
@ -2423,6 +2426,8 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
|
||||
truc->momz = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||
if (truc->eflags & MFE_UNDERWATER)
|
||||
truc->momz = (117 * truc->momz) / 200;
|
||||
truc->color = color;
|
||||
}
|
||||
|
||||
|
@ -2451,6 +2456,8 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
|
|||
truc->momz = P_RandomRange(speed, speed2)*FRACUNIT;
|
||||
if (P_RandomChance(FRACUNIT/2))
|
||||
truc->momz = -truc->momz;
|
||||
if (truc->eflags & MFE_UNDERWATER)
|
||||
truc->momz = (117 * truc->momz) / 200;
|
||||
truc->tics = TICRATE*2;
|
||||
truc->color = color;
|
||||
}
|
||||
|
@ -3021,6 +3028,9 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
|||
mo->momy = player->mo->momy + FixedMul(FINESINE(fa), (altthrow == 2 ? 2*PROJSPEED/3 : PROJSPEED));
|
||||
mo->momz = P_MobjFlip(player->mo) * HEIGHT;
|
||||
|
||||
if (mo->eflags & MFE_UNDERWATER)
|
||||
mo->momz = (117 * mo->momz) / 200;
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
}
|
||||
|
@ -3379,6 +3389,9 @@ void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound)
|
|||
else
|
||||
mo->momz = FixedMul(vertispeed, vscale);
|
||||
|
||||
if (mo->eflags & MFE_UNDERWATER)
|
||||
mo->momz = (117 * mo->momz) / 200;
|
||||
|
||||
if (sound)
|
||||
S_StartSound(mo, (sound == 1 ? sfx_kc2f : sfx_kpogos));
|
||||
}
|
||||
|
@ -3528,6 +3541,8 @@ void K_DropHnextList(player_t *player)
|
|||
dropwork->momx = player->mo->momx>>1;
|
||||
dropwork->momy = player->mo->momy>>1;
|
||||
dropwork->momz = 3*flip*mapobjectscale;
|
||||
if (dropwork->eflags & MFE_UNDERWATER)
|
||||
dropwork->momz = (117 * dropwork->momz) / 200;
|
||||
P_Thrust(dropwork, work->angle - ANGLE_90, 6*mapobjectscale);
|
||||
dropwork->movecount = 2;
|
||||
dropwork->movedir = work->angle - ANGLE_90;
|
||||
|
@ -3586,6 +3601,8 @@ void K_DropItems(player_t *player)
|
|||
FixedAngle(P_RandomFixed()*180) + player->mo->angle + ANGLE_90,
|
||||
16*mapobjectscale);
|
||||
drop->momz = P_MobjFlip(player->mo)*3*mapobjectscale;
|
||||
if (drop->eflags & MFE_UNDERWATER)
|
||||
drop->momz = (117 * drop->momz) / 200;
|
||||
|
||||
drop->threshold = (thunderhack ? KITEM_THUNDERSHIELD : player->kartstuff[k_itemtype]);
|
||||
drop->movecount = player->kartstuff[k_itemamount];
|
||||
|
|
|
@ -3399,8 +3399,8 @@ void P_MobjCheckWater(mobj_t *mobj)
|
|||
|
||||
// skipping stone!
|
||||
if (p && p->kartstuff[k_waterskip] < 2
|
||||
&& ((p->speed/2 > abs(mobj->momz)) // Going more forward than horizontal, so you can skip across the water.
|
||||
|| (p->speed > K_GetKartSpeed(p,false)/4 && p->kartstuff[k_waterskip])) // Already skipped once, so you can skip once more!
|
||||
&& ((p->speed/3 > abs(mobj->momz)) // Going more forward than horizontal, so you can skip across the water.
|
||||
|| (p->speed > K_GetKartSpeed(p,false)/3 && p->kartstuff[k_waterskip])) // Already skipped once, so you can skip once more!
|
||||
&& ((!(mobj->eflags & MFE_VERTICALFLIP) && thingtop - mobj->momz > mobj->watertop)
|
||||
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->z - mobj->momz < mobj->waterbottom)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue