Fixed thwomp sectors, Added Magnet Item.

This commit is contained in:
ZTsukei 2017-02-18 13:39:25 -05:00
parent 559607dfe2
commit 0a782bf79e
12 changed files with 233 additions and 119 deletions

View file

@ -2536,37 +2536,36 @@ state_t states[NUMSTATES] =
{SPR_BSPR, 2, 1, {NULL}, 0, 0, S_BDIAG8}, // S_BDIAG7
{SPR_BSPR, 1, 1, {NULL}, 0, 0, S_BDIAG1}, // S_BDIAG8
{SPR_RNDM, 0, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM2}, // S_RANDOMITEM1
{SPR_RNDM, 1, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM3}, // S_RANDOMITEM2
{SPR_RNDM, 2, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM4}, // S_RANDOMITEM3
{SPR_RNDM, 3, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM5}, // S_RANDOMITEM4
{SPR_RNDM, 4, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM6}, // S_RANDOMITEM5
{SPR_RNDM, 5, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM7}, // S_RANDOMITEM6
{SPR_RNDM, 6, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM8}, // S_RANDOMITEM7
{SPR_RNDM, 7, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM9}, // S_RANDOMITEM8
{SPR_RNDM, 8, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM10}, // S_RANDOMITEM9
{SPR_RNDM, 9, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM11}, // S_RANDOMITEM10
{SPR_RNDM, 10, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM12}, // S_RANDOMITEM11
{SPR_RNDM, 11, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM13}, // S_RANDOMITEM12
{SPR_RNDM, 12, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM14}, // S_RANDOMITEM13
{SPR_RNDM, 13, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM15}, // S_RANDOMITEM14
{SPR_RNDM, 14, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM16}, // S_RANDOMITEM15
{SPR_RNDM, 15, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM17}, // S_RANDOMITEM16
{SPR_RNDM, 16, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM18}, // S_RANDOMITEM17
{SPR_RNDM, 17, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM19}, // S_RANDOMITEM18
{SPR_RNDM, 18, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM20}, // S_RANDOMITEM19
{SPR_RNDM, 19, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM21}, // S_RANDOMITEM20
{SPR_RNDM, 20, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM22}, // S_RANDOMITEM21
{SPR_RNDM, 21, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM23}, // S_RANDOMITEM22
{SPR_RNDM, 22, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM24}, // S_RANDOMITEM23
{SPR_RNDM, 23, 3, {A_AttractChase}, 0, 0, S_RANDOMITEM1}, // S_RANDOMITEM24
{SPR_RNDM, 0, 3, {NULL}, 0, 0, S_RANDOMITEM2}, // S_RANDOMITEM1
{SPR_RNDM, 1, 3, {NULL}, 0, 0, S_RANDOMITEM3}, // S_RANDOMITEM2
{SPR_RNDM, 2, 3, {NULL}, 0, 0, S_RANDOMITEM4}, // S_RANDOMITEM3
{SPR_RNDM, 3, 3, {NULL}, 0, 0, S_RANDOMITEM5}, // S_RANDOMITEM4
{SPR_RNDM, 4, 3, {NULL}, 0, 0, S_RANDOMITEM6}, // S_RANDOMITEM5
{SPR_RNDM, 5, 3, {NULL}, 0, 0, S_RANDOMITEM7}, // S_RANDOMITEM6
{SPR_RNDM, 6, 3, {NULL}, 0, 0, S_RANDOMITEM8}, // S_RANDOMITEM7
{SPR_RNDM, 7, 3, {NULL}, 0, 0, S_RANDOMITEM9}, // S_RANDOMITEM8
{SPR_RNDM, 8, 3, {NULL}, 0, 0, S_RANDOMITEM10}, // S_RANDOMITEM9
{SPR_RNDM, 9, 3, {NULL}, 0, 0, S_RANDOMITEM11}, // S_RANDOMITEM10
{SPR_RNDM, 10, 3, {NULL}, 0, 0, S_RANDOMITEM12}, // S_RANDOMITEM11
{SPR_RNDM, 11, 3, {NULL}, 0, 0, S_RANDOMITEM13}, // S_RANDOMITEM12
{SPR_RNDM, 12, 3, {NULL}, 0, 0, S_RANDOMITEM14}, // S_RANDOMITEM13
{SPR_RNDM, 13, 3, {NULL}, 0, 0, S_RANDOMITEM15}, // S_RANDOMITEM14
{SPR_RNDM, 14, 3, {NULL}, 0, 0, S_RANDOMITEM16}, // S_RANDOMITEM15
{SPR_RNDM, 15, 3, {NULL}, 0, 0, S_RANDOMITEM17}, // S_RANDOMITEM16
{SPR_RNDM, 16, 3, {NULL}, 0, 0, S_RANDOMITEM18}, // S_RANDOMITEM17
{SPR_RNDM, 17, 3, {NULL}, 0, 0, S_RANDOMITEM19}, // S_RANDOMITEM18
{SPR_RNDM, 18, 3, {NULL}, 0, 0, S_RANDOMITEM20}, // S_RANDOMITEM19
{SPR_RNDM, 19, 3, {NULL}, 0, 0, S_RANDOMITEM21}, // S_RANDOMITEM20
{SPR_RNDM, 20, 3, {NULL}, 0, 0, S_RANDOMITEM22}, // S_RANDOMITEM21
{SPR_RNDM, 21, 3, {NULL}, 0, 0, S_RANDOMITEM23}, // S_RANDOMITEM22
{SPR_RNDM, 22, 3, {NULL}, 0, 0, S_RANDOMITEM24}, // S_RANDOMITEM23
{SPR_RNDM, 23, 3, {NULL}, 0, 0, S_RANDOMITEM1}, // S_RANDOMITEM24
{SPR_RNDM, 0, 1, {A_ItemPop}, 0, 0, S_NULL}, // S_DEADRANDOMITEM
{SPR_SPRK, 0, 2, {NULL}, 0, 0, S_RANDOMITEMPOP2}, // S_RANDOMITEMPOP1
{SPR_SPRK, 1, 2, {NULL}, 0, 0, S_RANDOMITEMPOP3}, // S_RANDOMITEMPOP2
{SPR_SPRK, 2, 2, {NULL}, 0, 0, S_RANDOMITEMPOP4}, // S_RANDOMITEMPOP3
{SPR_SPRK, 3, 2, {NULL}, 0, 0, S_RANDOMITEMPOP5}, // S_RANDOMITEMPOP4
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_NULL}, // S_RANDOMITEMPOP5
{SPR_SPRK, FF_FULLBRIGHT, 5, {NULL}, 0, 0, S_RANDOMITEMPOP2}, // S_RANDOMITEMPOP1
{SPR_SPRK, FF_FULLBRIGHT|1, 5, {NULL}, 0, 0, S_RANDOMITEMPOP3}, // S_RANDOMITEMPOP2
{SPR_SPRK, FF_FULLBRIGHT|2, 5, {NULL}, 0, 0, S_RANDOMITEMPOP4}, // S_RANDOMITEMPOP3
{SPR_SPRK, FF_FULLBRIGHT|3, 5, {NULL}, 0, 0, S_NULL}, // S_RANDOMITEMPOP4
{SPR_DRIF, 0, 2, {NULL}, 0, 0, S_DRIFTSPARK2}, // S_DRIFTSPARK1
{SPR_DRIF, 1, 2, {NULL}, 0, 0, S_DRIFTSPARK3}, // S_DRIFTSPARK2
@ -14062,12 +14061,12 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
{ // MT_RANDOMITEM
2000, // doomednum
S_RANDOMITEM1, // spawnstate
1, // spawnhealth
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
MT_FLINGRANDOMITEM, // reactiontime
sfx_None, // attacksound
S_RANDOMITEM1, // painstate
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
@ -14075,7 +14074,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_DEADRANDOMITEM, // deathstate
S_NULL, // xdeathstate
sfx_pop, // deathsound
64*FRACUNIT, // speed
60*FRACUNIT, // speed
32*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
@ -14086,13 +14085,40 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_FLINGRANDOMITEM
-1, // doomednum
S_RANDOMITEM1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
MT_FLINGRANDOMITEM, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
MT_RANDOMITEM, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_DEADRANDOMITEM, // deathstate
S_NULL, // xdeathstate
sfx_pop, // deathsound
60*FRACUNIT, // speed
31*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_SLIDEME|MF_SPECIAL, // flags
S_NULL // raisestate
},
{ // MT_RANDOMITEMPOP
-1, // doomednum
S_RANDOMITEMPOP1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
0, // reactiontime
sfx_None, // attacksound
S_RANDOMITEMPOP1, // painstate
0, // painchance

View file

@ -3043,7 +3043,6 @@ typedef enum state
S_RANDOMITEMPOP2,
S_RANDOMITEMPOP3,
S_RANDOMITEMPOP4,
S_RANDOMITEMPOP5,
//}
// Drift Sparks
@ -3748,6 +3747,7 @@ typedef enum mobj_type
MT_INVISSPRING,
MT_BLUEDIAG,
MT_RANDOMITEM,
MT_FLINGRANDOMITEM,
MT_RANDOMITEMPOP,
MT_MUSHROOMTRAIL,

View file

@ -672,7 +672,6 @@ static fixed_t K_KartItemOdds_Retro[MAXPLAYERS][NUMKARTITEMS][MAXPLAYERS] =
*/
static void K_KartGetItemResult(player_t *player, fixed_t getitem, boolean retrokart)
{
getitem++;
switch (getitem)
{
case 1: // Magnet
@ -758,8 +757,11 @@ static void K_KartGetItemResult(player_t *player, fixed_t getitem, boolean retro
*/
static void K_KartSetItemResult(fixed_t position, fixed_t giveitem)
{
fixed_t this_pingame = pingame-1;
fixed_t this_giveitem = giveitem-1;
prevchance = chance;
basechance = K_KartItemOdds_Retro[pingame-1][giveitem][position]; // Number of slots in the array, based on odds
basechance = K_KartItemOdds_Retro[this_pingame][this_giveitem][position]; // Number of slots in the array, based on odds
for (; chance < prevchance + basechance; chance++)
{
@ -1533,6 +1535,13 @@ static mobj_t *P_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
return mo;
}
static void K_DoMagnet(player_t * player)
{
S_StartSound(player->mo, sfx_s3k45);
player->kartstuff[k_magnettimer] = 35;
P_NukeEnemies(player->mo, player->mo, 16*FRACUNIT);
}
static void K_DoBooSteal(player_t * player)
{
INT32 i, numplayers = 0;
@ -1957,6 +1966,26 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
if (player && player->health > 0 && !player->spectator && !player->exiting && player->kartstuff[k_spinouttimer] == 0)
{
// Magnet
// Boo
// Mushroom
// Triple Mushroom
// Mega Mushroom
// Gold Mushroom
// Star
// Triple Banana
// Fake Item
// Banana
// Green Shell
// Red Shell
// Triple Green Shell
// Bob-omb
// Blue Shell
// Fire Flower
// Triple Red Shell
// Lightning
// GoldenMushroom power
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && player->kartstuff[k_goldshroom] == 1 && player->kartstuff[k_goldshroomtimer] == 0 && NO_BOO)
{
@ -2314,6 +2343,13 @@ void K_MoveKartPlayer(player_t *player, ticcmd_t *cmd, boolean onground)
player->pflags |= PF_ATTACKDOWN;
player->kartstuff[k_boo] = 0;
}
// Magnet
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_magnet] == 1 && NO_BOO)
{
K_DoMagnet(player);
player->pflags |= PF_ATTACKDOWN;
player->kartstuff[k_magnet] = 0;
}
if (player->kartstuff[k_mushroomtimer] > 0 && player->kartstuff[k_boosting] == 0 && onground)
{

View file

@ -740,8 +740,9 @@ static boolean P_LookForShield(mobj_t *actor)
(actor->type == MT_BLUETEAMRING && player->ctfteam != 2))
continue;
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
&& (P_AproxDistance(P_AproxDistance(actor->x-player->mo->x, actor->y-player->mo->y), actor->z-player->mo->z) < FixedMul(RING_DIST, player->mo->scale)))
// SRB2kart - magnet item
if (player->kartstuff[k_magnettimer] //(player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
&& (P_AproxDistance(P_AproxDistance(actor->x-player->mo->x, actor->y-player->mo->y), actor->z-player->mo->z) < FixedMul(RING_DIST/2, player->mo->scale)))
{
P_SetTarget(&actor->tracer, player->mo);
return true;
@ -849,6 +850,9 @@ void A_Look(mobj_t *actor)
if (!P_LookForPlayers(actor, locvar1 & 65535, false , FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
return;
if (leveltime < 4*TICRATE && gametype == GT_RACE) // SRB2kart - no looking before race starts
return;
// go into chase state
if (!locvar2)
{
@ -3004,7 +3008,8 @@ void A_RingShield(mobj_t *actor)
P_SpawnShieldOrb(player);
}
S_StartSound(player->mo, actor->info->seesound);
if (!player->exiting) // SRB2kart
S_StartSound(player->mo, actor->info->seesound);
}
// Function: A_RingBox
@ -3608,7 +3613,8 @@ void A_AttractChase(mobj_t *actor)
// Turn flingrings back into regular rings if attracted.
if (actor->tracer && actor->tracer->player
&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT && actor->info->reactiontime && actor->type != (mobjtype_t)actor->info->reactiontime)
&& actor->tracer->player->kartstuff[k_magnettimer] //&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT
&& actor->info->reactiontime && actor->type != (mobjtype_t)actor->info->reactiontime)
{
mobj_t *newring;
newring = P_SpawnMobj(actor->x, actor->y, actor->z, actor->info->reactiontime);
@ -3813,15 +3819,15 @@ void A_ThrownRing(mobj_t *actor)
// A non-homing ring getting attracted by a
// magnetic player. If he gets too far away, make
// sure to stop the attraction!
if ((!actor->tracer->health) || (actor->tracer->player && (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
&& P_AproxDistance(P_AproxDistance(actor->tracer->x-actor->x,
actor->tracer->y-actor->y), actor->tracer->z-actor->z) > FixedMul(RING_DIST/4, actor->tracer->scale)))
if ((!actor->tracer->health) // || (actor->tracer->player && (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
|| P_AproxDistance(P_AproxDistance(actor->tracer->x-actor->x,
actor->tracer->y-actor->y), actor->tracer->z-actor->z) > FixedMul(RING_DIST, actor->tracer->scale)) // SRB2kart
{
P_SetTarget(&actor->tracer, NULL);
}
if (actor->tracer && (actor->tracer->health)
&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT)// Already found someone to follow.
if (actor->tracer && (actor->tracer->health)) // SRB2kart - red shells always follow
//&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT)// Already found someone to follow.
{
const INT32 temp = actor->threshold;
actor->threshold = 32000;
@ -3871,6 +3877,10 @@ void A_ThrownRing(mobj_t *actor)
if (gametype == GT_CTF
&& actor->target->player->ctfteam == player->ctfteam)
continue;
if (actor->target->player->kartstuff[k_position] < player->kartstuff[k_position]) // SRB2kart - Red Shells only go after people ahead of you
continue;
}
dist = P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
@ -3889,8 +3899,7 @@ void A_ThrownRing(mobj_t *actor)
if (!P_CheckSight(actor, player->mo))
continue; // out of sight
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
&& dist < FixedMul(RING_DIST/4, player->mo->scale))
if (dist < FixedMul(2048*FRACUNIT, player->mo->scale)) // SRB2kart // (player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT &&
P_SetTarget(&actor->tracer, player->mo);
return;
}
@ -8078,7 +8087,6 @@ void A_ToggleFlameJet(mobj_t* actor)
void A_ItemPop(mobj_t *actor)
{
mobj_t *remains;
mobjtype_t item = 0;
// de-solidify
//P_UnsetThingPosition(actor);
@ -8104,35 +8112,33 @@ void A_ItemPop(mobj_t *actor)
actor->flags2 |= MF2_BOSSNOTRAP; // Dummy flag to mark this as an exploded TV until it respawns
tmthing = remains;
if (actor->info->deathsound) S_StartSound(remains, actor->info->deathsound);
if (actor->info->deathsound)
S_StartSound(remains, actor->info->deathsound);
switch (actor->type)
if (actor->type != MT_RANDOMITEM)
{
case MT_RANDOMITEM: // Random!
if (actor->target && actor->target->player
&& !(actor->target->player->kartstuff[k_greenshell] & 2 || actor->target->player->kartstuff[k_triplegreenshell] & 8
|| actor->target->player->kartstuff[k_redshell] & 2 || actor->target->player->kartstuff[k_tripleredshell] & 8
|| actor->target->player->kartstuff[k_banana] & 2 || actor->target->player->kartstuff[k_triplebanana] & 8
|| actor->target->player->kartstuff[k_fakeitem] & 2 || actor->target->player->kartstuff[k_magnet]
|| actor->target->player->kartstuff[k_bobomb] & 2 || actor->target->player->kartstuff[k_blueshell]
|| actor->target->player->kartstuff[k_mushroom] || actor->target->player->kartstuff[k_fireflower]
|| actor->target->player->kartstuff[k_star] || actor->target->player->kartstuff[k_goldshroom]
|| actor->target->player->kartstuff[k_lightning] || actor->target->player->kartstuff[k_megashroom]
|| actor->target->player->kartstuff[k_itemroulette]
|| actor->target->player->kartstuff[k_boo] || actor->target->player->kartstuff[k_bootaketimer]
|| actor->target->player->kartstuff[k_boostolentimer])
)
actor->target->player->kartstuff[k_itemroulette] = 1;
else if(cv_debug && !(actor->target && actor->target->player))
CONS_Printf("ERROR: Powerup has no target!\n");
remains->flags &= ~MF_AMBUSH;
break;
default:
item = actor->info->damage;
break;
P_RemoveMobj(actor);
return;
}
if (actor->target && actor->target->player
&& !(actor->target->player->kartstuff[k_greenshell] & 2 || actor->target->player->kartstuff[k_triplegreenshell] & 8
|| actor->target->player->kartstuff[k_redshell] & 2 || actor->target->player->kartstuff[k_tripleredshell] & 8
|| actor->target->player->kartstuff[k_banana] & 2 || actor->target->player->kartstuff[k_triplebanana] & 8
|| actor->target->player->kartstuff[k_fakeitem] & 2 || actor->target->player->kartstuff[k_magnet]
|| actor->target->player->kartstuff[k_bobomb] & 2 || actor->target->player->kartstuff[k_blueshell]
|| actor->target->player->kartstuff[k_mushroom] || actor->target->player->kartstuff[k_fireflower]
|| actor->target->player->kartstuff[k_star] || actor->target->player->kartstuff[k_goldshroom]
|| actor->target->player->kartstuff[k_lightning] || actor->target->player->kartstuff[k_megashroom]
|| actor->target->player->kartstuff[k_itemroulette]
|| actor->target->player->kartstuff[k_boo] || actor->target->player->kartstuff[k_bootaketimer]
|| actor->target->player->kartstuff[k_boostolentimer]))
actor->target->player->kartstuff[k_itemroulette] = 1;
else if(cv_debug && !(actor->target && actor->target->player))
CONS_Printf("ERROR: Powerup has no target!\n");
remains->flags &= ~MF_AMBUSH;
P_RemoveMobj(actor);
}

View file

@ -1819,10 +1819,20 @@ void T_ThwompSector(levelspecthink_t *thwomp)
sector_t *actionsector;
INT32 secnum;
// SRB2kart 170217 - Thwomps are automatic.
// Put up a timer before you start falling down.
// I could of used rowoffset, but the FOF actually
// modifies the textures's Y offset. It doesn't with
// textureoffset, so Effect 4 can be ignored as usual.
if (thwomp->sourceline->flags & ML_EFFECT1
&& leveltime < (unsigned)(sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS))
thwomp->direction = 0;
// If you just crashed down, wait a second before coming back up.
if (--thwomp->distance > 0)
{
sides[thwomp->sourceline->sidenum[0]].midtexture = sides[thwomp->sourceline->sidenum[0]].bottomtexture;
sides[thwomp->sourceline->sidenum[0]].midtexture = sides[thwomp->sourceline->sidenum[0]].toptexture;
//sides[thwomp->sourceline->sidenum[0]].midtexture = sides[thwomp->sourceline->sidenum[0]].bottomtexture;
return;
}
@ -1934,9 +1944,12 @@ void T_ThwompSector(levelspecthink_t *thwomp)
}
else // Not going anywhere, so look for players.
{
thinker_t *th;
mobj_t *mo;
//thinker_t *th;
//mobj_t *mo;
thwomp->direction = -1;
/* // SRB2kart 170217 - Thwomps are automatic.
// scan the thinkers to find players!
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
@ -1950,7 +1963,7 @@ void T_ThwompSector(levelspecthink_t *thwomp)
thwomp->direction = -1;
break;
}
}
}*/
thwomp->sector->ceilspeed = 0;
thwomp->sector->floorspeed = 0;
@ -3118,7 +3131,7 @@ INT32 EV_MarioBlock(sector_t *sec, sector_t *roversector, fixed_t topheight, mob
P_SetThingPosition(thing);
if (thing->flags & MF_SHOOTABLE)
P_DamageMobj(thing, puncher, puncher, 1);
else if (thing->type == MT_RING || thing->type == MT_COIN)
else if (thing->type == MT_RING || thing->type == MT_COIN || thing->type == MT_RANDOMITEM)
{
thing->momz = FixedMul(3*FRACUNIT, thing->scale);
P_TouchSpecialThing(thing, puncher, false);

View file

@ -386,7 +386,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// We now identify by object type, not sprite! Tails 04-11-2001
switch (special->type)
{
case MT_RANDOMITEM: // SRB2kart
case MT_RANDOMITEM: // SRB2kart
case MT_FLINGRANDOMITEM:
if (!(P_CanPickupItem(player, false)))
return;
special->momx = special->momy = special->momz = 0;
@ -2859,7 +2860,8 @@ void P_RemoveShield(player_t *player)
player->powers[pw_shield] = player->powers[pw_shield] & SH_STACK;
}
static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage)
/*
static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage) // SRB2kart - unused.
{
// Must do pain first to set flashing -- P_RemoveShield can cause damage
P_DoPlayerPain(player, source, inflictor);
@ -2890,6 +2892,7 @@ static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source,
P_AddPlayerScore(source->player, cv_match_scoring.value == 1 ? 25 : 50);
}
}
*/
static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage)
{

View file

@ -26,6 +26,9 @@
#include "w_wad.h"
#include "k_kart.h" // SRB2kart 011617
#include "hu_stuff.h" // SRB2kart
#include "i_system.h" // SRB2kart
#include "r_splats.h"
#ifdef ESLOPE
@ -112,7 +115,7 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z)
boolean P_DoSpring(mobj_t *spring, mobj_t *object)
{
INT32 pflags;
//INT32 pflags;
fixed_t offx, offy;
fixed_t vertispeed = spring->info->mass;
fixed_t horizspeed = spring->info->damage;
@ -203,7 +206,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
}
}
pflags = object->player->pflags & (PF_JUMPED|PF_SPINNING|PF_THOKKED); // I still need these.
//pflags = object->player->pflags & (PF_JUMPED|PF_SPINNING|PF_THOKKED); // I still need these.
P_ResetPlayer(object->player);
/* // SRB2kart - Springs don't need to change player state in kart.

View file

@ -1347,6 +1347,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
{
case MT_FLINGRING:
case MT_FLINGCOIN:
case MT_FLINGRANDOMITEM: // SRB2kart
case MT_FLINGEMERALD:
case MT_BOUNCERING:
case MT_RAILRING:
@ -2257,6 +2258,7 @@ static boolean P_ZMovement(mobj_t *mo)
case MT_BLUETEAMRING:
case MT_FLINGRING:
case MT_FLINGCOIN:
case MT_FLINGRANDOMITEM:
case MT_FLINGEMERALD:
case MT_RANDOMITEM:
// Remove flinged stuff from death pits.
@ -2450,6 +2452,7 @@ static boolean P_ZMovement(mobj_t *mo)
// Flingrings bounce
if (mo->type == MT_FLINGRING
|| mo->type == MT_FLINGCOIN
|| mo->type == MT_FLINGRANDOMITEM
|| P_WeaponOrPanel(mo->type)
|| mo->type == MT_FLINGEMERALD
|| mo->type == MT_BIGTUMBLEWEED
@ -5873,6 +5876,9 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y
fixed_t tx = dest->x;
fixed_t ty = dest->y;
fixed_t tz = dest->z + (dest->height/2); // Aim for center
if (source->type == MT_RANDOMITEM || source->type == MT_FLINGRANDOMITEM) // SRB2kart - item boxes are sorta tall
tz = dest->z;
if (!dest || dest->health <= 0 || !dest->player || !source->tracer)
return;
@ -7255,6 +7261,7 @@ void P_MobjThinker(mobj_t *mobj)
// Flung items
case MT_FLINGRING:
case MT_FLINGCOIN:
case MT_FLINGRANDOMITEM:
if (mobj->flags2 & MF2_NIGHTSPULL)
P_NightsItemChase(mobj);
else
@ -7590,6 +7597,7 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
#ifdef ESLOPE // Sliding physics for slidey mobjs!
if (mobj->type == MT_FLINGRING
|| mobj->type == MT_FLINGCOIN
|| mobj->type == MT_FLINGRANDOMITEM
|| P_WeaponOrPanel(mobj->type)
|| mobj->type == MT_FLINGEMERALD
|| mobj->type == MT_BIGTUMBLEWEED

View file

@ -816,7 +816,8 @@ void P_ReloadRings(void)
}
continue;
}
if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN || mo->type == MT_BLUEBALL))
if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN
|| mo->type == MT_BLUEBALL || mo->type == MT_RANDOMITEM))
continue;
// Don't auto-disintegrate things being pulled to us

View file

@ -2311,14 +2311,15 @@ static void P_DoPlayerHeadSigns(player_t *player)
//
// Handles player climbing
//
static void P_DoClimbing(player_t *player)
/*
static void P_DoClimbing(player_t *player) // SRB2kart - unused
{
return; // SRB2kart - don't need
ticcmd_t *cmd = &player->cmd;
fixed_t platx;
fixed_t platy;
subsector_t *glidesector;
boolean climb = true;
//boolean climb = true; // SRB2kart - unused
platx = P_ReturnThrustX(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale));
platy = P_ReturnThrustY(player->mo, player->mo->angle, player->mo->radius + FixedMul(8*FRACUNIT, player->mo->scale));
@ -2328,9 +2329,9 @@ static void P_DoClimbing(player_t *player)
if (!glidesector || glidesector->sector != player->mo->subsector->sector)
{
boolean floorclimb = false;
boolean thrust = false;
boolean boostup = false;
boolean skyclimber = false;
//boolean thrust = false; // SRB2kart - unused
//boolean boostup = false; // SRB2kart - unused
//boolean skyclimber = false; // SRB2kart - unused
fixed_t floorheight, ceilingheight; // ESLOPE
if (!glidesector)
@ -2693,7 +2694,6 @@ static void P_DoClimbing(player_t *player)
else
climb = false;
/* // SRB2kart - don't need
if (player->climbing && climb && (player->mo->momx || player->mo->momy || player->mo->momz)
&& !(player->mo->state >= &states[S_PLAY_CLIMB2] && player->mo->state <= &states[S_PLAY_CLIMB5]))
P_SetPlayerMobjState(player->mo, S_PLAY_CLIMB2);
@ -2718,7 +2718,6 @@ static void P_DoClimbing(player_t *player)
player->pflags |= PF_JUMPED;
P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
}
*/
}
else
{
@ -2732,7 +2731,6 @@ static void P_DoClimbing(player_t *player)
else
climb = false;
/*
if (player->climbing && climb && (player->mo->momx || player->mo->momy || player->mo->momz)
&& !(player->mo->state >= &states[S_PLAY_CLIMB2] && player->mo->state <= &states[S_PLAY_CLIMB5]))
P_SetPlayerMobjState(player->mo, S_PLAY_CLIMB2);
@ -2758,7 +2756,7 @@ static void P_DoClimbing(player_t *player)
if (player->climbing == 0)
P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
*/
if (player->climbing && P_IsObjectOnGround(player->mo))
{
@ -2766,6 +2764,7 @@ static void P_DoClimbing(player_t *player)
P_SetPlayerMobjState(player->mo, S_KART_STND); // SRB2kart
}
}
*/
//
// PIT_CheckSolidsTeeter
@ -2780,7 +2779,8 @@ static boolean couldteeter;
static fixed_t teeterxl, teeterxh;
static fixed_t teeteryl, teeteryh;
static boolean PIT_CheckSolidsTeeter(mobj_t *thing)
/*
static boolean PIT_CheckSolidsTeeter(mobj_t *thing) // SRB2kart - unused.
{
fixed_t blockdist;
fixed_t tiptop = FixedMul(MAXSTEPMOVE, teeterer->scale);
@ -2885,13 +2885,15 @@ static boolean PIT_CheckSolidsTeeter(mobj_t *thing)
solidteeter = false;
return true; // you're not teetering but it's not neccessarily over, YET
}
*/
//
// P_DoTeeter
//
// Handles player teetering
//
static void P_DoTeeter(player_t *player)
/*
static void P_DoTeeter(player_t *player) // SRB2kart - unused.
{
return; // SRB2kart - don't need
boolean teeter = false;
@ -3137,7 +3139,6 @@ teeterdone:
tmthing = oldtmthing; // restore old tmthing, goodness knows what the game does with this before mobj thinkers
}
}
/*
if (teeter)
{
if ((player->mo->state == &states[S_PLAY_STND] || player->mo->state == &states[S_PLAY_TAP1] || player->mo->state == &states[S_PLAY_TAP2] || player->mo->state == &states[S_PLAY_SUPERSTAND]))
@ -3145,8 +3146,8 @@ teeterdone:
}
else if ((player->mo->state == &states[S_PLAY_TEETER1] || player->mo->state == &states[S_PLAY_TEETER2] || player->mo->state == &states[S_PLAY_SUPERTEETER]))
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
*/
}
*/
//
// P_SetWeaponDelay
@ -3171,7 +3172,8 @@ static void P_SetWeaponDelay(player_t *player, INT32 delay)
//
// Handles firing ring weapons and Mario fireballs.
//
static void P_DoFiring(player_t *player, ticcmd_t *cmd)
/*
static void P_DoFiring(player_t *player, ticcmd_t *cmd) // SRB2kart - unused.
{
INT32 i;
@ -3382,6 +3384,7 @@ static void P_DoFiring(player_t *player, ticcmd_t *cmd)
// Release the grenade / whatever.
player->pflags &= ~PF_ATTACKDOWN;
}
*/
//
// P_DoSuperStuff()
@ -3732,7 +3735,8 @@ void P_DoJump(player_t *player, boolean soundandstate)
//
// Player spindash handling
//
static void P_DoSpinDash(player_t *player, ticcmd_t *cmd)
/*
static void P_DoSpinDash(player_t *player, ticcmd_t *cmd) // SRB2kart - unused.
{
return; // SRB2kart - what's a spindash?
if (player->pflags & PF_STASIS)
@ -3836,6 +3840,7 @@ static void P_DoSpinDash(player_t *player, ticcmd_t *cmd)
//if (onground && (player->pflags & PF_SPINNING) && !(player->panim == PA_ROLL))
// P_SetPlayerMobjState(player->mo, S_PLAY_ATK1);
}
*/
//
// P_DoJumpShield
@ -7404,10 +7409,9 @@ static void P_DoZoomTube(player_t *player)
// Kinda like P_DoZoomTube
// but a little different.
//
static void P_DoRopeHang(player_t *player)
/*
static void P_DoRopeHang(player_t *player) // SRB2kart - unused.
{
return; // SRB2kart - errr
/*
INT32 sequence;
fixed_t speed;
thinker_t *th;
@ -7553,8 +7557,8 @@ static void P_DoRopeHang(player_t *player)
CONS_Debug(DBG_GAMELOGIC, "Next waypoint not found!\n");
}
}
*/
}
*/
#if 0
//
@ -7645,7 +7649,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
P_KillMobj(mo->tracer, inflictor, source);
if (mo->flags & MF_BOSS || mo->type == MT_PLAYER) //don't OHKO bosses nor players!
P_DamageMobj(mo, inflictor, source, 1);
continue; // SRB2kart - P_Nuke is for magnet (for now), and doesn't hurt other players, only obstacles. // P_DamageMobj(mo, inflictor, source, 1);
else
P_DamageMobj(mo, inflictor, source, 1000);
}
@ -9092,7 +9096,7 @@ void P_PlayerThink(player_t *player)
mo2 = (mobj_t *)th;
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
|| mo2->type == MT_BLUEBALL))
|| mo2->type == MT_BLUEBALL || mo2->type == MT_RANDOMITEM))
continue;
if (P_AproxDistance(P_AproxDistance(mo2->x - x, mo2->y - y), mo2->z - z) > FixedMul(128*FRACUNIT, player->mo->scale))
@ -9367,7 +9371,7 @@ void P_PlayerThink(player_t *player)
void P_PlayerAfterThink(player_t *player)
{
ticcmd_t *cmd;
INT32 oldweapon = player->currentweapon;
//INT32 oldweapon = player->currentweapon; // SRB2kart - unused
camera_t *thiscam = NULL; // if not one of the displayed players, just don't bother
#ifdef PARANOIA

View file

@ -689,7 +689,8 @@ static inline void ST_drawRings(void)
ST_DrawNumFromHudWS(HUD_RINGSNUM, ringnum);
}
static void ST_drawLives(void)
/*
static void ST_drawLives(void) // SRB2kart - unused.
{
const INT32 v_splitflag = (splitscreen && stplyr == &players[displayplayer] ? V_SPLITSCREEN : 0);
@ -733,6 +734,7 @@ static void ST_drawLives(void)
V_DrawRightAlignedString(hudinfo[HUD_LIVESNUM].x, hudinfo[HUD_LIVESNUM].y + (v_splitflag ? -4 : 0),
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag, va("%d",stplyr->lives));
}
*/
static void ST_drawLevelTitle(void)
{
@ -970,7 +972,8 @@ static void ST_drawNightsRecords(void)
}
}
static void ST_drawNiGHTSHUD(void)
/*
static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
{
INT32 origamount;
INT32 minlink = 1;
@ -1144,7 +1147,7 @@ static void ST_drawNiGHTSHUD(void)
INT32 i;
total_ringcount = 0;
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] /*&& players[i].pflags & PF_NIGHTSMODE*/ && players[i].health)
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE && players[i].health)
total_ringcount += players[i].health - 1;
}
else
@ -1349,6 +1352,7 @@ static void ST_drawNiGHTSHUD(void)
if (nosshack)
splitscreen = true;
}
*/
static void ST_drawWeaponRing(powertype_t weapon, INT32 rwflag, INT32 wepflag, INT32 xoffs, patch_t *pat)
{
@ -1382,7 +1386,8 @@ static void ST_drawWeaponRing(powertype_t weapon, INT32 rwflag, INT32 wepflag, I
V_DrawScaledPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT|V_TRANSLUCENT, pat);
}
static void ST_drawMatchHUD(void)
/*
static void ST_drawMatchHUD(void) // SRB2kart - unused.
{
INT32 offset = (BASEVIDWIDTH / 2) - (NUM_WEAPONS * 10);
@ -1461,6 +1466,7 @@ static void ST_drawMatchHUD(void)
}
#endif
}
*/
static inline void ST_drawRaceHUD(void)
{
@ -1482,7 +1488,8 @@ static inline void ST_drawRaceHUD(void)
}
}
static void ST_drawTagHUD(void)
/*
static void ST_drawTagHUD(void) // SRB2kart - unused.
{
char pstime[33] = "";
char pstext[33] = "";
@ -1541,7 +1548,7 @@ static void ST_drawTagHUD(void)
}
}
static void ST_drawCTFHUD(void)
static void ST_drawCTFHUD(void) // SRB2kart - unused.
{
INT32 i;
UINT16 whichflag = 0;
@ -1589,6 +1596,7 @@ static void ST_drawCTFHUD(void)
}
}
}
*/
// Draws "Red Team", "Blue Team", or "Spectator" for team gametypes.
static inline void ST_drawTeamName(void)
@ -1601,7 +1609,8 @@ static inline void ST_drawTeamName(void)
V_DrawString(244, (splitscreen) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "SPECTATOR");
}
static void ST_drawSpecialStageHUD(void)
/*
static void ST_drawSpecialStageHUD(void) // SRB2kart - unused.
{
if (totalrings > 0)
ST_DrawNumFromHudWS(HUD_SS_TOTALRINGS, totalrings);
@ -1620,6 +1629,7 @@ static void ST_drawSpecialStageHUD(void)
else
ST_DrawPatchFromHud(HUD_TIMEUP, timeup);
}
*/
static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offset)
{
@ -1661,8 +1671,9 @@ static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offse
return interval;
}
/*
// Separated a few things to stop the SOUND EFFECTS BLARING UGH SHUT UP AAAA
static void ST_doHuntIconsAndSound(void)
static void ST_doHuntIconsAndSound(void) // SRB2kart - unused.
{
INT32 interval = 0, newinterval = 0;
@ -1687,7 +1698,7 @@ static void ST_doHuntIconsAndSound(void)
S_StartSound(NULL, sfx_emfind);
}
static void ST_doItemFinderIconsAndSound(void)
static void ST_doItemFinderIconsAndSound(void) // SRB2kart - unused.
{
INT32 emblems[16];
thinker_t *th;
@ -1746,6 +1757,7 @@ static void ST_doItemFinderIconsAndSound(void)
if (!(P_AutoPause() || paused) && interval > 0 && leveltime && leveltime % interval == 0)
S_StartSound(NULL, sfx_emfind);
}
*/
// Draw the status bar overlay, customisable: the user chooses which
// kind of information to overlay

View file

@ -1204,7 +1204,7 @@ void Y_StartIntermission(void)
usetile = !useinterpic;
// get special stage specific patches
/* if (!stagefailed && ALL7EMERALDS(emeralds))
if (!stagefailed && ALL7EMERALDS(emeralds))
{
data.spec.cemerald = W_CachePatchName("GOTEMALL", PU_STATIC);
data.spec.headx = 70;
@ -1216,8 +1216,8 @@ void Y_StartIntermission(void)
data.spec.cemerald = W_CachePatchName("CEMERALD", PU_STATIC);
data.spec.headx = 48;
data.spec.nowsuper = NULL;
} */
/*
}
// Super form stuff (normally blank)
data.spec.passed3[0] = '\0';
data.spec.passed4[0] = '\0';
@ -1658,12 +1658,14 @@ static void Y_SetRingBonus(player_t *player, y_bonus_t *bstruct)
//
// Y_SetLinkBonus
//
static void Y_SetLinkBonus(player_t *player, y_bonus_t *bstruct)
/*
static void Y_SetLinkBonus(player_t *player, y_bonus_t *bstruct) // SRB2kart - unused.
{
strncpy(bstruct->patch, "YB_LINK", sizeof(bstruct->patch));
bstruct->display = true;
bstruct->points = max(0, (player->maxlink - 1) * 100);
}
*/
//
// Y_SetGuardBonus