mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Merge branch 'jartha/fix-gimmick-control' into 'master'
Fix Turbines and Ice Cubes being considered pain states; fix Aerial Highlands clouds taking away drift charge Closes #1465, #1428, #1368, and #1186 See merge request kart-krew-dev/ring-racers-internal!2584
This commit is contained in:
commit
4f1a8104e1
4 changed files with 21 additions and 6 deletions
|
|
@ -15710,6 +15710,12 @@ void K_MakeObjectReappear(mobj_t *mo)
|
||||||
|
|
||||||
boolean K_PlayerCanUseItem(player_t *player)
|
boolean K_PlayerCanUseItem(player_t *player)
|
||||||
{
|
{
|
||||||
|
if (player->icecube.frozen)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (player->turbine && (player->mo->flags & MF_NOCLIP))
|
||||||
|
return false;
|
||||||
|
|
||||||
return (player->mo->health > 0 && !player->spectator && !P_PlayerInPain(player) && !mapreset && leveltime > introtime);
|
return (player->mo->health > 0 && !player->spectator && !P_PlayerInPain(player) && !mapreset && leveltime > introtime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
#include "../s_sound.h"
|
#include "../s_sound.h"
|
||||||
#include "../r_main.h"
|
#include "../r_main.h"
|
||||||
#include "../m_random.h"
|
#include "../m_random.h"
|
||||||
|
#include "../k_hitlag.h"
|
||||||
|
|
||||||
|
|
||||||
#define BULB_ZTHRUST 96*FRACUNIT
|
#define BULB_ZTHRUST 96*FRACUNIT
|
||||||
|
|
@ -143,7 +144,6 @@ void Obj_PlayerCloudThink(player_t *player)
|
||||||
if (player->cloud)
|
if (player->cloud)
|
||||||
{
|
{
|
||||||
player->cloud--;
|
player->cloud--;
|
||||||
P_InstaThrust(mo, 0, 0);
|
|
||||||
mo->momz = 0;
|
mo->momz = 0;
|
||||||
player->fastfall = 0;
|
player->fastfall = 0;
|
||||||
|
|
||||||
|
|
@ -157,6 +157,7 @@ void Obj_PlayerCloudThink(player_t *player)
|
||||||
player->cloudlaunch = TICRATE;
|
player->cloudlaunch = TICRATE;
|
||||||
|
|
||||||
P_InstaThrust(mo, mo->cusval, mo->cvmem);
|
P_InstaThrust(mo, mo->cusval, mo->cvmem);
|
||||||
|
K_AddHitLag(mo, 6, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,6 @@ void Obj_playerWPZTurbine(player_t *p)
|
||||||
if (mode && !distreached)
|
if (mode && !distreached)
|
||||||
p->turbineangle = (INT32)R_PointToAngle2(t->x, t->y, pmo->x, pmo->y);
|
p->turbineangle = (INT32)R_PointToAngle2(t->x, t->y, pmo->x, pmo->y);
|
||||||
|
|
||||||
p->spinouttimer = TICRATE;
|
|
||||||
pmo->pitch = 0;
|
pmo->pitch = 0;
|
||||||
|
|
||||||
// determine target x/y/z
|
// determine target x/y/z
|
||||||
|
|
@ -344,7 +343,6 @@ void Obj_playerWPZTurbine(player_t *p)
|
||||||
pmo->momy = (pmo->momy*17)/10;
|
pmo->momy = (pmo->momy*17)/10;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->spinouttimer = 0;
|
|
||||||
pmo->flags &= ~MF_NOCLIP;
|
pmo->flags &= ~MF_NOCLIP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
src/p_user.c
16
src/p_user.c
|
|
@ -405,7 +405,7 @@ UINT8 P_FindHighestLap(void)
|
||||||
//
|
//
|
||||||
boolean P_PlayerInPain(const player_t *player)
|
boolean P_PlayerInPain(const player_t *player)
|
||||||
{
|
{
|
||||||
if (player->spinouttimer || (player->tumbleBounces > 0) || (player->pflags & PF_FAULT) || player->icecube.frozen)
|
if (player->spinouttimer || (player->tumbleBounces > 0) || (player->pflags & PF_FAULT))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2539,9 +2539,19 @@ void P_MovePlayer(player_t *player)
|
||||||
player->glanceDir = 0;
|
player->glanceDir = 0;
|
||||||
player->pflags &= ~PF_GAINAX;
|
player->pflags &= ~PF_GAINAX;
|
||||||
}
|
}
|
||||||
else if ((player->pflags & PF_FAULT) || (player->spinouttimer > 0))
|
else if ((player->pflags & PF_FAULT) || (player->spinouttimer > 0) || (player->turbine && (player->mo->flags & MF_NOCLIP)))
|
||||||
{
|
{
|
||||||
UINT16 speed = ((player->pflags & PF_FAULT) ? player->nocontrol : player->spinouttimer)/8;
|
tic_t timer = 0;
|
||||||
|
|
||||||
|
if ((player->pflags & PF_FAULT))
|
||||||
|
timer = player->nocontrol;
|
||||||
|
else if (player->spinouttimer > 0)
|
||||||
|
timer = player->spinouttimer;
|
||||||
|
else if (player->turbine && (player->mo->flags & MF_NOCLIP))
|
||||||
|
timer = TICRATE;
|
||||||
|
|
||||||
|
UINT16 speed = timer / 8;
|
||||||
|
|
||||||
if (speed > 8)
|
if (speed > 8)
|
||||||
speed = 8;
|
speed = 8;
|
||||||
else if (speed < 1)
|
else if (speed < 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue