mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
Rocket Sneakers appear beside you
This commit is contained in:
parent
e4f2a3d7b6
commit
842430dbdb
9 changed files with 260 additions and 44 deletions
|
@ -6309,6 +6309,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_WIPEOUTTRAIL4",
|
"S_WIPEOUTTRAIL4",
|
||||||
"S_WIPEOUTTRAIL5",
|
"S_WIPEOUTTRAIL5",
|
||||||
|
|
||||||
|
// Rocket sneaker
|
||||||
|
"S_ROCKETSNEAKER_L",
|
||||||
|
"S_ROCKETSNEAKER_R",
|
||||||
|
|
||||||
//{ Eggman Monitor
|
//{ Eggman Monitor
|
||||||
"S_FAKEITEM1",
|
"S_FAKEITEM1",
|
||||||
"S_FAKEITEM2",
|
"S_FAKEITEM2",
|
||||||
|
@ -7291,6 +7295,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_DRIFTSPARK",
|
"MT_DRIFTSPARK",
|
||||||
"MT_DRIFTDUST",
|
"MT_DRIFTDUST",
|
||||||
|
|
||||||
|
"MT_ROCKETSNEAKER", // Rocket sneakers
|
||||||
|
|
||||||
"MT_FAKESHIELD",
|
"MT_FAKESHIELD",
|
||||||
"MT_FAKEITEM",
|
"MT_FAKEITEM",
|
||||||
|
|
||||||
|
@ -7302,7 +7308,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
|
|
||||||
"MT_JAWZ", // Jawz stuff
|
"MT_JAWZ", // Jawz stuff
|
||||||
"MT_JAWZ_DUD",
|
"MT_JAWZ_DUD",
|
||||||
"MT_JAWZ_SHIELD",
|
"MT_JAWZ_SHIELD",
|
||||||
|
|
||||||
"MT_PLAYERRETICULE", // Jawz reticule
|
"MT_PLAYERRETICULE", // Jawz reticule
|
||||||
|
|
||||||
|
|
42
src/info.c
42
src/info.c
|
@ -56,12 +56,12 @@ char sprnames[NUMSPRITES + 1][5] =
|
||||||
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
|
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
|
||||||
//SRB2kart Sprites
|
//SRB2kart Sprites
|
||||||
"SPRG","BSPR","RNDM","RPOP","SGNS","FAST","DSHR","BOST","BOSM","KFRE",
|
"SPRG","BSPR","RNDM","RPOP","SGNS","FAST","DSHR","BOST","BOSM","KFRE",
|
||||||
"KINV","KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN",
|
"KINV","KINF","WIPD","DRIF","DUST","RSHE","FITM","BANA","ORBN","JAWZ",
|
||||||
"KRBM","BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL",
|
"SSMN","KRBM","BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN",
|
||||||
"POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO",
|
"DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM",
|
||||||
"CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO",
|
"SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB",
|
||||||
"ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK","LZI1",
|
"ARRO","ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK",
|
||||||
"LZI2","KLIT","VIEW"
|
"LZI1","LZI2","KLIT","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)
|
||||||
|
@ -2623,6 +2623,9 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_WIPD, 3, 3, {NULL}, 0, 0, S_WIPEOUTTRAIL5}, // S_WIPEOUTTRAIL4
|
{SPR_WIPD, 3, 3, {NULL}, 0, 0, S_WIPEOUTTRAIL5}, // S_WIPEOUTTRAIL4
|
||||||
{SPR_WIPD, 4, 3, {NULL}, 0, 0, S_NULL}, // S_WIPEOUTTRAIL5
|
{SPR_WIPD, 4, 3, {NULL}, 0, 0, S_NULL}, // S_WIPEOUTTRAIL5
|
||||||
|
|
||||||
|
{SPR_RSHE, 0, -1, {NULL}, 0, 0, S_NULL}, // S_ROCKETSNEAKER_L
|
||||||
|
{SPR_RSHE, 1, -1, {NULL}, 0, 0, S_NULL}, // S_ROCKETSNEAKER_R
|
||||||
|
|
||||||
{SPR_FITM, FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_FAKEITEM2}, // S_FAKEITEM1
|
{SPR_FITM, 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
|
||||||
|
@ -14802,6 +14805,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // MT_ROCKETSNEAKER
|
||||||
|
-1, // doomednum
|
||||||
|
S_ROCKETSNEAKER_L, // spawnstate
|
||||||
|
1, // spawnhealth
|
||||||
|
S_NULL, // seestate
|
||||||
|
sfx_tossed, // 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_s3k5d, // deathsound
|
||||||
|
0, // speed
|
||||||
|
16*FRACUNIT, // radius
|
||||||
|
16*FRACUNIT, // height
|
||||||
|
0, // display offset
|
||||||
|
0, // mass
|
||||||
|
0, // damage
|
||||||
|
sfx_s3kc0s, // activesound
|
||||||
|
MF_SPECIAL|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
|
||||||
|
S_NULL // raisestate
|
||||||
|
},
|
||||||
|
|
||||||
{ // MT_FAKESHIELD
|
{ // MT_FAKESHIELD
|
||||||
-1, // doomednum
|
-1, // doomednum
|
||||||
S_FAKEITEM1, // spawnstate
|
S_FAKEITEM1, // spawnstate
|
||||||
|
|
|
@ -596,6 +596,7 @@ typedef enum sprite
|
||||||
SPR_DUST, // Drift Dust
|
SPR_DUST, // Drift Dust
|
||||||
|
|
||||||
// Kart Items
|
// Kart Items
|
||||||
|
SPR_RSHE, // Rocket sneaker
|
||||||
SPR_FITM, // Eggman Monitor
|
SPR_FITM, // Eggman Monitor
|
||||||
SPR_BANA, // Banana Peel
|
SPR_BANA, // Banana Peel
|
||||||
SPR_ORBN, // Orbinaut
|
SPR_ORBN, // Orbinaut
|
||||||
|
@ -3155,6 +3156,10 @@ typedef enum state
|
||||||
S_WIPEOUTTRAIL4,
|
S_WIPEOUTTRAIL4,
|
||||||
S_WIPEOUTTRAIL5,
|
S_WIPEOUTTRAIL5,
|
||||||
|
|
||||||
|
// Rocket sneaker
|
||||||
|
S_ROCKETSNEAKER_L,
|
||||||
|
S_ROCKETSNEAKER_R,
|
||||||
|
|
||||||
//{ Eggman Monitor
|
//{ Eggman Monitor
|
||||||
S_FAKEITEM1,
|
S_FAKEITEM1,
|
||||||
S_FAKEITEM2,
|
S_FAKEITEM2,
|
||||||
|
@ -4154,6 +4159,8 @@ typedef enum mobj_type
|
||||||
MT_DRIFTSPARK,
|
MT_DRIFTSPARK,
|
||||||
MT_DRIFTDUST,
|
MT_DRIFTDUST,
|
||||||
|
|
||||||
|
MT_ROCKETSNEAKER,
|
||||||
|
|
||||||
MT_FAKESHIELD,
|
MT_FAKESHIELD,
|
||||||
MT_FAKEITEM,
|
MT_FAKEITEM,
|
||||||
|
|
||||||
|
|
158
src/k_kart.c
158
src/k_kart.c
|
@ -1006,6 +1006,12 @@ static fixed_t K_GetMobjWeight(mobj_t *mobj, mobj_t *against)
|
||||||
weight = (against->player->kartweight)<<FRACBITS;
|
weight = (against->player->kartweight)<<FRACBITS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MT_ROCKETSNEAKER:
|
||||||
|
if (against->player)
|
||||||
|
weight = (against->player->kartweight*2)<<FRACBITS;
|
||||||
|
else
|
||||||
|
weight = 10<<FRACBITS;
|
||||||
|
break;
|
||||||
case MT_ORBINAUT:
|
case MT_ORBINAUT:
|
||||||
case MT_ORBINAUT_SHIELD:
|
case MT_ORBINAUT_SHIELD:
|
||||||
if (against->player)
|
if (against->player)
|
||||||
|
@ -2969,25 +2975,45 @@ static void K_DoHyudoroSteal(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_DoSneaker(player_t *player, boolean doPFlag)
|
void K_DoSneaker(player_t *player, INT32 type)
|
||||||
{
|
{
|
||||||
const fixed_t prevboost = player->kartstuff[k_speedboost];
|
fixed_t prevboost = player->kartstuff[k_speedboost];
|
||||||
|
|
||||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
|
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
|
||||||
S_StartSound(player->mo, sfx_cdfm01);
|
S_StartSound(player->mo, sfx_cdfm01);
|
||||||
|
|
||||||
if (!player->kartstuff[k_sneakertimer])
|
if (!player->kartstuff[k_sneakertimer])
|
||||||
{
|
{
|
||||||
mobj_t *overlay = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BOOSTFLAME);
|
if (type == 2)
|
||||||
P_SetTarget(&overlay->target, player->mo);
|
{
|
||||||
overlay->destscale = player->mo->scale;
|
if (player->mo->hnext)
|
||||||
P_SetScale(overlay, player->mo->scale);
|
{
|
||||||
|
mobj_t *cur = player->mo->hnext;
|
||||||
|
while (cur && !P_MobjWasRemoved(cur))
|
||||||
|
{
|
||||||
|
if (!cur->tracer)
|
||||||
|
{
|
||||||
|
mobj_t *overlay = P_SpawnMobj(cur->x, cur->y, cur->z, MT_BOOSTFLAME);
|
||||||
|
P_SetTarget(&overlay->target, cur);
|
||||||
|
P_SetTarget(&cur->tracer, overlay);
|
||||||
|
P_SetScale(overlay, (overlay->destscale = 3*cur->scale/4));
|
||||||
|
}
|
||||||
|
cur = cur->hnext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj_t *overlay = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BOOSTFLAME);
|
||||||
|
P_SetTarget(&overlay->target, player->mo);
|
||||||
|
P_SetScale(overlay, (overlay->destscale = player->mo->scale));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player->kartstuff[k_sneakertimer] = sneakertime;
|
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||||
K_SpawnDashDustRelease(player);
|
K_SpawnDashDustRelease(player);
|
||||||
|
|
||||||
if (doPFlag)
|
if (type != 0)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_ATTACKDOWN;
|
player->pflags |= PF_ATTACKDOWN;
|
||||||
K_PlayBoostTaunt(player->mo);
|
K_PlayBoostTaunt(player->mo);
|
||||||
|
@ -3206,6 +3232,7 @@ void K_DropHnextList(player_t *player)
|
||||||
break;
|
break;
|
||||||
// intentionally do nothing
|
// intentionally do nothing
|
||||||
case MT_SINK_SHIELD:
|
case MT_SINK_SHIELD:
|
||||||
|
case MT_ROCKETSNEAKER:
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
|
@ -3553,6 +3580,92 @@ static void K_MoveHeldObjects(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MT_ROCKETSNEAKER: // Special rocket sneaker stuff
|
||||||
|
{
|
||||||
|
mobj_t *cur = player->mo->hnext;
|
||||||
|
INT32 num = 0;
|
||||||
|
|
||||||
|
while (cur && !P_MobjWasRemoved(cur))
|
||||||
|
{
|
||||||
|
const fixed_t radius = FixedHypot(player->mo->radius, player->mo->radius) + FixedHypot(cur->radius, cur->radius);
|
||||||
|
angle_t angoffset;
|
||||||
|
fixed_t targx, targy, targz;
|
||||||
|
|
||||||
|
cur->flags &= ~MF_NOCLIPTHING;
|
||||||
|
|
||||||
|
if (player->kartstuff[k_rocketsneakertimer] <= TICRATE && (leveltime & 1))
|
||||||
|
cur->flags2 |= MF2_DONTDRAW;
|
||||||
|
else
|
||||||
|
cur->flags2 &= ~MF2_DONTDRAW;
|
||||||
|
|
||||||
|
if (num & 1)
|
||||||
|
P_SetMobjStateNF(cur, S_ROCKETSNEAKER_L);
|
||||||
|
else
|
||||||
|
P_SetMobjStateNF(cur, S_ROCKETSNEAKER_R);
|
||||||
|
|
||||||
|
if (!player->kartstuff[k_rocketsneakertimer] || cur->extravalue2 || !cur->health)
|
||||||
|
{
|
||||||
|
num = (num+1) % 2;
|
||||||
|
cur = cur->hnext;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cur->extravalue1 < radius)
|
||||||
|
cur->extravalue1 += FixedMul(P_AproxDistance(cur->extravalue1, radius), FRACUNIT/12);
|
||||||
|
if (cur->extravalue1 > radius)
|
||||||
|
cur->extravalue1 = radius;
|
||||||
|
|
||||||
|
// Shrink your items if the player shrunk too.
|
||||||
|
P_SetScale(cur, (cur->destscale = FixedMul(FixedDiv(cur->extravalue1, radius), player->mo->scale)));
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
{
|
||||||
|
angle_t input = player->mo->angle - cur->angle;
|
||||||
|
boolean invert = (input > ANGLE_180);
|
||||||
|
if (invert)
|
||||||
|
input = InvAngle(input);
|
||||||
|
|
||||||
|
input = FixedAngle(AngleFixed(input)/4);
|
||||||
|
if (invert)
|
||||||
|
input = InvAngle(input);
|
||||||
|
|
||||||
|
cur->angle = cur->angle + input;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
cur->angle = player->mo->angle;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
angoffset = ANGLE_90 + (ANGLE_180 * num);
|
||||||
|
|
||||||
|
targx = player->mo->x + P_ReturnThrustX(cur, cur->angle + angoffset, cur->extravalue1);
|
||||||
|
targy = player->mo->y + P_ReturnThrustY(cur, cur->angle + angoffset, cur->extravalue1);
|
||||||
|
|
||||||
|
{ // bobbing, copy pasted from my kimokawaiii entry
|
||||||
|
const fixed_t pi = (22<<FRACBITS) / 7; // loose approximation, this doesn't need to be incredibly precise
|
||||||
|
fixed_t sine = 8 * FINESINE((((2*pi*(4*TICRATE)) * leveltime)>>ANGLETOFINESHIFT) & FINEMASK);
|
||||||
|
targz = (player->mo->z + (player->mo->height/2)) + sine;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cur->tracer)
|
||||||
|
{
|
||||||
|
fixed_t diffx, diffy, diffz;
|
||||||
|
|
||||||
|
diffx = targx - cur->x;
|
||||||
|
diffy = targy - cur->y;
|
||||||
|
diffz = targz - cur->z;
|
||||||
|
|
||||||
|
P_TeleportMove(cur->tracer, cur->tracer->x + diffx + P_ReturnThrustX(cur, cur->angle + angoffset, 6*cur->scale),
|
||||||
|
cur->tracer->y + diffy + P_ReturnThrustY(cur, cur->angle + angoffset, 6*cur->scale), cur->tracer->z + diffz);
|
||||||
|
P_SetScale(cur->tracer, (cur->tracer->destscale = 3*cur->scale/4));
|
||||||
|
}
|
||||||
|
|
||||||
|
P_TeleportMove(cur, targx, targy, targz);
|
||||||
|
|
||||||
|
num = (num+1) % 2;
|
||||||
|
cur = cur->hnext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4473,7 +4586,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO
|
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO
|
||||||
&& player->kartstuff[k_rocketsneakertimer] > 1)
|
&& player->kartstuff[k_rocketsneakertimer] > 1)
|
||||||
{
|
{
|
||||||
K_DoSneaker(player, true);
|
K_DoSneaker(player, 2);
|
||||||
K_PlayBoostTaunt(player->mo);
|
K_PlayBoostTaunt(player->mo);
|
||||||
player->kartstuff[k_rocketsneakertimer] -= 5;
|
player->kartstuff[k_rocketsneakertimer] -= 5;
|
||||||
if (player->kartstuff[k_rocketsneakertimer] < 1)
|
if (player->kartstuff[k_rocketsneakertimer] < 1)
|
||||||
|
@ -4490,7 +4603,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
case KITEM_SNEAKER:
|
case KITEM_SNEAKER:
|
||||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO)
|
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO)
|
||||||
{
|
{
|
||||||
K_DoSneaker(player, true);
|
K_DoSneaker(player, 1);
|
||||||
K_PlayBoostTaunt(player->mo);
|
K_PlayBoostTaunt(player->mo);
|
||||||
player->kartstuff[k_itemamount]--;
|
player->kartstuff[k_itemamount]--;
|
||||||
}
|
}
|
||||||
|
@ -4499,10 +4612,33 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO
|
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && NO_HYUDORO
|
||||||
&& player->kartstuff[k_rocketsneakertimer] == 0)
|
&& player->kartstuff[k_rocketsneakertimer] == 0)
|
||||||
{
|
{
|
||||||
K_DoSneaker(player, true);
|
INT32 moloop;
|
||||||
|
mobj_t *mo = NULL;
|
||||||
|
mobj_t *prev = player->mo;
|
||||||
|
|
||||||
K_PlayBoostTaunt(player->mo);
|
K_PlayBoostTaunt(player->mo);
|
||||||
|
//player->kartstuff[k_itemheld] = 1;
|
||||||
|
S_StartSound(player->mo, sfx_s3k3a);
|
||||||
|
|
||||||
|
//K_DoSneaker(player, 2);
|
||||||
|
|
||||||
player->kartstuff[k_rocketsneakertimer] = itemtime;
|
player->kartstuff[k_rocketsneakertimer] = itemtime;
|
||||||
player->kartstuff[k_itemamount]--;
|
player->kartstuff[k_itemamount]--;
|
||||||
|
K_UpdateHnextList(player, true);
|
||||||
|
|
||||||
|
for (moloop = 0; moloop < 2; moloop++)
|
||||||
|
{
|
||||||
|
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_ROCKETSNEAKER);
|
||||||
|
mo->flags |= MF_NOCLIPTHING;
|
||||||
|
mo->angle = player->mo->angle;
|
||||||
|
mo->threshold = 10;
|
||||||
|
mo->movecount = moloop%2;
|
||||||
|
mo->movedir = mo->lastlook = moloop+1;
|
||||||
|
P_SetTarget(&mo->target, player->mo);
|
||||||
|
P_SetTarget(&mo->hprev, prev);
|
||||||
|
P_SetTarget(&prev->hnext, mo);
|
||||||
|
prev = mo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KITEM_INVINCIBILITY:
|
case KITEM_INVINCIBILITY:
|
||||||
|
@ -5008,7 +5144,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (player->kartstuff[k_boostcharge] <= 36)
|
if (player->kartstuff[k_boostcharge] <= 36)
|
||||||
{
|
{
|
||||||
player->kartstuff[k_startboost] = 0;
|
player->kartstuff[k_startboost] = 0;
|
||||||
K_DoSneaker(player, false);
|
K_DoSneaker(player, 0);
|
||||||
player->kartstuff[k_sneakertimer] = 70; // PERFECT BOOST!!
|
player->kartstuff[k_sneakertimer] = 70; // PERFECT BOOST!!
|
||||||
|
|
||||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) // Let everyone hear this one
|
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) // Let everyone hear this one
|
||||||
|
|
|
@ -36,7 +36,7 @@ void K_SpawnBoostTrail(player_t *player);
|
||||||
void K_SpawnSparkleTrail(mobj_t *mo);
|
void K_SpawnSparkleTrail(mobj_t *mo);
|
||||||
void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent);
|
void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent);
|
||||||
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, INT32 type);
|
||||||
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound);
|
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound);
|
||||||
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);
|
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);
|
||||||
void K_UpdateHnextList(player_t *player, boolean clean);
|
void K_UpdateHnextList(player_t *player, boolean clean);
|
||||||
|
|
|
@ -2219,11 +2219,11 @@ static int lib_kDriftDustHandling(lua_State *L)
|
||||||
static int lib_kDoSneaker(lua_State *L)
|
static int lib_kDoSneaker(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
boolean doPFlag = luaL_checkboolean(L, 2);
|
INT32 type = luaL_checkinteger(L, 2);
|
||||||
NOHUD
|
NOHUD
|
||||||
if (!player)
|
if (!player)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
K_DoSneaker(player, doPFlag);
|
K_DoSneaker(player, type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -589,6 +589,15 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
player->kartstuff[k_roulettetype] = 1;
|
player->kartstuff[k_roulettetype] = 1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
case MT_ROCKETSNEAKER:
|
||||||
|
if (!player->mo)
|
||||||
|
return;
|
||||||
|
if (special->extravalue2)
|
||||||
|
return;
|
||||||
|
if (special->target && player->mo == special->target)
|
||||||
|
return;
|
||||||
|
K_KartBouncing(player->mo, special, false, false);
|
||||||
|
return;
|
||||||
|
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
// Rings, coins, spheres, weapon panels, etc //
|
// Rings, coins, spheres, weapon panels, etc //
|
||||||
|
|
72
src/p_mobj.c
72
src/p_mobj.c
|
@ -6637,20 +6637,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
case MT_SSMINE_SHIELD:
|
case MT_SSMINE_SHIELD:
|
||||||
case MT_FAKESHIELD:
|
case MT_FAKESHIELD:
|
||||||
case MT_SINK_SHIELD:
|
case MT_SINK_SHIELD:
|
||||||
/*if (mobj->health > 0 && mobj->target && mobj->target->player
|
if ((mobj->health > 0
|
||||||
&& mobj->target->player->health > 0 && !mobj->target->player->spectator)
|
|
||||||
{
|
|
||||||
// Was this so hard? -- Handled this with K_UpdateHnextList instead of thinking it away...
|
|
||||||
if ((mobj->type == MT_ORBINAUT_SHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_ORBINAUT)
|
|
||||||
|| (mobj->type == MT_JAWZ_SHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_JAWZ)
|
|
||||||
|| (mobj->movedir > 0 && ((UINT16)mobj->target->player->kartstuff[k_itemamount] < mobj->movedir))
|
|
||||||
|| (!mobj->target->player->kartstuff[k_itemheld]))
|
|
||||||
{
|
|
||||||
P_RemoveMobj(mobj);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else*/ if ((mobj->health > 0
|
|
||||||
&& (!mobj->target || !mobj->target->player || mobj->target->player->health <= 0 || mobj->target->player->spectator))
|
&& (!mobj->target || !mobj->target->player || mobj->target->player->health <= 0 || mobj->target->player->spectator))
|
||||||
|| (mobj->health <= 0 && mobj->z <= mobj->floorz)
|
|| (mobj->health <= 0 && mobj->z <= mobj->floorz)
|
||||||
|| P_CheckDeathPitCollide(mobj)) // When in death state
|
|| P_CheckDeathPitCollide(mobj)) // When in death state
|
||||||
|
@ -8249,16 +8236,24 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
P_TeleportMove(mobj, mobj->target->x + P_ReturnThrustX(mobj, mobj->target->angle+ANGLE_180, mobj->target->radius),
|
|
||||||
mobj->target->y + P_ReturnThrustY(mobj, mobj->target->angle+ANGLE_180, mobj->target->radius), mobj->target->z);
|
|
||||||
mobj->angle = mobj->target->angle;
|
mobj->angle = mobj->target->angle;
|
||||||
|
P_TeleportMove(mobj, mobj->target->x + P_ReturnThrustX(mobj, mobj->angle+ANGLE_180, mobj->target->radius),
|
||||||
|
mobj->target->y + P_ReturnThrustY(mobj, mobj->angle+ANGLE_180, mobj->target->radius), mobj->target->z);
|
||||||
P_SetScale(mobj, mobj->target->scale);
|
P_SetScale(mobj, mobj->target->scale);
|
||||||
|
|
||||||
if (mobj->target->player)
|
|
||||||
{
|
{
|
||||||
if (mobj->target->player->kartstuff[k_sneakertimer] > mobj->movecount)
|
player_t *p = NULL;
|
||||||
P_SetMobjState(mobj, S_BOOSTFLAME);
|
if (mobj->target->target && mobj->target->target->player)
|
||||||
mobj->movecount = mobj->target->player->kartstuff[k_sneakertimer];
|
p = mobj->target->target->player;
|
||||||
|
else if (mobj->target->player)
|
||||||
|
p = mobj->target->player;
|
||||||
|
|
||||||
|
if (p)
|
||||||
|
{
|
||||||
|
if (p->kartstuff[k_sneakertimer] > mobj->movecount)
|
||||||
|
P_SetMobjState(mobj, S_BOOSTFLAME);
|
||||||
|
mobj->movecount = p->kartstuff[k_sneakertimer];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mobj->state == &states[S_BOOSTSMOKESPAWNER])
|
if (mobj->state == &states[S_BOOSTSMOKESPAWNER])
|
||||||
|
@ -8272,7 +8267,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
smoke->momy = mobj->target->momy/2;
|
smoke->momy = mobj->target->momy/2;
|
||||||
smoke->momz = mobj->target->momz/2;
|
smoke->momz = mobj->target->momz/2;
|
||||||
|
|
||||||
P_Thrust(smoke, mobj->target->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mapheaderinfo[gamemap-1]->mobj_scale);
|
P_Thrust(smoke, mobj->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mapheaderinfo[gamemap-1]->mobj_scale);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_SPARKLETRAIL:
|
case MT_SPARKLETRAIL:
|
||||||
|
@ -8350,6 +8345,39 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
P_TeleportMove(mobj, destx, desty, mobj->target->z);
|
P_TeleportMove(mobj, destx, desty, mobj->target->z);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MT_ROCKETSNEAKER:
|
||||||
|
if (!mobj->target || !mobj->target->health)
|
||||||
|
{
|
||||||
|
P_RemoveMobj(mobj);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mobj->target->player && !mobj->target->player->kartstuff[k_rocketsneakertimer])
|
||||||
|
{
|
||||||
|
mobj->flags &= ~MF_NOGRAVITY;
|
||||||
|
mobj->angle += ANGLE_45;
|
||||||
|
|
||||||
|
if (!mobj->extravalue2)
|
||||||
|
{
|
||||||
|
if (mobj->eflags & MFE_VERTICALFLIP)
|
||||||
|
mobj->z -= mobj->height;
|
||||||
|
else
|
||||||
|
mobj->z += mobj->height;
|
||||||
|
|
||||||
|
S_StartSound(mobj, mobj->info->deathsound);
|
||||||
|
P_SetObjectMomZ(mobj, 8*FRACUNIT, false);
|
||||||
|
P_InstaThrust(mobj, R_PointToAngle2(mobj->target->x, mobj->target->y, mobj->x, mobj->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
|
mobj->momx += mobj->target->momx;
|
||||||
|
mobj->momy += mobj->target->momy;
|
||||||
|
mobj->momz += mobj->target->momz;
|
||||||
|
mobj->extravalue2 = 1;
|
||||||
|
}
|
||||||
|
else if (P_IsObjectOnGround(mobj))
|
||||||
|
{
|
||||||
|
P_RemoveMobj(mobj);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case MT_KARMAHITBOX:
|
case MT_KARMAHITBOX:
|
||||||
if (!mobj->target || !mobj->target->health || !mobj->target->player || mobj->target->player->spectator
|
if (!mobj->target || !mobj->target->health || !mobj->target->player || mobj->target->player->spectator
|
||||||
|| (G_RaceGametype() || mobj->target->player->kartstuff[k_bumper]))
|
|| (G_RaceGametype() || mobj->target->player->kartstuff[k_bumper]))
|
||||||
|
@ -9335,7 +9363,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
case MT_JAWZ: case MT_JAWZ_DUD: case MT_JAWZ_SHIELD:
|
case MT_JAWZ: case MT_JAWZ_DUD: case MT_JAWZ_SHIELD:
|
||||||
case MT_SSMINE: case MT_SSMINE_SHIELD:
|
case MT_SSMINE: case MT_SSMINE_SHIELD:
|
||||||
case MT_BALLHOG: case MT_SINK:
|
case MT_BALLHOG: case MT_SINK:
|
||||||
case MT_THUNDERSHIELD:
|
case MT_THUNDERSHIELD: case MT_ROCKETSNEAKER:
|
||||||
P_SpawnShadowMobj(mobj);
|
P_SpawnShadowMobj(mobj);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4036,7 +4036,7 @@ DoneSection2:
|
||||||
player->kartstuff[k_floorboost] = 3;
|
player->kartstuff[k_floorboost] = 3;
|
||||||
else
|
else
|
||||||
player->kartstuff[k_floorboost] = 2;
|
player->kartstuff[k_floorboost] = 2;
|
||||||
K_DoSneaker(player, false);
|
K_DoSneaker(player, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue