mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 01:31:26 +00:00
Merge branch 'sal-misc' of https://git.magicalgirl.moe/KartKrew/Kart.git into itemdrop
# Conflicts: # src/info.c
This commit is contained in:
commit
d13e999c99
6 changed files with 140 additions and 9 deletions
|
@ -6251,6 +6251,16 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
|
||||
// Thunder Shield Burst
|
||||
|
||||
// Sneaker boost effect
|
||||
"S_BOOSTFLAME",
|
||||
"S_BOOSTSMOKESPAWNER",
|
||||
"S_BOOSTSMOKE1",
|
||||
"S_BOOSTSMOKE2",
|
||||
"S_BOOSTSMOKE3",
|
||||
"S_BOOSTSMOKE4",
|
||||
"S_BOOSTSMOKE5",
|
||||
"S_BOOSTSMOKE6",
|
||||
|
||||
// Sneaker Fire Trail
|
||||
"S_KARTFIRE1",
|
||||
"S_KARTFIRE2",
|
||||
|
@ -7212,6 +7222,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_RANDOMITEMPOP",
|
||||
"MT_FLOATINGITEM",
|
||||
|
||||
"MT_BOOSTFLAME",
|
||||
"MT_BOOSTSMOKE",
|
||||
"MT_SNEAKERTRAIL",
|
||||
"MT_SPARKLETRAIL",
|
||||
"MT_INVULNFLASH",
|
||||
|
|
76
src/info.c
76
src/info.c
|
@ -55,12 +55,12 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI",
|
||||
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
|
||||
//SRB2kart Sprites
|
||||
"SPRG","BSPR","RNDM","RPOP","KFRE","KINV","KINF","WIPD","DRIF","DUST",
|
||||
"FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG","BHBM","BLIG","LIGH",
|
||||
"THNS","SINK","SITR","KBLN","DEZL","POKE","AUDI","DECO","DOOD","SNES",
|
||||
"GBAS","SPRS","BUZB","CHOM","SACO","CRAB","SHAD","BRNG","BUMP","FLEN",
|
||||
"CLAS","PSHW","ISTA","ISTB","ARRO","ITEM","ITMO","ITMI","ITMN","WANT",
|
||||
"PBOM","RETI","VIEW"
|
||||
"SPRG","BSPR","RNDM","RPOP","BOST","BOSM","KFRE","KINV","KINF","WIPD",
|
||||
"DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG","BHBM",
|
||||
"BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE","AUDI","DECO",
|
||||
"DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB","SHAD","BRNG",
|
||||
"BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM","ITMO","ITMI",
|
||||
"ITMN","WANT","PBOM","RETI","VIEW"
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
@ -2580,6 +2580,16 @@ state_t states[NUMSTATES] =
|
|||
{SPR_DUST, FF_TRANS20|2, 3, {NULL}, 0, 0, S_DRIFTDUST4}, // S_DRIFTDUST3
|
||||
{SPR_DUST, FF_TRANS20|3, 3, {NULL}, 0, 0, S_NULL}, // S_DRIFTDUST4
|
||||
|
||||
{SPR_BOST, FF_FULLBRIGHT|FF_ANIMATE, TICRATE, {NULL}, 6, 1, S_BOOSTSMOKESPAWNER}, // S_BOOSTFLAME
|
||||
{SPR_NULL, 0, TICRATE/2, {NULL}, 0, 0, S_NULL}, // S_BOOSTSMOKESPAWNER
|
||||
|
||||
{SPR_BOSM, FF_TRANS50, 3, {NULL}, 0, 0, S_BOOSTSMOKE2}, // S_BOOSTSMOKE1
|
||||
{SPR_BOSM, FF_TRANS50|1, 3, {NULL}, 0, 0, S_BOOSTSMOKE3}, // S_BOOSTSMOKE2
|
||||
{SPR_BOSM, FF_TRANS50|2, 3, {NULL}, 0, 0, S_BOOSTSMOKE4}, // S_BOOSTSMOKE3
|
||||
{SPR_BOSM, FF_TRANS50|3, 3, {NULL}, 0, 0, S_BOOSTSMOKE5}, // S_BOOSTSMOKE4
|
||||
{SPR_BOSM, FF_TRANS50|4, 3, {NULL}, 0, 0, S_BOOSTSMOKE6}, // S_BOOSTSMOKE5
|
||||
{SPR_BOSM, FF_TRANS50|5, 3, {NULL}, 0, 0, S_NULL}, // S_BOOSTSMOKE6
|
||||
|
||||
{SPR_NULL, 0, 10, {NULL}, 0, 0, S_KARTFIRE2}, // S_KARTFIRE1
|
||||
{SPR_KFRE, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARTFIRE3}, // S_KARTFIRE2
|
||||
{SPR_KFRE, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_KARTFIRE4}, // S_KARTFIRE3
|
||||
|
@ -14419,6 +14429,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BOOSTFLAME
|
||||
-1, // doomednum
|
||||
S_BOOSTFLAME, // spawnstate
|
||||
1000, // 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
|
||||
8*FRACUNIT, // radius
|
||||
8*FRACUNIT, // height
|
||||
1, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BOOSTSMOKE
|
||||
-1, // doomednum
|
||||
S_BOOSTSMOKE1, // spawnstate
|
||||
1000, // 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
|
||||
8*FRACUNIT, // radius
|
||||
8*FRACUNIT, // height
|
||||
1, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_SNEAKERTRAIL
|
||||
-1, // doomednum
|
||||
S_KARTFIRE1, // spawnstate
|
||||
|
|
14
src/info.h
14
src/info.h
|
@ -582,6 +582,8 @@ typedef enum sprite
|
|||
|
||||
SPR_RNDM, // Random Item Box
|
||||
SPR_RPOP, // Random Item Box Pop
|
||||
SPR_BOST, // Sneaker booster flame
|
||||
SPR_BOSM, // Sneaker booster smoke
|
||||
SPR_KFRE, // Sneaker fire trail
|
||||
SPR_KINV, // Invincibility sparkle trail
|
||||
SPR_KINF, // Invincibility flash
|
||||
|
@ -3096,6 +3098,16 @@ typedef enum state
|
|||
|
||||
// Magnet Burst
|
||||
|
||||
// Sneaker boost effect
|
||||
S_BOOSTFLAME,
|
||||
S_BOOSTSMOKESPAWNER,
|
||||
S_BOOSTSMOKE1,
|
||||
S_BOOSTSMOKE2,
|
||||
S_BOOSTSMOKE3,
|
||||
S_BOOSTSMOKE4,
|
||||
S_BOOSTSMOKE5,
|
||||
S_BOOSTSMOKE6,
|
||||
|
||||
// Sneaker Fire Trail
|
||||
S_KARTFIRE1,
|
||||
S_KARTFIRE2,
|
||||
|
@ -4074,6 +4086,8 @@ typedef enum mobj_type
|
|||
MT_RANDOMITEMPOP,
|
||||
MT_FLOATINGITEM,
|
||||
|
||||
MT_BOOSTFLAME,
|
||||
MT_BOOSTSMOKE,
|
||||
MT_SNEAKERTRAIL,
|
||||
MT_SPARKLETRAIL,
|
||||
MT_INVULNFLASH,
|
||||
|
|
12
src/k_kart.c
12
src/k_kart.c
|
@ -2706,6 +2706,14 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
|
|||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
|
||||
S_StartSound(player->mo, sfx_cdfm01);
|
||||
|
||||
if (!player->kartstuff[k_sneakertimer])
|
||||
{
|
||||
mobj_t *overlay = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BOOSTFLAME);
|
||||
P_SetTarget(&overlay->target, player->mo);
|
||||
overlay->destscale = player->mo->scale;
|
||||
P_SetScale(overlay, player->mo->scale);
|
||||
}
|
||||
|
||||
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||
|
||||
if (doPFlag)
|
||||
|
@ -3422,13 +3430,13 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_boostcam] < player->kartstuff[k_destboostcam]
|
||||
&& player->kartstuff[k_destboostcam] != 0)
|
||||
{
|
||||
player->kartstuff[k_boostcam] += FRACUNIT/5;
|
||||
player->kartstuff[k_boostcam] += FRACUNIT/(TICRATE/4);
|
||||
if (player->kartstuff[k_boostcam] >= player->kartstuff[k_destboostcam])
|
||||
player->kartstuff[k_destboostcam] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->kartstuff[k_boostcam] -= FRACUNIT/5;
|
||||
player->kartstuff[k_boostcam] -= FRACUNIT/TICRATE;
|
||||
if (player->kartstuff[k_boostcam] < player->kartstuff[k_destboostcam])
|
||||
player->kartstuff[k_boostcam] = player->kartstuff[k_destboostcam] = 0;
|
||||
}
|
||||
|
|
33
src/p_mobj.c
33
src/p_mobj.c
|
@ -8324,6 +8324,39 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
S_StartSound(mobj, sfx_prloop);
|
||||
mobj->health--;
|
||||
break;
|
||||
case MT_BOOSTFLAME:
|
||||
if (!mobj->target || !mobj->target->health)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
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;
|
||||
P_SetScale(mobj, mobj->target->scale);
|
||||
|
||||
if (mobj->target->player)
|
||||
{
|
||||
if (mobj->target->player->kartstuff[k_sneakertimer] > mobj->movecount)
|
||||
P_SetMobjState(mobj, S_BOOSTFLAME);
|
||||
mobj->movecount = mobj->target->player->kartstuff[k_sneakertimer];
|
||||
}
|
||||
|
||||
if (mobj->state == &states[S_BOOSTSMOKESPAWNER])
|
||||
{
|
||||
mobj_t *smoke = P_SpawnMobj(mobj->x, mobj->y, mobj->z+(8<<FRACBITS), MT_BOOSTSMOKE);
|
||||
|
||||
P_SetScale(smoke, mobj->target->scale/2);
|
||||
smoke->destscale = 3*mobj->target->scale/2;
|
||||
|
||||
smoke->momx = mobj->target->momx/2;
|
||||
smoke->momy = mobj->target->momy/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);
|
||||
}
|
||||
break;
|
||||
case MT_SPARKLETRAIL:
|
||||
if (!mobj->target)
|
||||
{
|
||||
|
|
|
@ -8376,7 +8376,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
|
||||
if (player->kartstuff[k_boostcam])
|
||||
{
|
||||
dist -= FixedMul(dist/2, player->kartstuff[k_boostcam]);
|
||||
dist -= FixedMul(3*dist/4, player->kartstuff[k_boostcam]);
|
||||
height -= FixedMul(height, player->kartstuff[k_boostcam]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue