Get rid of Lakitu and the specific things for the final lap sound

Lakitu is completely commented out currently and we will be able to re-add it back later
Final lap sounds do some wacky stuff with the variables of the local player only, and also block out the music just to restart it at the same speed currently, changed it to just be the lap sound, we can use a new sound for it later
This commit is contained in:
Sryder 2017-03-08 21:41:52 +00:00
parent 9e1783d092
commit 6dc9339ab0
7 changed files with 2 additions and 215 deletions

View File

@ -257,7 +257,6 @@ typedef enum
k_driftboost, // Boost you get from drifting
k_boostcharge, // Charge-up for boosting at the start of the race, or when Lakitu drops you
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
k_lakitu, // > 0 = Lakitu fishing, < 0 = Lakitu lap counter (was "player->airtime") // NOTE: Check for ->lakitu, replace with this
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
k_itemclose, // Used to animate the item window closing (was "pw_psychic")

View File

@ -2192,7 +2192,6 @@ void G_PlayerReborn(INT32 player)
// SRB2kart
INT32 starpostwp;
INT32 lakitu;
score = players[player].score;
lives = players[player].lives;
@ -2246,7 +2245,6 @@ void G_PlayerReborn(INT32 player)
// SRB2kart
starpostwp = players[player].kartstuff[k_starpostwp];
lakitu = players[player].kartstuff[k_lakitu];
p = &players[player];
memset(p, 0, sizeof (*p));
@ -2301,7 +2299,6 @@ void G_PlayerReborn(INT32 player)
// SRB2kart
p->kartstuff[k_starpostwp] = starpostwp;
p->kartstuff[k_lakitu] = lakitu;
// Don't do anything immediately
p->pflags |= PF_USEDOWN;
@ -3694,7 +3691,6 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
{
players[i].lives = cv_startinglives.value;
players[i].continues = 0;
players[i].kartstuff[k_lakitu] = 0; // SRB2kart
}
else if (pultmode)
{
@ -3705,7 +3701,6 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
{
players[i].lives = 3;
players[i].continues = 1;
players[i].kartstuff[k_lakitu] = 0; // SRB2kart
}
// The latter two should clear by themselves, but just in case

View File

@ -952,10 +952,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->kartstuff[k_sounds])
player->kartstuff[k_sounds]--;
// Restores music automatically for the final lap, among other things
if (player->kartstuff[k_sounds] <= 4 && player->kartstuff[k_sounds] > 0 && P_IsLocalPlayer(player))
P_RestoreMusic(player);
// ???
/*
if (player->kartstuff[k_jmp] > 1 && onground)
@ -2500,37 +2496,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
player->mo->momy = 0;
}
///////////////////////
//LAKITU START SIGNAL//
///////////////////////
// Spawn at the beggining of the level,
// not joiner-friendly.
/*
if (leveltime == 3)
{
mobj_t *mo;
angle_t newangle;
fixed_t newx;
fixed_t newy;
fixed_t newz;
newangle = player->mo->angle;
newx = player->mo->x + P_ReturnThrustX(player->mo, newangle, 128*FRACUNIT);
newy = player->mo->y + P_ReturnThrustY(player->mo, newangle, 128*FRACUNIT);
if (player->mo->eflags & MFE_VERTICALFLIP)
newz = player->mo->z - 320*FRACUNIT;
else
newz = player->mo->z + 256*FRACUNIT;
mo = P_SpawnMobj(newx, newy, newz, MT_LAKITU);
if (mo)
{
if (player->mo->eflags & MFE_VERTICALFLIP)
mo->eflags |= MFE_VERTICALFLIP;
P_SetTarget(&mo->target, player->mo);
}
}
*/
// Play the stop light's sounds
if ((leveltime == (TICRATE-4)*2) || (leveltime == (TICRATE-2)*3))
S_StartSound(NULL, sfx_lkt1);
@ -2562,124 +2527,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
player->kartstuff[k_boostcharge] = 0;
}
//////////////////
//FISHING LAKITU//
//////////////////
// If you die and respawn in Mario Kart, have Lakitu fish you back in.
/*
if (player->airtime == 60)
{
mobj_t *mo;
angle_t newangle;
fixed_t newx;
fixed_t newy;
fixed_t newz;
newangle = player->mo->angle;
newx = player->mo->x + P_ReturnThrustX(player->mo, newangle, 0);
newy = player->mo->y + P_ReturnThrustY(player->mo, newangle, 0);
if (player->mo->eflags & MFE_VERTICALFLIP)
newz = player->mo->z - 128*FRACUNIT;
else
newz = player->mo->z + 64*FRACUNIT;
mo = P_SpawnMobj(newx, newy, newz, MT_LAKITU);
if (mo)
{
if (player->mo->eflags & MFE_VERTICALFLIP)
mo->eflags |= MFE_VERTICALFLIP;
mo->angle = newangle+ANGLE_180;
P_SetTarget(&mo->target, player->mo);
P_SetMobjState(mo, S_LAKITUFSH1);
}
}
*/
if (player->kartstuff[k_lakitu] > 3)
{
player->kartstuff[k_lakitu]--;
player->mo->momz = 0;
player->powers[pw_flashing] = 2;
player->powers[pw_nocontrol] = 2;
if (leveltime % 15 == 0)
S_StartSound(player->mo, sfx_lkt3);
}
// That's enough pointless fishing for now.
if (player->kartstuff[k_lakitu] > 0 && player->kartstuff[k_lakitu] <= 3)
{
if (!onground)
{
player->powers[pw_flashing] = 2;
// If you tried to boost while in the air,
// you lose your chance of boosting at all.
if (cmd->buttons & BT_ACCELERATE)
{
player->powers[pw_flashing] = 0;
player->kartstuff[k_lakitu] = 0;
}
}
else
{
player->kartstuff[k_lakitu]--;
// Quick! You only have three tics to boost!
if (cmd->buttons & BT_ACCELERATE)
{
K_DoMushroom(player, false);
}
}
}
//////////////////
//NEW LAP LAKITU//
//////////////////
/*
if (player->kartstuff[k_lakitu] == -60)
{
mobj_t *mo;
angle_t newangle;
fixed_t newx;
fixed_t newy;
fixed_t newz;
newangle = player->mo->angle;
newx = player->mo->x + P_ReturnThrustX(player->mo, newangle, 128*FRACUNIT);
newy = player->mo->y + P_ReturnThrustY(player->mo, newangle, 128*FRACUNIT);
if (player->mo->eflags & MFE_VERTICALFLIP)
newz = player->mo->z - 320*FRACUNIT;
else
newz = player->mo->z + 256*FRACUNIT;
mo = P_SpawnMobj(newx, newy, newz, MT_LAKITU);
if (mo)
{
P_SetTarget(&mo->target, player->mo);
if (player->mo->eflags & MFE_VERTICALFLIP)
mo->eflags |= MFE_VERTICALFLIP;
if (player->laps < (unsigned)(cv_numlaps.value - 1))
{
if (player->laps == 1)
P_SetMobjState(mo, S_LAKITULAP1A);
if (player->laps == 2)
P_SetMobjState(mo, S_LAKITULAP2A);
if (player->laps == 3)
P_SetMobjState(mo, S_LAKITULAP3A);
if (player->laps == 4)
P_SetMobjState(mo, S_LAKITULAP4A);
if (player->laps == 5)
P_SetMobjState(mo, S_LAKITULAP5A);
if (player->laps == 6)
P_SetMobjState(mo, S_LAKITULAP6A);
if (player->laps == 7)
P_SetMobjState(mo, S_LAKITULAP7A);
if (player->laps == 8)
P_SetMobjState(mo, S_LAKITULAP8A);
}
else if (player->laps == (unsigned)(cv_numlaps.value - 1))
P_SetMobjState(mo, S_LAKITULAPFA);
}
}
*/
if (player->kartstuff[k_lakitu] < 0)
player->kartstuff[k_lakitu]++;
}
//}

View File

@ -7351,40 +7351,6 @@ void P_MobjThinker(mobj_t *mobj)
}
break;
//{ SRB2kart Items
/*case MT_LAKITU:
if (!mobj->target->player)
{
P_SetMobjState(mobj, S_DISS);
return;
}
if (mobj->target->player && !splitscreen
&& !(mobj->target->player == &players[displayplayer])
&& !(mobj->state >= &states[S_LAKITUFSH1] && mobj->state <= &states[S_LAKITUFSH2]))
mobj->flags2 |= MF2_DONTDRAW;
else
mobj->flags2 &= ~MF2_DONTDRAW;
if ((mobj->state >= &states[S_LAKITUSL1] && mobj->state <= &states[S_LAKITUSL12])
|| (mobj->state >= &states[S_LAKITULAP1A] && mobj->state <= &states[S_LAKITUFLG8]))
{
const fixed_t radius = FIXEDSCALE(128, mobj->target->scale)*FRACUNIT;
mobj->angle = (mobj->target->angle);
P_UnsetThingPosition(mobj);
{
const angle_t fa = mobj->angle>>ANGLETOFINESHIFT;
mobj->x = mobj->target->x + FixedMul(FINECOSINE(fa),radius);
mobj->y = mobj->target->y + FixedMul(FINESINE(fa),radius);
if (mobj->state >= &states[S_LAKITUFLG1] && mobj->state <= &states[S_LAKITUFLG8])
{
if (mobj->target->eflags & MFE_VERTICALFLIP)
mobj->z = mobj->target->z - 128*FRACUNIT;
else
mobj->z = mobj->target->z + 64*FRACUNIT;
}
P_SetThingPosition(mobj);
}
}
break;*/
case MT_POKEY:
if (mobj->threshold)
{
@ -9072,8 +9038,7 @@ void P_MovePlayerToStarpost(INT32 playernum)
sector->ceilingheight;
//z = p->starpostz << FRACBITS;
z = (p->starpostz + 128) << FRACBITS; // SRB2kart - Spawns off the ground for Lakitu
z = p->starpostz << FRACBITS;
if (z < floor)
z = floor;
else if (z > ceiling - mobjinfo[MT_PLAYER].height)

View File

@ -4089,21 +4089,9 @@ DoneSection2:
if (P_IsLocalPlayer(player))
{
if (player->laps < (UINT8)(cv_numlaps.value - 1))
{
S_StartSound(NULL, sfx_mlap);
player->kartstuff[k_lakitu] = -64;
}
else if (player->laps == (UINT8)(cv_numlaps.value - 1))
{
player->kartstuff[k_lakitu] = -64;
if (!splitscreen || (splitscreen && !players[consoleplayer].exiting
&& !players[secondarydisplayplayer].exiting))
{
player->kartstuff[k_sounds] = 130;
S_ChangeMusicInternal("finlap", false);
}
}
S_StartSound(NULL, sfx_mlap);
}
//
//player->starpostangle = player->starposttime = player->starpostnum = 0;

View File

@ -1126,9 +1126,6 @@ void P_RestoreMusic(player_t *player)
return;
S_SpeedMusic(1.0f);
if (player->kartstuff[k_sounds] >= 5) // SRB2kart - Don't reset music during the final lap roll!
return;
// SRB2kart - We have some different powers than vanilla, some of which tweak the music.
if (!player->exiting)
{

View File

@ -1890,10 +1890,6 @@ static void Y_CalculateTournamentPoints(void)
players[data.match.num[data.match.numplayers]].score += data.match.increase[data.match.numplayers];
data.match.scores[data.match.numplayers] = players[data.match.num[data.match.numplayers]].score;
//players[data.match.num[data.match.numplayers]].newfloorz = 0;
players[data.match.num[data.match.numplayers]].kartstuff[k_lakitu] = 0;
//players[data.match.num[data.match.numplayers]].airtime = 0;
data.match.numplayers++;
}
}