mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 09:42:33 +00:00
- Instashield on failed damge
- Ballhog explosion separated onto another sprite - Disabled banana jitter
This commit is contained in:
parent
bd12658355
commit
f9e5a11060
11 changed files with 208 additions and 42 deletions
|
@ -281,6 +281,7 @@ typedef enum
|
|||
k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
|
||||
k_voices, // Used to stop the player saying more voices than it should
|
||||
k_tauntvoices, // Used to specifically stop taunt voice spam
|
||||
k_instashield, // Instashield no-damage animation timer
|
||||
|
||||
k_floorboost, // Prevents Sneaker sounds for a breif duration when triggered by a floor panel
|
||||
k_spinouttype, // Determines whether to thrust forward or not while spinning out; 0 = move forwards, 1 = stay still
|
||||
|
|
|
@ -6625,6 +6625,21 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_FIREDITEM3",
|
||||
"S_FIREDITEM4",
|
||||
|
||||
"S_INSTASHIELDA1", // No damage instashield effect
|
||||
"S_INSTASHIELDA2",
|
||||
"S_INSTASHIELDA3",
|
||||
"S_INSTASHIELDA4",
|
||||
"S_INSTASHIELDA5",
|
||||
"S_INSTASHIELDA6",
|
||||
"S_INSTASHIELDA7",
|
||||
"S_INSTASHIELDB1",
|
||||
"S_INSTASHIELDB2",
|
||||
"S_INSTASHIELDB3",
|
||||
"S_INSTASHIELDB4",
|
||||
"S_INSTASHIELDB5",
|
||||
"S_INSTASHIELDB6",
|
||||
"S_INSTASHIELDB7",
|
||||
|
||||
"S_PLAYERARROW", // Above player arrow
|
||||
"S_PLAYERARROW_BOX",
|
||||
"S_PLAYERARROW_ITEM",
|
||||
|
@ -7272,6 +7287,9 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
|
||||
"MT_FIREDITEM",
|
||||
|
||||
"MT_INSTASHIELDA",
|
||||
"MT_INSTASHIELDB",
|
||||
|
||||
"MT_PLAYERARROW",
|
||||
"MT_PLAYERWANTED",
|
||||
|
||||
|
@ -7609,6 +7627,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"CARDANIMATION",
|
||||
"VOICES",
|
||||
"TAUNTVOICES",
|
||||
"INSTASHIELD",
|
||||
|
||||
"FLOORBOOST",
|
||||
"SPINOUTTYPE",
|
||||
|
|
110
src/info.c
110
src/info.c
|
@ -56,10 +56,10 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"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","BLIG","LIGH","SINK",
|
||||
"SITR","KBLN","DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS",
|
||||
"BUZB","CHOM","SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW",
|
||||
"ARRO","ITEM","ITMI","ITMN","WANT","PBOM","VIEW"
|
||||
"FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG","BHBM","BLIG","LIGH",
|
||||
"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","ITMI","ITMN","WANT","PBOM","VIEW"
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
@ -2734,22 +2734,22 @@ state_t states[NUMSTATES] =
|
|||
{SPR_BHOG, 6, 1, {NULL}, 0, 0, S_BALLHOG8}, // S_BALLHOG7
|
||||
{SPR_BHOG, 7, 1, {NULL}, 0, 0, S_BALLHOG1}, // S_BALLHOG8
|
||||
{SPR_NULL, 0, 1, {A_BallhogExplode}, 0, 0, S_NULL}, // S_BALLHOG_DEAD
|
||||
{SPR_BHOG, FF_FULLBRIGHT|8, 1, {NULL}, 0, 0, S_BALLHOGBOOM2}, // S_BALLHOGBOOM1
|
||||
{SPR_BHOG, FF_FULLBRIGHT|9, 1, {NULL}, 0, 0, S_BALLHOGBOOM3}, // S_BALLHOGBOOM2
|
||||
{SPR_BHOG, FF_FULLBRIGHT|10, 1, {NULL}, 0, 0, S_BALLHOGBOOM4}, // S_BALLHOGBOOM3
|
||||
{SPR_BHOG, FF_FULLBRIGHT|11, 1, {NULL}, 0, 0, S_BALLHOGBOOM5}, // S_BALLHOGBOOM4
|
||||
{SPR_BHOG, FF_FULLBRIGHT|12, 1, {NULL}, 0, 0, S_BALLHOGBOOM6}, // S_BALLHOGBOOM5
|
||||
{SPR_BHOG, FF_FULLBRIGHT|13, 1, {NULL}, 0, 0, S_BALLHOGBOOM7}, // S_BALLHOGBOOM6
|
||||
{SPR_BHOG, FF_FULLBRIGHT|14, 1, {NULL}, 0, 0, S_BALLHOGBOOM8}, // S_BALLHOGBOOM7
|
||||
{SPR_BHOG, FF_FULLBRIGHT|15, 1, {NULL}, 0, 0, S_BALLHOGBOOM9}, // S_BALLHOGBOOM8
|
||||
{SPR_BHOG, FF_FULLBRIGHT|16, 1, {NULL}, 0, 0, S_BALLHOGBOOM10}, // S_BALLHOGBOOM9
|
||||
{SPR_BHOG, FF_FULLBRIGHT|17, 1, {NULL}, 0, 0, S_BALLHOGBOOM11}, // S_BALLHOGBOOM10
|
||||
{SPR_BHOG, FF_FULLBRIGHT|18, 1, {NULL}, 0, 0, S_BALLHOGBOOM12}, // S_BALLHOGBOOM11
|
||||
{SPR_BHOG, FF_FULLBRIGHT|19, 1, {NULL}, 0, 0, S_BALLHOGBOOM13}, // S_BALLHOGBOOM12
|
||||
{SPR_BHOG, FF_FULLBRIGHT|20, 1, {NULL}, 0, 0, S_BALLHOGBOOM14}, // S_BALLHOGBOOM13
|
||||
{SPR_BHOG, FF_FULLBRIGHT|21, 1, {NULL}, 0, 0, S_BALLHOGBOOM15}, // S_BALLHOGBOOM14
|
||||
{SPR_BHOG, FF_FULLBRIGHT|22, 1, {NULL}, 0, 0, S_BALLHOGBOOM16}, // S_BALLHOGBOOM15
|
||||
{SPR_BHOG, FF_FULLBRIGHT|23, 1, {NULL}, 0, 0, S_NULL}, // S_BALLHOGBOOM16
|
||||
{SPR_BHBM, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_BALLHOGBOOM2}, // S_BALLHOGBOOM1
|
||||
{SPR_BHBM, FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_BALLHOGBOOM3}, // S_BALLHOGBOOM2
|
||||
{SPR_BHBM, FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_BALLHOGBOOM4}, // S_BALLHOGBOOM3
|
||||
{SPR_BHBM, FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_BALLHOGBOOM5}, // S_BALLHOGBOOM4
|
||||
{SPR_BHBM, FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_BALLHOGBOOM6}, // S_BALLHOGBOOM5
|
||||
{SPR_BHBM, FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_BALLHOGBOOM7}, // S_BALLHOGBOOM6
|
||||
{SPR_BHBM, FF_FULLBRIGHT|6, 1, {NULL}, 0, 0, S_BALLHOGBOOM8}, // S_BALLHOGBOOM7
|
||||
{SPR_BHBM, FF_FULLBRIGHT|7, 1, {NULL}, 0, 0, S_BALLHOGBOOM9}, // S_BALLHOGBOOM8
|
||||
{SPR_BHBM, FF_FULLBRIGHT|8, 1, {NULL}, 0, 0, S_BALLHOGBOOM10}, // S_BALLHOGBOOM9
|
||||
{SPR_BHBM, FF_FULLBRIGHT|9, 1, {NULL}, 0, 0, S_BALLHOGBOOM11}, // S_BALLHOGBOOM10
|
||||
{SPR_BHBM, FF_FULLBRIGHT|10, 1, {NULL}, 0, 0, S_BALLHOGBOOM12}, // S_BALLHOGBOOM11
|
||||
{SPR_BHBM, FF_FULLBRIGHT|11, 1, {NULL}, 0, 0, S_BALLHOGBOOM13}, // S_BALLHOGBOOM12
|
||||
{SPR_BHBM, FF_FULLBRIGHT|12, 1, {NULL}, 0, 0, S_BALLHOGBOOM14}, // S_BALLHOGBOOM13
|
||||
{SPR_BHBM, FF_FULLBRIGHT|13, 1, {NULL}, 0, 0, S_BALLHOGBOOM15}, // S_BALLHOGBOOM14
|
||||
{SPR_BHBM, FF_FULLBRIGHT|14, 1, {NULL}, 0, 0, S_BALLHOGBOOM16}, // S_BALLHOGBOOM15
|
||||
{SPR_BHBM, FF_FULLBRIGHT|15, 1, {NULL}, 0, 0, S_NULL}, // S_BALLHOGBOOM16
|
||||
|
||||
{SPR_BLIG, 0, 2, {NULL}, 0, 0, S_BLUELIGHTNING2}, // S_BLUELIGHTNING1
|
||||
{SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2
|
||||
|
@ -2931,6 +2931,22 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PSHW, FF_FULLBRIGHT|2, 3, {NULL}, 0, 0, S_FIREDITEM4}, // S_FIREDITEM3
|
||||
{SPR_PSHW, FF_FULLBRIGHT|3, 3, {NULL}, 0, 0, S_NULL}, // S_FIREDITEM4
|
||||
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30, 2, {NULL}, 0, 0, S_INSTASHIELDA2}, // S_INSTASHIELDA1
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30|1, 2, {NULL}, 0, 0, S_INSTASHIELDA3}, // S_INSTASHIELDA2
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30|2, 2, {NULL}, 0, 0, S_INSTASHIELDA4}, // S_INSTASHIELDA3
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30|3, 2, {NULL}, 0, 0, S_INSTASHIELDA5}, // S_INSTASHIELDA4
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30|4, 2, {NULL}, 0, 0, S_INSTASHIELDA6}, // S_INSTASHIELDA5
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30|5, 2, {NULL}, 0, 0, S_INSTASHIELDA7}, // S_INSTASHIELDA6
|
||||
{SPR_ISTA, FF_FULLBRIGHT|FF_TRANS30|6, 2, {NULL}, 0, 0, S_NULL}, // S_INSTASHIELDA7
|
||||
|
||||
{SPR_ISTB, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_INSTASHIELDB2}, // S_INSTASHIELDB1
|
||||
{SPR_ISTB, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_INSTASHIELDB3}, // S_INSTASHIELDB2
|
||||
{SPR_ISTB, FF_FULLBRIGHT|2, 2, {NULL}, 0, 0, S_INSTASHIELDB4}, // S_INSTASHIELDB3
|
||||
{SPR_ISTB, FF_FULLBRIGHT|3, 2, {NULL}, 0, 0, S_INSTASHIELDB5}, // S_INSTASHIELDB4
|
||||
{SPR_ISTB, FF_FULLBRIGHT|4, 2, {NULL}, 0, 0, S_INSTASHIELDB6}, // S_INSTASHIELDB5
|
||||
{SPR_ISTB, FF_FULLBRIGHT|5, 2, {NULL}, 0, 0, S_INSTASHIELDB7}, // S_INSTASHIELDB6
|
||||
{SPR_ISTB, FF_FULLBRIGHT|6, 2, {NULL}, 0, 0, S_NULL}, // S_INSTASHIELDB7
|
||||
|
||||
// Above player arrow
|
||||
{SPR_ARRO, FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_PLAYERARROW
|
||||
{SPR_ARRO, FF_FULLBRIGHT|1, -1, {NULL}, 0, 0, S_NULL}, // S_PLAYERARROW_BOX
|
||||
|
@ -16637,6 +16653,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_INSTASHIELDA
|
||||
-1, // doomednum
|
||||
S_INSTASHIELDA1, // 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_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_INSTASHIELDB
|
||||
-1, // doomednum
|
||||
S_INSTASHIELDB1, // 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
|
||||
2, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_PLAYERARROW
|
||||
-1, // doomednum
|
||||
S_PLAYERARROW, // spawnstate
|
||||
|
|
21
src/info.h
21
src/info.h
|
@ -597,6 +597,7 @@ typedef enum sprite
|
|||
SPR_SSMN, // SS Mine
|
||||
SPR_KRBM, // SS Mine BOOM
|
||||
SPR_BHOG, // Ballhog
|
||||
SPR_BHBM, // Ballhog BOOM
|
||||
SPR_BLIG, // Self-Propelled Bomb
|
||||
SPR_LIGH, // Grow/shrink beams (Metallic Maddness)
|
||||
SPR_SINK, // Kitchen Sink
|
||||
|
@ -624,6 +625,8 @@ typedef enum sprite
|
|||
SPR_FLEN, // Shell hit graphics stuff
|
||||
SPR_CLAS, // items clash
|
||||
SPR_PSHW, // thrown indicator
|
||||
SPR_ISTA, // instashield layer A
|
||||
SPR_ISTB, // instashield layer B
|
||||
|
||||
SPR_ARRO, // player arrows
|
||||
SPR_ITEM,
|
||||
|
@ -3464,6 +3467,21 @@ typedef enum state
|
|||
S_FIREDITEM3,
|
||||
S_FIREDITEM4,
|
||||
|
||||
S_INSTASHIELDA1, // No damage instashield effect
|
||||
S_INSTASHIELDA2,
|
||||
S_INSTASHIELDA3,
|
||||
S_INSTASHIELDA4,
|
||||
S_INSTASHIELDA5,
|
||||
S_INSTASHIELDA6,
|
||||
S_INSTASHIELDA7,
|
||||
S_INSTASHIELDB1,
|
||||
S_INSTASHIELDB2,
|
||||
S_INSTASHIELDB3,
|
||||
S_INSTASHIELDB4,
|
||||
S_INSTASHIELDB5,
|
||||
S_INSTASHIELDB6,
|
||||
S_INSTASHIELDB7,
|
||||
|
||||
S_PLAYERARROW, // Above player arrow
|
||||
S_PLAYERARROW_BOX,
|
||||
S_PLAYERARROW_ITEM,
|
||||
|
@ -4128,6 +4146,9 @@ typedef enum mobj_type
|
|||
|
||||
MT_FIREDITEM,
|
||||
|
||||
MT_INSTASHIELDA,
|
||||
MT_INSTASHIELDB,
|
||||
|
||||
MT_PLAYERARROW,
|
||||
MT_PLAYERWANTED,
|
||||
|
||||
|
|
47
src/k_kart.c
47
src/k_kart.c
|
@ -1557,6 +1557,24 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove
|
|||
return finalspeed;
|
||||
}
|
||||
|
||||
void K_DoInstashield(player_t *player)
|
||||
{
|
||||
mobj_t *layera;
|
||||
mobj_t *layerb;
|
||||
|
||||
if (player->kartstuff[k_instashield] > 0)
|
||||
return;
|
||||
|
||||
player->kartstuff[k_instashield] = 14; // length of instashield animation
|
||||
S_StartSound(player->mo, sfx_cdpcm9);
|
||||
|
||||
layera = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_INSTASHIELDA);
|
||||
P_SetTarget(&layera->target, player->mo);
|
||||
|
||||
layerb = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_INSTASHIELDB);
|
||||
P_SetTarget(&layerb->target, player->mo);
|
||||
}
|
||||
|
||||
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem)
|
||||
{
|
||||
const UINT8 scoremultiply = ((K_IsPlayerWanted(player) && !trapitem) ? 2 : 1);
|
||||
|
@ -1567,7 +1585,10 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem
|
|||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0
|
||||
|| player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_hyudorotimer] > 0
|
||||
|| (G_BattleGametype() && ((player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
{
|
||||
K_DoInstashield(player);
|
||||
return;
|
||||
}
|
||||
|
||||
if (source && source != player->mo && source->player)
|
||||
K_PlayHitEmSound(source);
|
||||
|
@ -1640,7 +1661,10 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
|
|||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_invincibilitytimer] > 0
|
||||
|| player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_hyudorotimer] > 0
|
||||
|| (G_BattleGametype() && ((player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
{
|
||||
K_DoInstashield(player);
|
||||
return;
|
||||
}
|
||||
|
||||
player->kartstuff[k_sneakertimer] = 0;
|
||||
player->kartstuff[k_driftboost] = 0;
|
||||
|
@ -1698,7 +1722,10 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
|
|||
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0
|
||||
|| player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_hyudorotimer] > 0
|
||||
|| (G_BattleGametype() && ((player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
|
||||
{
|
||||
K_DoInstashield(player);
|
||||
return;
|
||||
}
|
||||
|
||||
player->mo->momz = 18*(mapheaderinfo[gamemap-1]->mobj_scale);
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
|
@ -1772,12 +1799,15 @@ void K_StealBumper(player_t *player, player_t *victim, boolean force)
|
|||
if (victim->kartstuff[k_bumper] <= 0) // || player->kartstuff[k_bumper] >= cv_kartbumpers.value+2
|
||||
return;
|
||||
|
||||
if ((player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0
|
||||
|| player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_hyudorotimer] > 0
|
||||
|| (player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]))
|
||||
|| (victim->powers[pw_flashing] > 0 || victim->kartstuff[k_squishedtimer] > 0 || victim->kartstuff[k_spinouttimer] > 0
|
||||
|| victim->kartstuff[k_invincibilitytimer] > 0 || victim->kartstuff[k_growshrinktimer] > 0 || victim->kartstuff[k_hyudorotimer] > 0))
|
||||
if (player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0)
|
||||
return;
|
||||
|
||||
if (victim->powers[pw_flashing] > 0 || victim->kartstuff[k_squishedtimer] > 0 || victim->kartstuff[k_spinouttimer] > 0
|
||||
|| victim->kartstuff[k_invincibilitytimer] > 0 || victim->kartstuff[k_growshrinktimer] > 0 || victim->kartstuff[k_hyudorotimer] > 0)
|
||||
{
|
||||
K_DoInstashield(victim);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (netgame)
|
||||
|
@ -2835,14 +2865,14 @@ static void K_MoveHeldObjects(player_t *player)
|
|||
|
||||
cur->angle = R_PointToAngle2(cur->x, cur->y, targx, targy);
|
||||
|
||||
if (P_IsObjectOnGround(player->mo) && player->speed > 0 && player->kartstuff[k_bananadrag] > TICRATE
|
||||
/*if (P_IsObjectOnGround(player->mo) && player->speed > 0 && player->kartstuff[k_bananadrag] > TICRATE
|
||||
&& P_RandomChance(min(FRACUNIT/2, FixedDiv(player->speed, K_GetKartSpeed(player, false))/2)))
|
||||
{
|
||||
if (leveltime & 1)
|
||||
targz += 8*(2*FRACUNIT)/7;
|
||||
else
|
||||
targz -= 8*(2*FRACUNIT)/7;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (speed > dist)
|
||||
P_InstaThrust(cur, cur->angle, speed-dist);
|
||||
|
@ -3036,6 +3066,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (P_IsObjectOnGround(player->mo))
|
||||
player->kartstuff[k_waterskip] = 0;
|
||||
|
||||
if (player->kartstuff[k_instashield])
|
||||
player->kartstuff[k_instashield]--;
|
||||
|
||||
// ???
|
||||
/*
|
||||
if (player->kartstuff[k_jmp] > 1 && onground)
|
||||
|
|
|
@ -25,6 +25,7 @@ void K_RespawnChecker(player_t *player);
|
|||
void K_KartMoveAnimation(player_t *player);
|
||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||
void K_KartPlayerAfterThink(player_t *player);
|
||||
void K_DoInstashield(player_t *player);
|
||||
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem);
|
||||
void K_SquishPlayer(player_t *player, mobj_t *source);
|
||||
void K_ExplodePlayer(player_t *player, mobj_t *source);
|
||||
|
|
|
@ -2038,6 +2038,16 @@ static int lib_kKartBouncing(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kDoInstashield(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
NOHUD
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
K_DoInstashield(player);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kSpinPlayer(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
|
@ -2422,6 +2432,7 @@ static luaL_Reg lib[] = {
|
|||
{"K_IsPlayerLosing",lib_kIsPlayerLosing},
|
||||
{"K_IsPlayerWanted",lib_kIsPlayerWanted},
|
||||
{"K_KartBouncing",lib_kKartBouncing},
|
||||
{"K_DoInstashield",lib_kDoInstashield},
|
||||
{"K_SpinPlayer",lib_kSpinPlayer},
|
||||
{"K_SquishPlayer",lib_kSquishPlayer},
|
||||
{"K_ExplodePlayer",lib_kExplodePlayer},
|
||||
|
|
|
@ -3079,7 +3079,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
#else
|
||||
static const boolean force = false;
|
||||
#endif
|
||||
mobj_t *blueexplode;
|
||||
|
||||
if (objectplacing)
|
||||
return false;
|
||||
|
@ -3283,12 +3282,13 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
// Self-Propelled Bomb
|
||||
if (damage == 65)
|
||||
{
|
||||
mobj_t *spbexplode;
|
||||
if (player == source->player)
|
||||
return false;
|
||||
// Just need to do this now! Being thrown upwards is done by the explosion.
|
||||
//P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUELIGHTNING);
|
||||
blueexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
||||
P_SetTarget(&blueexplode->target, source);
|
||||
spbexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
||||
P_SetTarget(&spbexplode->target, source);
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
@ -3315,7 +3315,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
if (damage == 10000)
|
||||
P_KillPlayer(player, source, damage);
|
||||
else if (player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->powers[pw_flashing])
|
||||
{
|
||||
K_DoInstashield(player);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (inflictor && (inflictor->type == MT_ORBINAUT || inflictor->type == MT_ORBINAUT_SHIELD
|
||||
|
|
15
src/p_map.c
15
src/p_map.c
|
@ -1633,13 +1633,6 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
}
|
||||
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
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
return true; // overhead
|
||||
|
@ -1659,7 +1652,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
||||
{
|
||||
K_KartBouncing(tmthing, thing, true, false);
|
||||
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring] && tvulnerable)
|
||||
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring])
|
||||
{
|
||||
K_StealBumper(tmthing->player, thing->player, false);
|
||||
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||
|
@ -1668,7 +1661,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
||||
{
|
||||
K_KartBouncing(thing, tmthing, true, false);
|
||||
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring] && tmtvulnerable)
|
||||
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring])
|
||||
{
|
||||
K_StealBumper(thing->player, tmthing->player, false);
|
||||
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||
|
@ -1679,12 +1672,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && tmtvulnerable)
|
||||
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]))
|
||||
{
|
||||
K_StealBumper(thing->player, tmthing->player, false);
|
||||
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||
}
|
||||
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && tvulnerable)
|
||||
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]))
|
||||
{
|
||||
K_StealBumper(tmthing->player, thing->player, false);
|
||||
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||
|
|
14
src/p_mobj.c
14
src/p_mobj.c
|
@ -8200,6 +8200,20 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
|
||||
break;
|
||||
case MT_INSTASHIELDB:
|
||||
if (leveltime & 1)
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
/* FALLTHRU */
|
||||
case MT_INSTASHIELDA:
|
||||
if (!mobj->target || !mobj->target->health || (mobj->target->player && !mobj->target->player->kartstuff[k_instashield]))
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
|
||||
break;
|
||||
case MT_KARMAHITBOX:
|
||||
if (!mobj->target || !mobj->target->health || !mobj->target->player || mobj->target->player->spectator
|
||||
|| (G_RaceGametype() || mobj->target->player->kartstuff[k_bumper]))
|
||||
|
|
|
@ -695,7 +695,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"cdpcm6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdpcm7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdpcm8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdpcm9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"cdpcm9", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // No damage taken
|
||||
|
||||
// Knuckles Chaotix sounds
|
||||
{"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
|
Loading…
Reference in a new issue