mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Drop Funny Spikes when getting stung
DEBTA0-DEBTH0 Instead of dropping rings, drop non collectable spikes!
This commit is contained in:
parent
053ecf203f
commit
f9c6a5e8b5
5 changed files with 105 additions and 10 deletions
|
|
@ -9414,6 +9414,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_FINISHBEAMEND1",
|
||||
"S_FINISHBEAMEND2",
|
||||
|
||||
// Funny Spike
|
||||
"S_DEBTSPIKE1",
|
||||
"S_DEBTSPIKE2",
|
||||
"S_DEBTSPIKE3",
|
||||
"S_DEBTSPIKE4",
|
||||
"S_DEBTSPIKE5",
|
||||
"S_DEBTSPIKE6",
|
||||
"S_DEBTSPIKE7",
|
||||
"S_DEBTSPIKE8",
|
||||
"S_DEBTSPIKE9",
|
||||
"S_DEBTSPIKEA",
|
||||
"S_DEBTSPIKEB",
|
||||
"S_DEBTSPIKEC",
|
||||
"S_DEBTSPIKED",
|
||||
"S_DEBTSPIKEE",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"S_NAMECHECK",
|
||||
#endif
|
||||
|
|
@ -9553,6 +9569,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
// Collectible Items
|
||||
"MT_RING",
|
||||
"MT_FLINGRING", // Lost ring
|
||||
"MT_DEBTSPIKE", // Ring debt funny spike
|
||||
"MT_BLUESPHERE", // Blue sphere for special stages
|
||||
"MT_FLINGBLUESPHERE", // Lost blue sphere
|
||||
"MT_BOMBSPHERE",
|
||||
|
|
|
|||
44
src/info.c
44
src/info.c
|
|
@ -131,6 +131,7 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
|
||||
// Collectible Items
|
||||
"RING",
|
||||
"DEBT",
|
||||
"TRNG", // Team Rings
|
||||
"TOKE", // Special Stage Token
|
||||
"RFLG", // Red CTF Flag
|
||||
|
|
@ -5126,6 +5127,22 @@ state_t states[NUMSTATES] =
|
|||
{SPR_FLBM, FF_PAPERSPRITE|5, 1, {NULL}, 0, 0, S_NULL}, // S_FINISHBEAMEND1
|
||||
{SPR_FLBM, FF_PAPERSPRITE|6, 1, {NULL}, 0, 0, S_NULL}, // S_FINISHBEAMEND2
|
||||
|
||||
// Funny Spike
|
||||
{SPR_DEBT, 0|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE2}, // S_DEBTSPIKE1
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE3}, // S_DEBTSPIKE2
|
||||
{SPR_DEBT, 1|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE4}, // S_DEBTSPIKE3
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE5}, // S_DEBTSPIKE4
|
||||
{SPR_DEBT, 2|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE6}, // S_DEBTSPIKE5
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE7}, // S_DEBTSPIKE6
|
||||
{SPR_DEBT, 3|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE8}, // S_DEBTSPIKE7
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE9}, // S_DEBTSPIKE8
|
||||
{SPR_DEBT, 4|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKEA}, // S_DEBTSPIKE9
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKEB}, // S_DEBTSPIKEA
|
||||
{SPR_DEBT, 5|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKEC}, // S_DEBTSPIKEB
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKED}, // S_DEBTSPIKEC
|
||||
{SPR_DEBT, 6|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKEE}, // S_DEBTSPIKED
|
||||
{SPR_DEBT, 7|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_DEBTSPIKE1}, // S_DEBTSPIKEE
|
||||
|
||||
#ifdef SEENAMES
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||
#endif
|
||||
|
|
@ -8022,6 +8039,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_DEBTSPIKE
|
||||
-1, // doomednum
|
||||
S_DEBTSPIKE1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
MT_FLINGRING, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
MT_RING, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_SPRK1, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_itemup, // deathsound
|
||||
38*FRACUNIT, // speed
|
||||
24*FRACUNIT, // radius
|
||||
48*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BLUESPHERE
|
||||
-1, // doomednum
|
||||
S_BLUESPHERE_SPAWN, // spawnstate
|
||||
|
|
|
|||
17
src/info.h
17
src/info.h
|
|
@ -402,6 +402,7 @@ typedef enum sprite
|
|||
|
||||
// Collectible Items
|
||||
SPR_RING,
|
||||
SPR_DEBT,
|
||||
SPR_TRNG, // Team Rings
|
||||
SPR_TOKE, // Special Stage Token
|
||||
SPR_RFLG, // Red CTF Flag
|
||||
|
|
@ -5281,6 +5282,21 @@ typedef enum state
|
|||
S_FINISHBEAMEND1,
|
||||
S_FINISHBEAMEND2,
|
||||
|
||||
S_DEBTSPIKE1,
|
||||
S_DEBTSPIKE2,
|
||||
S_DEBTSPIKE3,
|
||||
S_DEBTSPIKE4,
|
||||
S_DEBTSPIKE5,
|
||||
S_DEBTSPIKE6,
|
||||
S_DEBTSPIKE7,
|
||||
S_DEBTSPIKE8,
|
||||
S_DEBTSPIKE9,
|
||||
S_DEBTSPIKEA,
|
||||
S_DEBTSPIKEB,
|
||||
S_DEBTSPIKEC,
|
||||
S_DEBTSPIKED,
|
||||
S_DEBTSPIKEE,
|
||||
|
||||
#ifdef SEENAMES
|
||||
S_NAMECHECK,
|
||||
#endif
|
||||
|
|
@ -5440,6 +5456,7 @@ typedef enum mobj_type
|
|||
// Collectible Items
|
||||
MT_RING,
|
||||
MT_FLINGRING, // Lost ring
|
||||
MT_DEBTSPIKE, // Ring debt funny spike
|
||||
MT_BLUESPHERE, // Blue sphere for special stages
|
||||
MT_FLINGBLUESPHERE, // Lost blue sphere
|
||||
MT_BOMBSPHERE,
|
||||
|
|
|
|||
|
|
@ -2115,6 +2115,9 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
fixed_t ns;
|
||||
fixed_t z;
|
||||
fixed_t momxy = 5<<FRACBITS, momz = 12<<FRACBITS; // base horizonal/vertical thrusts
|
||||
mobjtype_t objType;
|
||||
tic_t objFuse;
|
||||
fixed_t objScale = player->mo->scale;
|
||||
|
||||
// Rings shouldn't be in Battle!
|
||||
if (gametyperules & GTR_SPHERES)
|
||||
|
|
@ -2134,9 +2137,19 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
else if (num_rings <= 0)
|
||||
return;
|
||||
|
||||
// Cap the maximum loss automatically to 2 in ring debt
|
||||
if (player->rings <= 0 && num_rings > 2)
|
||||
num_rings = 2;
|
||||
if (player->rings <= 0)
|
||||
{
|
||||
// In ring debt, spill the Funny Spikes
|
||||
objType = MT_DEBTSPIKE;
|
||||
objFuse = 90;
|
||||
|
||||
objScale = 3 * objScale / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
objType = MT_FLINGRING;
|
||||
objFuse = 60*TICRATE;
|
||||
}
|
||||
|
||||
P_GivePlayerRings(player, -num_rings);
|
||||
|
||||
|
|
@ -2145,8 +2158,6 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
|
||||
for (i = 0; i < num_rings; i++)
|
||||
{
|
||||
INT32 objType = mobjinfo[MT_RING].reactiontime;
|
||||
|
||||
z = player->mo->z;
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
z += player->mo->height - mobjinfo[objType].height;
|
||||
|
|
@ -2154,11 +2165,11 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
mo = P_SpawnMobj(player->mo->x, player->mo->y, z, objType);
|
||||
|
||||
mo->threshold = 10;
|
||||
mo->fuse = 60*TICRATE;
|
||||
mo->fuse = objFuse;
|
||||
P_SetTarget(&mo->target, player->mo);
|
||||
|
||||
mo->destscale = player->mo->scale;
|
||||
P_SetScale(mo, player->mo->scale);
|
||||
mo->destscale = objScale;
|
||||
P_SetScale(mo, objScale);
|
||||
|
||||
// Angle / height offset changes every other ring
|
||||
if (i != 0)
|
||||
|
|
@ -2172,11 +2183,11 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
fa += ANGLE_180;
|
||||
}
|
||||
|
||||
ns = FixedMul(momxy, mo->scale);
|
||||
ns = FixedMul(momxy, player->mo->scale);
|
||||
mo->momx = (mo->target->momx/2) + FixedMul(FINECOSINE(fa>>ANGLETOFINESHIFT), ns);
|
||||
mo->momy = (mo->target->momy/2) + FixedMul(FINESINE(fa>>ANGLETOFINESHIFT), ns);
|
||||
|
||||
ns = FixedMul(momz, mo->scale);
|
||||
ns = FixedMul(momz, player->mo->scale);
|
||||
P_SetObjectMomZ(mo, (mo->target->momz/2) + ns, false);
|
||||
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
|
|
|
|||
|
|
@ -2280,6 +2280,11 @@ boolean P_ZMovement(mobj_t *mo)
|
|||
else
|
||||
mo->flags2 ^= MFD_DONTDRAW;
|
||||
}
|
||||
else if (mo->type == MT_DEBTSPIKE)
|
||||
{
|
||||
mom.x = mom.y = 0;
|
||||
mom.z = -mom.z/2;
|
||||
}
|
||||
else if (mo->flags & MF_MISSILE)
|
||||
{
|
||||
if (!(mo->flags & MF_NOCLIP))
|
||||
|
|
@ -9124,6 +9129,7 @@ static void P_DefaultMobjShadowScale(mobj_t *thing)
|
|||
thing->shadowscale = FRACUNIT;
|
||||
break;
|
||||
case MT_RING:
|
||||
case MT_DEBTSPIKE:
|
||||
case MT_FLOATINGITEM:
|
||||
case MT_BLUESPHERE:
|
||||
case MT_EMERALD:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue