mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 09:42:33 +00:00
Merge branch 'bumpstuff' into sonicitems
This commit is contained in:
commit
6ddfc904da
13 changed files with 251 additions and 73 deletions
|
@ -318,6 +318,7 @@ typedef enum
|
||||||
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
|
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
|
||||||
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
||||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||||
|
k_wipeoutslow, // Timer before you slowdown when getting wiped out
|
||||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||||
k_comebacktimer, // Battle mode, how long before you become a bomb after death
|
k_comebacktimer, // Battle mode, how long before you become a bomb after death
|
||||||
k_sadtimer, // How long you've been sad
|
k_sadtimer, // How long you've been sad
|
||||||
|
|
|
@ -6277,6 +6277,13 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_INVULNFLASH3",
|
"S_INVULNFLASH3",
|
||||||
"S_INVULNFLASH4",
|
"S_INVULNFLASH4",
|
||||||
|
|
||||||
|
// Wipeout dust trail
|
||||||
|
"S_WIPEOUTTRAIL1",
|
||||||
|
"S_WIPEOUTTRAIL2",
|
||||||
|
"S_WIPEOUTTRAIL3",
|
||||||
|
"S_WIPEOUTTRAIL4",
|
||||||
|
"S_WIPEOUTTRAIL5",
|
||||||
|
|
||||||
//{ Eggman Monitor
|
//{ Eggman Monitor
|
||||||
"S_FAKEITEM1",
|
"S_FAKEITEM1",
|
||||||
"S_FAKEITEM2",
|
"S_FAKEITEM2",
|
||||||
|
@ -7147,6 +7154,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_SNEAKERTRAIL",
|
"MT_SNEAKERTRAIL",
|
||||||
"MT_SPARKLETRAIL",
|
"MT_SPARKLETRAIL",
|
||||||
"MT_INVULNFLASH",
|
"MT_INVULNFLASH",
|
||||||
|
"MT_WIPEOUTTRAIL",
|
||||||
"MT_DRIFT",
|
"MT_DRIFT",
|
||||||
"MT_DRIFTDUST",
|
"MT_DRIFTDUST",
|
||||||
|
|
||||||
|
@ -7628,6 +7636,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
||||||
"EGGMANHELD",
|
"EGGMANHELD",
|
||||||
"BANANADRAG",
|
"BANANADRAG",
|
||||||
"SPINOUTTIMER",
|
"SPINOUTTIMER",
|
||||||
|
"WIPEOUTSLOW",
|
||||||
"JUSTBUMPED",
|
"JUSTBUMPED",
|
||||||
"COMEBACKTIMER",
|
"COMEBACKTIMER",
|
||||||
"SADTIMER",
|
"SADTIMER",
|
||||||
|
|
|
@ -416,6 +416,7 @@ extern INT32 sneakertime;
|
||||||
extern INT32 itemtime;
|
extern INT32 itemtime;
|
||||||
extern INT32 comebacktime;
|
extern INT32 comebacktime;
|
||||||
extern INT32 bumptime;
|
extern INT32 bumptime;
|
||||||
|
extern INT32 wipeoutslowtime;
|
||||||
extern INT32 wantedreduce;
|
extern INT32 wantedreduce;
|
||||||
extern INT32 wantedfrequency;
|
extern INT32 wantedfrequency;
|
||||||
|
|
||||||
|
|
|
@ -215,6 +215,7 @@ INT32 sneakertime = TICRATE + (TICRATE/3);
|
||||||
INT32 itemtime = 8*TICRATE;
|
INT32 itemtime = 8*TICRATE;
|
||||||
INT32 comebacktime = 10*TICRATE;
|
INT32 comebacktime = 10*TICRATE;
|
||||||
INT32 bumptime = 6;
|
INT32 bumptime = 6;
|
||||||
|
INT32 wipeoutslowtime = 20;
|
||||||
INT32 wantedreduce = 5*TICRATE;
|
INT32 wantedreduce = 5*TICRATE;
|
||||||
INT32 wantedfrequency = 10*TICRATE;
|
INT32 wantedfrequency = 10*TICRATE;
|
||||||
|
|
||||||
|
|
43
src/info.c
43
src/info.c
|
@ -55,11 +55,11 @@ char sprnames[NUMSPRITES + 1][5] =
|
||||||
"GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI",
|
"GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI",
|
||||||
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
|
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
|
||||||
//SRB2kart Sprites
|
//SRB2kart Sprites
|
||||||
"SPRG","BSPR","RNDM","RPOP","KFRE","KINV","KINF","DRIF","DUST","FITM",
|
"SPRG","BSPR","RNDM","RPOP","KFRE","KINV","KINF","WIPD","DRIF","DUST",
|
||||||
"BANA","GSHE","JAWZ","SSMN","KRBM","BHOG","BLIG","LIGH","SINK","SITR",
|
"FITM","BANA","GSHE","JAWZ","SSMN","KRBM","BHOG","BLIG","LIGH","SINK",
|
||||||
"KBLN","DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB",
|
"SITR","KBLN","DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS",
|
||||||
"CHOM","SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ARRO",
|
"BUZB","CHOM","SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW",
|
||||||
"ITEM","ITMI","ITMN","WANT","PBOM","VIEW"
|
"ARRO","ITEM","ITMI","ITMN","WANT","PBOM","VIEW"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||||
|
@ -2603,6 +2603,12 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_KINF, FF_FULLBRIGHT|FF_TRANS90|1, 1, {NULL}, 0, 0, S_INVULNFLASH4}, // S_INVULNFLASH3
|
{SPR_KINF, FF_FULLBRIGHT|FF_TRANS90|1, 1, {NULL}, 0, 0, S_INVULNFLASH4}, // S_INVULNFLASH3
|
||||||
{SPR_NULL, FF_FULLBRIGHT|FF_TRANS90, 1, {NULL}, 0, 0, S_INVULNFLASH1}, // S_INVULNFLASH4
|
{SPR_NULL, FF_FULLBRIGHT|FF_TRANS90, 1, {NULL}, 0, 0, S_INVULNFLASH1}, // S_INVULNFLASH4
|
||||||
|
|
||||||
|
{SPR_WIPD, 0, 3, {NULL}, 0, 0, S_WIPEOUTTRAIL2}, // S_WIPEOUTTRAIL1
|
||||||
|
{SPR_WIPD, 1, 3, {NULL}, 0, 0, S_WIPEOUTTRAIL3}, // S_WIPEOUTTRAIL2
|
||||||
|
{SPR_WIPD, 2, 3, {NULL}, 0, 0, S_WIPEOUTTRAIL4}, // S_WIPEOUTTRAIL3
|
||||||
|
{SPR_WIPD, 3, 3, {NULL}, 0, 0, S_WIPEOUTTRAIL5}, // S_WIPEOUTTRAIL4
|
||||||
|
{SPR_WIPD, 4, 3, {NULL}, 0, 0, S_NULL}, // S_WIPEOUTTRAIL5
|
||||||
|
|
||||||
{SPR_FITM, 0|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM2}, // S_FAKEITEM1
|
{SPR_FITM, 0|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM2}, // S_FAKEITEM1
|
||||||
{SPR_FITM, 1|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM3}, // S_FAKEITEM2
|
{SPR_FITM, 1|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM3}, // S_FAKEITEM2
|
||||||
{SPR_FITM, 2|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM4}, // S_FAKEITEM3
|
{SPR_FITM, 2|FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM4}, // S_FAKEITEM3
|
||||||
|
@ -14409,6 +14415,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // MT_WIPEOUTTRAIL
|
||||||
|
-1, // doomednum
|
||||||
|
S_WIPEOUTTRAIL1, // spawnstate
|
||||||
|
1, // spawnhealth
|
||||||
|
S_NULL, // seestate
|
||||||
|
sfx_None, // seesound
|
||||||
|
8, // reactiontime
|
||||||
|
sfx_None, // attacksound
|
||||||
|
S_NULL, // painstate
|
||||||
|
0, // painchance
|
||||||
|
sfx_None, // painsound
|
||||||
|
S_NULL, // meleestate
|
||||||
|
S_NULL, // missilestate
|
||||||
|
S_NULL, // deathstate
|
||||||
|
S_NULL, // xdeathstate
|
||||||
|
sfx_None, // deathsound
|
||||||
|
8, // speed
|
||||||
|
14*FRACUNIT, // radius
|
||||||
|
14*FRACUNIT, // height
|
||||||
|
0, // display offset
|
||||||
|
100, // mass
|
||||||
|
0, // damage
|
||||||
|
sfx_None, // activesound
|
||||||
|
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||||
|
S_NULL // raisestate
|
||||||
|
},
|
||||||
|
|
||||||
{ // MT_DRIFT
|
{ // MT_DRIFT
|
||||||
-1, // doomednum
|
-1, // doomednum
|
||||||
S_DRIFTSPARK1, // spawnstate
|
S_DRIFTSPARK1, // spawnstate
|
||||||
|
|
|
@ -584,6 +584,7 @@ typedef enum sprite
|
||||||
SPR_KFRE, // Sneaker fire trail
|
SPR_KFRE, // Sneaker fire trail
|
||||||
SPR_KINV, // Invincibility sparkle trail
|
SPR_KINV, // Invincibility sparkle trail
|
||||||
SPR_KINF, // Invincibility flash
|
SPR_KINF, // Invincibility flash
|
||||||
|
SPR_WIPD, // Wipeout dust trail
|
||||||
SPR_DRIF, // Drift Sparks
|
SPR_DRIF, // Drift Sparks
|
||||||
SPR_DUST, // Drift Dust
|
SPR_DUST, // Drift Dust
|
||||||
|
|
||||||
|
@ -3115,6 +3116,13 @@ typedef enum state
|
||||||
S_INVULNFLASH3,
|
S_INVULNFLASH3,
|
||||||
S_INVULNFLASH4,
|
S_INVULNFLASH4,
|
||||||
|
|
||||||
|
// Wipeout dust trail
|
||||||
|
S_WIPEOUTTRAIL1,
|
||||||
|
S_WIPEOUTTRAIL2,
|
||||||
|
S_WIPEOUTTRAIL3,
|
||||||
|
S_WIPEOUTTRAIL4,
|
||||||
|
S_WIPEOUTTRAIL5,
|
||||||
|
|
||||||
//{ Eggman Monitor
|
//{ Eggman Monitor
|
||||||
S_FAKEITEM1,
|
S_FAKEITEM1,
|
||||||
S_FAKEITEM2,
|
S_FAKEITEM2,
|
||||||
|
@ -4002,6 +4010,7 @@ typedef enum mobj_type
|
||||||
MT_SNEAKERTRAIL,
|
MT_SNEAKERTRAIL,
|
||||||
MT_SPARKLETRAIL,
|
MT_SPARKLETRAIL,
|
||||||
MT_INVULNFLASH,
|
MT_INVULNFLASH,
|
||||||
|
MT_WIPEOUTTRAIL,
|
||||||
MT_DRIFT,
|
MT_DRIFT,
|
||||||
MT_DRIFTDUST,
|
MT_DRIFTDUST,
|
||||||
|
|
||||||
|
|
183
src/k_kart.c
183
src/k_kart.c
|
@ -930,11 +930,46 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
//{ SRB2kart p_user.c Stuff
|
//{ SRB2kart p_user.c Stuff
|
||||||
|
|
||||||
|
static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
||||||
|
{
|
||||||
|
fixed_t weight = 5<<FRACBITS;
|
||||||
|
|
||||||
|
switch (mobj->type)
|
||||||
|
{
|
||||||
|
case MT_PLAYER:
|
||||||
|
if (!mobj->player)
|
||||||
|
break;
|
||||||
|
if (against->player && !against->player->kartstuff[k_spinouttimer] && mobj->player->kartstuff[k_spinouttimer])
|
||||||
|
weight = 0; // Do not bump
|
||||||
|
else
|
||||||
|
weight = (mobj->player->kartweight)<<FRACBITS;
|
||||||
|
break;
|
||||||
|
case MT_GREENITEM:
|
||||||
|
case MT_GREENSHIELD:
|
||||||
|
if (against->player)
|
||||||
|
weight = (against->player->kartweight)<<FRACBITS;
|
||||||
|
break;
|
||||||
|
case MT_JAWZ:
|
||||||
|
case MT_JAWZ_DUD:
|
||||||
|
case MT_JAWZ_SHIELD:
|
||||||
|
if (against->player)
|
||||||
|
weight = (against->player->kartweight+3)<<FRACBITS;
|
||||||
|
else
|
||||||
|
weight = 8<<FRACBITS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
{
|
{
|
||||||
mobj_t *fx;
|
mobj_t *fx;
|
||||||
fixed_t momdifx, momdify;
|
fixed_t momdifx, momdify;
|
||||||
fixed_t distx, disty;
|
fixed_t distx, disty;
|
||||||
|
//fixed_t nobumpx = 0, nobumpy = 0;
|
||||||
fixed_t dot, p;
|
fixed_t dot, p;
|
||||||
fixed_t mass1, mass2;
|
fixed_t mass1, mass2;
|
||||||
|
|
||||||
|
@ -951,44 +986,24 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Don't bump if you've recently bumped
|
// Don't bump if you've recently bumped
|
||||||
if ((mobj1->player && mobj1->player->kartstuff[k_justbumped])
|
if (mobj1->player && mobj1->player->kartstuff[k_justbumped])
|
||||||
|| (mobj2->player && mobj1->player->kartstuff[k_justbumped]))
|
|
||||||
{
|
{
|
||||||
if (mobj1->player)
|
mobj1->player->kartstuff[k_justbumped] = bumptime;
|
||||||
mobj1->player->kartstuff[k_justbumped] = bumptime;
|
|
||||||
if (mobj2->player)
|
|
||||||
mobj2->player->kartstuff[k_justbumped] = bumptime;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
S_StartSound(mobj1, sfx_s3k49);
|
if (mobj2->player && mobj2->player->kartstuff[k_justbumped])
|
||||||
|
|
||||||
fx = P_SpawnMobj(mobj1->x/2 + mobj2->x/2, mobj1->y/2 + mobj2->y/2, mobj1->z/2 + mobj2->z/2, MT_BUMP);
|
|
||||||
if (mobj1->eflags & MFE_VERTICALFLIP)
|
|
||||||
fx->eflags |= MFE_VERTICALFLIP;
|
|
||||||
else
|
|
||||||
fx->eflags &= ~MFE_VERTICALFLIP;
|
|
||||||
fx->scale = mobj1->scale;
|
|
||||||
|
|
||||||
if (bounce == true) // Perform a Goomba Bounce.
|
|
||||||
mobj1->momz = -mobj1->momz;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
fixed_t newz = mobj1->momz;
|
mobj2->player->kartstuff[k_justbumped] = bumptime;
|
||||||
mobj1->momz = mobj2->momz;
|
return;
|
||||||
if (solid == false)
|
|
||||||
mobj2->momz = newz;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mass1 = mass2 = 5*FRACUNIT;
|
mass1 = K_GetMobjWeight(mobj1, mobj2);
|
||||||
|
|
||||||
if (mobj1->player)
|
if (solid == true && mass1 > 0)
|
||||||
mass1 = (mobj1->player->kartweight)*FRACUNIT;
|
|
||||||
|
|
||||||
if (mobj2->player)
|
|
||||||
mass2 = (mobj2->player->kartweight)*FRACUNIT;
|
|
||||||
else if (solid == true)
|
|
||||||
mass2 = mass1;
|
mass2 = mass1;
|
||||||
|
else
|
||||||
|
mass2 = K_GetMobjWeight(mobj2, mobj1);
|
||||||
|
|
||||||
momdifx = mobj1->momx - mobj2->momx;
|
momdifx = mobj1->momx - mobj2->momx;
|
||||||
momdify = mobj1->momy - mobj2->momy;
|
momdify = mobj1->momy - mobj2->momy;
|
||||||
|
@ -1003,8 +1018,19 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
momdify = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedy);
|
momdify = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedy);
|
||||||
}
|
}
|
||||||
|
|
||||||
distx = mobj1->x - mobj2->x;
|
/*if (mass1 == 0 && mass2 > 0)
|
||||||
disty = mobj1->y - mobj2->y;
|
{
|
||||||
|
nobumpx = mobj2->momx;
|
||||||
|
nobumpy = mobj2->momy;
|
||||||
|
}
|
||||||
|
else if (mass2 == 0 && mass1 > 0)
|
||||||
|
{
|
||||||
|
nobumpx = mobj1->momx;
|
||||||
|
nobumpy = mobj1->momy;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
distx = (mobj1->x + mobj2->momx) - (mobj2->x + mobj1->momx);
|
||||||
|
disty = (mobj1->y + mobj2->momy) - (mobj2->y + mobj1->momy);
|
||||||
|
|
||||||
if (distx == 0 && disty == 0)
|
if (distx == 0 && disty == 0)
|
||||||
{
|
{
|
||||||
|
@ -1022,15 +1048,39 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
|
|
||||||
p = FixedDiv(dot, FixedMul(distx, distx)+FixedMul(disty, disty));
|
p = FixedDiv(dot, FixedMul(distx, distx)+FixedMul(disty, disty));
|
||||||
|
|
||||||
mobj1->momx = mobj1->momx - FixedMul(FixedMul(FixedDiv(2*mass2, mass1 + mass2), p), distx);
|
if (bounce == true && mass2 > 0) // Perform a Goomba Bounce.
|
||||||
mobj1->momy = mobj1->momy - FixedMul(FixedMul(FixedDiv(2*mass2, mass1 + mass2), p), disty);
|
mobj1->momz = -mobj1->momz;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fixed_t newz = mobj1->momz;
|
||||||
|
if (mass2 > 0)
|
||||||
|
mobj1->momz = mobj2->momz;
|
||||||
|
if (mass1 > 0 && solid == false)
|
||||||
|
mobj2->momz = newz;
|
||||||
|
}
|
||||||
|
|
||||||
if (solid == false)
|
if (mass2 > 0)
|
||||||
|
{
|
||||||
|
mobj1->momx = mobj1->momx - FixedMul(FixedMul(FixedDiv(2*mass2, mass1 + mass2), p), distx);
|
||||||
|
mobj1->momy = mobj1->momy - FixedMul(FixedMul(FixedDiv(2*mass2, mass1 + mass2), p), disty);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mass1 > 0 && solid == false)
|
||||||
{
|
{
|
||||||
mobj2->momx = mobj2->momx - FixedMul(FixedMul(FixedDiv(2*mass1, mass1 + mass2), p), -distx);
|
mobj2->momx = mobj2->momx - FixedMul(FixedMul(FixedDiv(2*mass1, mass1 + mass2), p), -distx);
|
||||||
mobj2->momy = mobj2->momy - FixedMul(FixedMul(FixedDiv(2*mass1, mass1 + mass2), p), -disty);
|
mobj2->momy = mobj2->momy - FixedMul(FixedMul(FixedDiv(2*mass1, mass1 + mass2), p), -disty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do the bump fx when we've CONFIRMED we can bump.
|
||||||
|
S_StartSound(mobj1, sfx_s3k49);
|
||||||
|
|
||||||
|
fx = P_SpawnMobj(mobj1->x/2 + mobj2->x/2, mobj1->y/2 + mobj2->y/2, mobj1->z/2 + mobj2->z/2, MT_BUMP);
|
||||||
|
if (mobj1->eflags & MFE_VERTICALFLIP)
|
||||||
|
fx->eflags |= MFE_VERTICALFLIP;
|
||||||
|
else
|
||||||
|
fx->eflags &= ~MFE_VERTICALFLIP;
|
||||||
|
fx->scale = mobj1->scale;
|
||||||
|
|
||||||
// Because this is done during collision now, rmomx and rmomy need to be recalculated
|
// Because this is done during collision now, rmomx and rmomy need to be recalculated
|
||||||
// so that friction doesn't immediately decide to stop the player if they're at a standstill
|
// so that friction doesn't immediately decide to stop the player if they're at a standstill
|
||||||
// Also set justbumped here
|
// Also set justbumped here
|
||||||
|
@ -1039,6 +1089,11 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
mobj1->player->rmomx = mobj1->momx - mobj1->player->cmomx;
|
mobj1->player->rmomx = mobj1->momx - mobj1->player->cmomx;
|
||||||
mobj1->player->rmomy = mobj1->momy - mobj1->player->cmomy;
|
mobj1->player->rmomy = mobj1->momy - mobj1->player->cmomy;
|
||||||
mobj1->player->kartstuff[k_justbumped] = bumptime;
|
mobj1->player->kartstuff[k_justbumped] = bumptime;
|
||||||
|
if (mobj1->player->kartstuff[k_spinouttimer])
|
||||||
|
{
|
||||||
|
mobj1->player->kartstuff[k_wipeoutslow] += wipeoutslowtime+1;
|
||||||
|
mobj1->player->kartstuff[k_spinouttimer] += wipeoutslowtime+1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mobj2->player)
|
if (mobj2->player)
|
||||||
|
@ -1046,6 +1101,11 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
|
||||||
mobj2->player->rmomx = mobj2->momx - mobj2->player->cmomx;
|
mobj2->player->rmomx = mobj2->momx - mobj2->player->cmomx;
|
||||||
mobj2->player->rmomy = mobj2->momy - mobj2->player->cmomy;
|
mobj2->player->rmomy = mobj2->momy - mobj2->player->cmomy;
|
||||||
mobj2->player->kartstuff[k_justbumped] = bumptime;
|
mobj2->player->kartstuff[k_justbumped] = bumptime;
|
||||||
|
if (mobj2->player->kartstuff[k_spinouttimer])
|
||||||
|
{
|
||||||
|
mobj2->player->kartstuff[k_wipeoutslow] += wipeoutslowtime+1;
|
||||||
|
mobj2->player->kartstuff[k_spinouttimer] += wipeoutslowtime+1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1333,12 +1393,15 @@ static fixed_t K_GetKartBoostPower(player_t *player, boolean speed)
|
||||||
fixed_t boostpower = FRACUNIT;
|
fixed_t boostpower = FRACUNIT;
|
||||||
fixed_t boostvalue = 0;
|
fixed_t boostvalue = 0;
|
||||||
|
|
||||||
|
if (player->kartstuff[k_spinouttimer] && player->kartstuff[k_wipeoutslow] == 1) // Slow down after you've been bumped
|
||||||
|
return 0;
|
||||||
|
|
||||||
// Offroad is separate, it's difficult to factor it in with a variable value anyway.
|
// Offroad is separate, it's difficult to factor it in with a variable value anyway.
|
||||||
if (!(player->kartstuff[k_invincibilitytimer] || player->kartstuff[k_hyudorotimer] || player->kartstuff[k_sneakertimer])
|
if (!(player->kartstuff[k_invincibilitytimer] || player->kartstuff[k_hyudorotimer] || player->kartstuff[k_sneakertimer])
|
||||||
&& player->kartstuff[k_offroad] >= 0 && speed)
|
&& player->kartstuff[k_offroad] >= 0 && speed)
|
||||||
boostpower = FixedDiv(boostpower, player->kartstuff[k_offroad] + FRACUNIT);
|
boostpower = FixedDiv(boostpower, player->kartstuff[k_offroad] + FRACUNIT);
|
||||||
|
|
||||||
if (player->kartstuff[k_bananadrag] > TICRATE) // Avoid making x10 banana a hassle to use
|
if (player->kartstuff[k_bananadrag] > TICRATE)
|
||||||
boostpower = 4*boostpower/5;
|
boostpower = 4*boostpower/5;
|
||||||
|
|
||||||
if (player->kartstuff[k_growshrinktimer] > 0)
|
if (player->kartstuff[k_growshrinktimer] > 0)
|
||||||
|
@ -1556,7 +1619,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem
|
||||||
S_StartSound(player->mo, sfx_slip);
|
S_StartSound(player->mo, sfx_slip);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
player->kartstuff[k_spinouttimer] = 1*TICRATE; // Wipeout
|
player->kartstuff[k_spinouttimer] = TICRATE+20; // Wipeout
|
||||||
|
|
||||||
player->powers[pw_flashing] = K_GetKartFlashing();
|
player->powers[pw_flashing] = K_GetKartFlashing();
|
||||||
|
|
||||||
|
@ -2079,6 +2142,22 @@ void K_SpawnSparkleTrail(mobj_t *mo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void K_SpawnWipeoutTrail(mobj_t *mo)
|
||||||
|
{
|
||||||
|
mobj_t *dust;
|
||||||
|
|
||||||
|
I_Assert(mo != NULL);
|
||||||
|
I_Assert(!P_MobjWasRemoved(mo));
|
||||||
|
|
||||||
|
dust = P_SpawnMobj(mo->x + (P_RandomRange(-25,25)<<FRACBITS), mo->y + (P_RandomRange(-25,25)<<FRACBITS), mo->z, MT_WIPEOUTTRAIL);
|
||||||
|
|
||||||
|
P_SetTarget(&dust->target, mo);
|
||||||
|
dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy);
|
||||||
|
dust->destscale = mo->scale;
|
||||||
|
P_SetScale(dust, mo->scale);
|
||||||
|
dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP);
|
||||||
|
}
|
||||||
|
|
||||||
// K_DriftDustHandling
|
// K_DriftDustHandling
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// spawner: The map object that is spawning the drift dust
|
// spawner: The map object that is spawning the drift dust
|
||||||
|
@ -2789,17 +2868,27 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
if ((P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1)
|
if ((P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1)
|
||||||
&& (player->kartstuff[k_sneakertimer] == 0))
|
&& (player->kartstuff[k_sneakertimer] == 0))
|
||||||
|
{
|
||||||
player->kartstuff[k_spinouttimer]--;
|
player->kartstuff[k_spinouttimer]--;
|
||||||
if (player->kartstuff[k_spinouttimer] == 0)
|
if (player->kartstuff[k_wipeoutslow] > 1)
|
||||||
player->kartstuff[k_spinouttype] = 0; // Reset type
|
player->kartstuff[k_wipeoutslow]--;
|
||||||
|
if (player->kartstuff[k_spinouttimer] == 0)
|
||||||
|
player->kartstuff[k_spinouttype] = 0; // Reset type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!comeback)
|
else
|
||||||
player->kartstuff[k_comebacktimer] = comebacktime;
|
|
||||||
else if (player->kartstuff[k_comebacktimer])
|
|
||||||
{
|
{
|
||||||
player->kartstuff[k_comebacktimer]--;
|
if (player->kartstuff[k_wipeoutslow] == 1)
|
||||||
if (P_IsLocalPlayer(player) && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer] <= 0)
|
player->mo->friction = ORIG_FRICTION;
|
||||||
comebackshowninfo = true; // client has already seen the message
|
player->kartstuff[k_wipeoutslow] = 0;
|
||||||
|
if (!comeback)
|
||||||
|
player->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
|
else if (player->kartstuff[k_comebacktimer])
|
||||||
|
{
|
||||||
|
player->kartstuff[k_comebacktimer]--;
|
||||||
|
if (P_IsLocalPlayer(player) && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer] <= 0)
|
||||||
|
comebackshowninfo = true; // client has already seen the message
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->kartstuff[k_spinouttimer] == 0 && player->powers[pw_flashing] == K_GetKartFlashing())
|
if (player->kartstuff[k_spinouttimer] == 0 && player->powers[pw_flashing] == K_GetKartFlashing())
|
||||||
|
@ -3805,6 +3894,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (player->mo->movefactor < 32)
|
if (player->mo->movefactor < 32)
|
||||||
player->mo->movefactor = 32;
|
player->mo->movefactor = 32;
|
||||||
}
|
}
|
||||||
|
if (player->kartstuff[k_spinouttimer] && player->kartstuff[k_wipeoutslow])
|
||||||
|
{
|
||||||
|
player->mo->friction -= FixedMul(1228, player->kartstuff[k_offroad]);
|
||||||
|
if (player->kartstuff[k_wipeoutslow] == 1)
|
||||||
|
player->mo->friction -= 4912;
|
||||||
|
}
|
||||||
|
|
||||||
K_KartDrift(player, onground);
|
K_KartDrift(player, onground);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
|
||||||
void K_SpawnMineExplosion(mobj_t *source, UINT8 color);
|
void K_SpawnMineExplosion(mobj_t *source, UINT8 color);
|
||||||
void K_SpawnBoostTrail(player_t *player);
|
void K_SpawnBoostTrail(player_t *player);
|
||||||
void K_SpawnSparkleTrail(mobj_t *mo);
|
void K_SpawnSparkleTrail(mobj_t *mo);
|
||||||
|
void K_SpawnWipeoutTrail(mobj_t *mo);
|
||||||
void K_DriftDustHandling(mobj_t *spawner);
|
void K_DriftDustHandling(mobj_t *spawner);
|
||||||
void K_DoSneaker(player_t *player, boolean doPFlag);
|
void K_DoSneaker(player_t *player, boolean doPFlag);
|
||||||
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, boolean mute);
|
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, boolean mute);
|
||||||
|
|
|
@ -2132,6 +2132,16 @@ static int lib_kSpawnSparkleTrail(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_kSpawnWipeoutTrail(lua_State *L)
|
||||||
|
{
|
||||||
|
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
NOHUD
|
||||||
|
if (!mo)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
K_SpawnWipeoutTrail(mo);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_kDriftDustHandling(lua_State *L)
|
static int lib_kDriftDustHandling(lua_State *L)
|
||||||
{
|
{
|
||||||
mobj_t *spawner = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
mobj_t *spawner = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
@ -2418,6 +2428,7 @@ static luaL_Reg lib[] = {
|
||||||
{"K_SpawnKartExplosion",lib_kSpawnKartExplosion},
|
{"K_SpawnKartExplosion",lib_kSpawnKartExplosion},
|
||||||
{"K_SpawnBoostTrail",lib_kSpawnBoostTrail},
|
{"K_SpawnBoostTrail",lib_kSpawnBoostTrail},
|
||||||
{"K_SpawnSparkleTrail",lib_kSpawnSparkleTrail},
|
{"K_SpawnSparkleTrail",lib_kSpawnSparkleTrail},
|
||||||
|
{"K_SpawnWipeoutTrail",lib_kSpawnWipeoutTrail},
|
||||||
{"K_DriftDustHandling",lib_kDriftDustHandling},
|
{"K_DriftDustHandling",lib_kDriftDustHandling},
|
||||||
{"K_DoSneaker",lib_kDoSneaker},
|
{"K_DoSneaker",lib_kDoSneaker},
|
||||||
{"K_DoPogoSpring",lib_kDoPogoSpring},
|
{"K_DoPogoSpring",lib_kDoPogoSpring},
|
||||||
|
|
|
@ -3325,7 +3325,8 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
damage = player->mo->health - 1;
|
damage = player->mo->health - 1;
|
||||||
P_RingDamage(player, inflictor, source, damage);
|
P_RingDamage(player, inflictor, source, damage);
|
||||||
P_PlayerRingBurst(player, 5);
|
P_PlayerRingBurst(player, 5);
|
||||||
player->mo->momx = player->mo->momy = 0;
|
if (inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD)
|
||||||
|
player->mo->momx = player->mo->momy = 0;
|
||||||
if (P_IsLocalPlayer(player))
|
if (P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
quake.intensity = 32*FRACUNIT;
|
quake.intensity = 32*FRACUNIT;
|
||||||
|
|
25
src/p_map.c
25
src/p_map.c
|
@ -694,6 +694,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
{
|
{
|
||||||
// Player Damage
|
// Player Damage
|
||||||
P_DamageMobj(thing, tmthing, tmthing->target, 1);
|
P_DamageMobj(thing, tmthing, tmthing->target, 1);
|
||||||
|
K_KartBouncing(thing, tmthing, false, false);
|
||||||
|
|
||||||
if (tmthing->type == MT_GREENITEM || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD)
|
if (tmthing->type == MT_GREENITEM || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD)
|
||||||
S_StartSound(thing, sfx_shelit);
|
S_StartSound(thing, sfx_shelit);
|
||||||
|
@ -1126,6 +1127,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
// Player Damage
|
// Player Damage
|
||||||
P_DamageMobj(tmthing, thing, thing->target, 1);
|
P_DamageMobj(tmthing, thing, thing->target, 1);
|
||||||
|
|
||||||
|
if (thing->type != MT_FAKESHIELD && thing->type != MT_FAKEITEM)
|
||||||
|
K_KartBouncing(tmthing, thing, false, false);
|
||||||
|
|
||||||
if (thing->type == MT_GREENITEM || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)
|
if (thing->type == MT_GREENITEM || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)
|
||||||
S_StartSound(tmthing, sfx_shelit);
|
S_StartSound(tmthing, sfx_shelit);
|
||||||
|
|
||||||
|
@ -1629,18 +1633,23 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
}
|
}
|
||||||
else if (thing->player) // bounce when players collide
|
else if (thing->player) // bounce when players collide
|
||||||
{
|
{
|
||||||
|
const boolean tvulnerable = (!(thing->player->powers[pw_flashing]
|
||||||
|
|| thing->player->kartstuff[k_invincibilitytimer]
|
||||||
|
|| thing->player->kartstuff[k_spinouttimer]));
|
||||||
|
const boolean tmtvulnerable = (!(tmthing->player->powers[pw_flashing]
|
||||||
|
|| tmthing->player->kartstuff[k_invincibilitytimer]
|
||||||
|
|| tmthing->player->kartstuff[k_spinouttimer]));
|
||||||
|
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
if (tmthing->z > thing->z + thing->height)
|
if (tmthing->z > thing->z + thing->height)
|
||||||
return true; // overhead
|
return true; // overhead
|
||||||
if (tmthing->z + tmthing->height < thing->z)
|
if (tmthing->z + tmthing->height < thing->z)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
|
|
||||||
if (thing->player->kartstuff[k_spinouttimer] || thing->player->kartstuff[k_squishedtimer]
|
if (thing->player->kartstuff[k_squishedtimer] || thing->player->kartstuff[k_hyudorotimer]
|
||||||
|| thing->player->kartstuff[k_hyudorotimer] || thing->player->kartstuff[k_invincibilitytimer]
|
|
||||||
|| thing->player->kartstuff[k_justbumped] || thing->scale > tmthing->scale + (FRACUNIT/8)
|
|| thing->player->kartstuff[k_justbumped] || thing->scale > tmthing->scale + (FRACUNIT/8)
|
||||||
|| (G_BattleGametype() && thing->player->kartstuff[k_bumper] <= 0)
|
|| (G_BattleGametype() && thing->player->kartstuff[k_bumper] <= 0)
|
||||||
|| tmthing->player->kartstuff[k_spinouttimer] || tmthing->player->kartstuff[k_squishedtimer]
|
|| tmthing->player->kartstuff[k_squishedtimer] || tmthing->player->kartstuff[k_hyudorotimer]
|
||||||
|| tmthing->player->kartstuff[k_hyudorotimer] || tmthing->player->kartstuff[k_invincibilitytimer]
|
|
||||||
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (FRACUNIT/8)
|
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (FRACUNIT/8)
|
||||||
|| (G_BattleGametype() && tmthing->player->kartstuff[k_bumper] <= 0))
|
|| (G_BattleGametype() && tmthing->player->kartstuff[k_bumper] <= 0))
|
||||||
{
|
{
|
||||||
|
@ -1650,7 +1659,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
||||||
{
|
{
|
||||||
K_KartBouncing(tmthing, thing, true, false);
|
K_KartBouncing(tmthing, thing, true, false);
|
||||||
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring])
|
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring] && tvulnerable)
|
||||||
{
|
{
|
||||||
K_StealBumper(tmthing->player, thing->player, false);
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
K_SpinPlayer(thing->player, tmthing, 0, false);
|
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||||
|
@ -1659,7 +1668,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
||||||
{
|
{
|
||||||
K_KartBouncing(thing, tmthing, true, false);
|
K_KartBouncing(thing, tmthing, true, false);
|
||||||
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring])
|
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring] && tmtvulnerable)
|
||||||
{
|
{
|
||||||
K_StealBumper(thing->player, tmthing->player, false);
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
K_SpinPlayer(tmthing->player, thing, 0, false);
|
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||||
|
@ -1670,12 +1679,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]))
|
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && tmtvulnerable)
|
||||||
{
|
{
|
||||||
K_StealBumper(thing->player, tmthing->player, false);
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
K_SpinPlayer(tmthing->player, thing, 0, false);
|
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||||
}
|
}
|
||||||
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]))
|
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && tvulnerable)
|
||||||
{
|
{
|
||||||
K_StealBumper(tmthing->player, thing->player, false);
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
K_SpinPlayer(thing->player, tmthing, 0, false);
|
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||||
|
|
14
src/p_mobj.c
14
src/p_mobj.c
|
@ -2003,7 +2003,7 @@ void P_XYMovement(mobj_t *mo)
|
||||||
if (mo->type == MT_GREENITEM || mo->type == MT_JAWZ_DUD || mo->type == MT_JAWZ || mo->type == MT_BALLHOG) //(mo->type == MT_JAWZ && !mo->tracer))
|
if (mo->type == MT_GREENITEM || mo->type == MT_JAWZ_DUD || mo->type == MT_JAWZ || mo->type == MT_BALLHOG) //(mo->type == MT_JAWZ && !mo->tracer))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mo->player && mo->player->kartstuff[k_spinouttimer] && mo->player->speed <= mo->player->normalspeed/2)
|
if (mo->player && (mo->player->kartstuff[k_spinouttimer] && !mo->player->kartstuff[k_wipeoutslow]) && mo->player->speed <= mo->player->normalspeed/2)
|
||||||
return;
|
return;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@ -2889,16 +2889,16 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
// Cut momentum in half when you hit the ground and
|
// Cut momentum in half when you hit the ground and
|
||||||
// aren't pressing any controls.
|
// aren't pressing any controls.
|
||||||
if (!(mo->player->cmd.forwardmove || mo->player->cmd.sidemove) && !mo->player->cmomx && !mo->player->cmomy
|
if (!(mo->player->cmd.forwardmove || mo->player->cmd.sidemove) && !mo->player->cmomx && !mo->player->cmomy
|
||||||
&& !(mo->player->pflags & PF_SPINNING) && !(mo->player->kartstuff[k_spinouttimer]))
|
&& !(mo->player->kartstuff[k_spinouttimer]))
|
||||||
{
|
{
|
||||||
mo->momx = mo->momx/2;
|
mo->momx = mo->momx/2;
|
||||||
mo->momy = mo->momy/2;
|
mo->momy = mo->momy/2;
|
||||||
}
|
|
||||||
|
|
||||||
if (mo->player->cmd.buttons & BT_BRAKE && !(mo->player->cmd.forwardmove)) // FURTHER slowdown if you're braking.
|
if (mo->player->cmd.buttons & BT_BRAKE && !(mo->player->cmd.forwardmove)) // FURTHER slowdown if you're braking.
|
||||||
{
|
{
|
||||||
mo->momx = mo->momx/2;
|
mo->momx = mo->momx/2;
|
||||||
mo->momy = mo->momy/2;
|
mo->momy = mo->momy/2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
src/p_user.c
23
src/p_user.c
|
@ -852,15 +852,19 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
|
||||||
angle_t ang;
|
angle_t ang;
|
||||||
fixed_t fallbackspeed;
|
fixed_t fallbackspeed;
|
||||||
|
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (inflictor && (inflictor->type != MT_PLAYER && inflictor->type != MT_GREENITEM && inflictor->type != MT_GREENSHIELD
|
||||||
player->mo->z--;
|
&& inflictor->type != MT_JAWZ && inflictor->type != MT_JAWZ_DUD && inflictor->type != MT_JAWZ_SHIELD))
|
||||||
else
|
{
|
||||||
player->mo->z++;
|
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
player->mo->z--;
|
||||||
|
else
|
||||||
|
player->mo->z++;
|
||||||
|
|
||||||
if (player->mo->eflags & MFE_UNDERWATER)
|
if (player->mo->eflags & MFE_UNDERWATER)
|
||||||
P_SetObjectMomZ(player->mo, FixedDiv(10511*FRACUNIT,2600*FRACUNIT), false);
|
P_SetObjectMomZ(player->mo, FixedDiv(10511*FRACUNIT,2600*FRACUNIT), false);
|
||||||
else
|
else
|
||||||
P_SetObjectMomZ(player->mo, FixedDiv(69*FRACUNIT,10*FRACUNIT), false);
|
P_SetObjectMomZ(player->mo, FixedDiv(69*FRACUNIT,10*FRACUNIT), false);
|
||||||
|
}
|
||||||
|
|
||||||
if (inflictor)
|
if (inflictor)
|
||||||
{
|
{
|
||||||
|
@ -6933,6 +6937,9 @@ static void P_MovePlayer(player_t *player)
|
||||||
if (player->kartstuff[k_invincibilitytimer] > 0)
|
if (player->kartstuff[k_invincibilitytimer] > 0)
|
||||||
K_SpawnSparkleTrail(player->mo);
|
K_SpawnSparkleTrail(player->mo);
|
||||||
|
|
||||||
|
if (player->kartstuff[k_wipeoutslow] > 1 && (leveltime & 1))
|
||||||
|
K_SpawnWipeoutTrail(player->mo);
|
||||||
|
|
||||||
K_DriftDustHandling(player->mo);
|
K_DriftDustHandling(player->mo);
|
||||||
|
|
||||||
/* // SRB2kart - nadah
|
/* // SRB2kart - nadah
|
||||||
|
|
Loading…
Reference in a new issue