mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-20 19:02:37 +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;
|
||||
|
||||
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;
|
||||
|
||||
#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);
|
||||
|
||||
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->momx = FixedMul(speed, FINECOSINE(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);
|
||||
|
||||
if (P_MobjFlip(player->mo) < 0)
|
||||
mo->z = player->mo->z + player->mo->height - mo->height;
|
||||
|
||||
mo->threshold = 10;
|
||||
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 (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_LITTLETUMBLEWEED:
|
||||
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.
|
||||
if (P_CheckDeathPitCollide(mo))
|
||||
{
|
||||
|
@ -2331,13 +2339,6 @@ static boolean P_ZMovement(mobj_t *mo)
|
|||
case MT_FLINGCOIN:
|
||||
case MT_FLINGRANDOMITEM:
|
||||
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.
|
||||
if (P_CheckDeathPitCollide(mo))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue