mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Merge remote-tracking branch 'refs/remotes/origin/gameplay-tweaks' into battle
This commit is contained in:
commit
b64e9a1501
2 changed files with 48 additions and 19 deletions
52
src/k_kart.c
52
src/k_kart.c
|
|
@ -2031,18 +2031,6 @@ static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t angle
|
||||||
|
|
||||||
th->flags2 |= flags2;
|
th->flags2 |= flags2;
|
||||||
|
|
||||||
if (P_IsObjectOnGround(source))
|
|
||||||
{
|
|
||||||
// spawn on the ground if the player is on the ground
|
|
||||||
if (P_MobjFlip(source) < 0)
|
|
||||||
{
|
|
||||||
th->z = th->ceilingz - th->height;
|
|
||||||
th->eflags |= MFE_VERTICALFLIP;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
th->z = th->floorz;
|
|
||||||
}
|
|
||||||
|
|
||||||
th->threshold = 10;
|
th->threshold = 10;
|
||||||
|
|
||||||
#ifdef WEAPON_SFX
|
#ifdef WEAPON_SFX
|
||||||
|
|
@ -2057,6 +2045,21 @@ static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t angle
|
||||||
|
|
||||||
P_SetTarget(&th->target, source);
|
P_SetTarget(&th->target, source);
|
||||||
|
|
||||||
|
if (P_IsObjectOnGround(source))
|
||||||
|
{
|
||||||
|
// floorz and ceilingz aren't properly set to account for FOFs and Polyobjects on spawn
|
||||||
|
// This should set it for FOFs
|
||||||
|
P_TeleportMove(th, th->x, th->y, th->z);
|
||||||
|
// spawn on the ground if the player is on the ground
|
||||||
|
if (P_MobjFlip(source) < 0)
|
||||||
|
{
|
||||||
|
th->z = th->ceilingz - th->height;
|
||||||
|
th->eflags |= MFE_VERTICALFLIP;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
th->z = th->floorz;
|
||||||
|
}
|
||||||
|
|
||||||
th->angle = an;
|
th->angle = an;
|
||||||
th->momx = FixedMul(speed, FINECOSINE(an>>ANGLETOFINESHIFT));
|
th->momx = FixedMul(speed, FINECOSINE(an>>ANGLETOFINESHIFT));
|
||||||
th->momy = FixedMul(speed, FINESINE(an>>ANGLETOFINESHIFT));
|
th->momy = FixedMul(speed, FINESINE(an>>ANGLETOFINESHIFT));
|
||||||
|
|
@ -2261,9 +2264,34 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
||||||
|
|
||||||
mo = P_SpawnMobj(newx, newy, player->mo->z, mapthing);
|
mo = P_SpawnMobj(newx, newy, player->mo->z, mapthing);
|
||||||
|
|
||||||
|
if (P_MobjFlip(player->mo) < 0)
|
||||||
|
mo->z = player->mo->z + player->mo->height - mo->height;
|
||||||
|
|
||||||
mo->threshold = 10;
|
mo->threshold = 10;
|
||||||
P_SetTarget(&mo->target, player->mo);
|
P_SetTarget(&mo->target, player->mo);
|
||||||
|
|
||||||
|
if (P_IsObjectOnGround(player->mo))
|
||||||
|
{
|
||||||
|
// floorz and ceilingz aren't properly set to account for FOFs and Polyobjects on spawn
|
||||||
|
// This should set it for FOFs
|
||||||
|
P_TeleportMove(mo, mo->x, mo->y, mo->z);
|
||||||
|
|
||||||
|
if (P_MobjFlip(mo) > 0)
|
||||||
|
{
|
||||||
|
if (mo->floorz > mo->target->z - mo->height)
|
||||||
|
{
|
||||||
|
mo->z = mo->floorz;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (mo->ceilingz < mo->target->z + mo->target->height + mo->height)
|
||||||
|
{
|
||||||
|
mo->z = mo->ceilingz - mo->height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mo)
|
if (mo)
|
||||||
{
|
{
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
|
|
||||||
15
src/p_mobj.c
15
src/p_mobj.c
|
|
@ -2305,6 +2305,14 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
case MT_BIGTUMBLEWEED:
|
case MT_BIGTUMBLEWEED:
|
||||||
case MT_LITTLETUMBLEWEED:
|
case MT_LITTLETUMBLEWEED:
|
||||||
case MT_SHELL:
|
case MT_SHELL:
|
||||||
|
// SRB2kart stuff that should die in pits
|
||||||
|
// Shouldn't stop moving along the Z if there's no speed though!
|
||||||
|
case MT_FAKEITEM:
|
||||||
|
case MT_BANANAITEM:
|
||||||
|
case MT_GREENITEM:
|
||||||
|
case MT_REDITEM:
|
||||||
|
case MT_REDITEMDUD:
|
||||||
|
case MT_FIREBALL:
|
||||||
// Remove stuff from death pits.
|
// Remove stuff from death pits.
|
||||||
if (P_CheckDeathPitCollide(mo))
|
if (P_CheckDeathPitCollide(mo))
|
||||||
{
|
{
|
||||||
|
|
@ -2331,13 +2339,6 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
case MT_FLINGCOIN:
|
case MT_FLINGCOIN:
|
||||||
case MT_FLINGRANDOMITEM:
|
case MT_FLINGRANDOMITEM:
|
||||||
case MT_FLINGEMERALD:
|
case MT_FLINGEMERALD:
|
||||||
// SRB2kart stuff that should die in pits
|
|
||||||
case MT_RANDOMITEM:
|
|
||||||
case MT_BANANAITEM:
|
|
||||||
case MT_GREENITEM:
|
|
||||||
case MT_REDITEM:
|
|
||||||
case MT_REDITEMDUD:
|
|
||||||
case MT_FIREBALL:
|
|
||||||
// Remove flinged stuff from death pits.
|
// Remove flinged stuff from death pits.
|
||||||
if (P_CheckDeathPitCollide(mo))
|
if (P_CheckDeathPitCollide(mo))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue