Reverted scoring back to what it was before, change order-of-operations to allow switcheroos from bombs.
This commit is contained in:
parent
e4c96fcd7f
commit
4a9c3618c3
22
src/k_kart.c
22
src/k_kart.c
|
@ -3764,10 +3764,7 @@ void K_CheckBalloons(void)
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT8 numingame = 0;
|
UINT8 numingame = 0;
|
||||||
SINT8 winnernum = -1;
|
SINT8 winnernum = -1;
|
||||||
|
INT32 winnerscoreadd = 0;
|
||||||
#if 0
|
|
||||||
return; // set to 1 to test comeback mechanics while alone
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!multiplayer)
|
if (!multiplayer)
|
||||||
return;
|
return;
|
||||||
|
@ -3787,21 +3784,24 @@ void K_CheckBalloons(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
numingame++;
|
numingame++;
|
||||||
|
winnerscoreadd += players[i].score;
|
||||||
|
|
||||||
if (players[i].kartstuff[k_balloon] <= 0) // if you don't have any balloons, you're probably not a winner
|
if (players[i].kartstuff[k_balloon] <= 0) // if you don't have any balloons, you're probably not a winner
|
||||||
continue;
|
continue;
|
||||||
else if (winnernum > -1) // TWO winners? that's dumb :V
|
else if (winnernum > -1) // TWO winners? that's dumb :V
|
||||||
return;
|
return;
|
||||||
|
|
||||||
winnernum = i;
|
winnernum = i;
|
||||||
|
winnerscoreadd -= players[i].score;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numingame <= 1)
|
/*if (numingame <= 1)
|
||||||
return;
|
return;*/
|
||||||
|
|
||||||
if (playeringame[winnernum])
|
if (winnernum > -1 && playeringame[winnernum])
|
||||||
{
|
{
|
||||||
players[winnernum].score += 1;
|
players[winnernum].score += winnerscoreadd;
|
||||||
CONS_Printf(M_GetText("%s recieved a point for winning!\n"), player_names[winnernum]);
|
CONS_Printf(M_GetText("%s recieved %d point%s for winning!\n"), player_names[winnernum], winnerscoreadd, (winnerscoreadd == 1 ? "" : "s"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -5176,7 +5176,7 @@ void K_drawKartHUD(void)
|
||||||
// This is handled by console/menu values
|
// This is handled by console/menu values
|
||||||
K_initKartHUD();
|
K_initKartHUD();
|
||||||
|
|
||||||
// Draw that fun first person HUD!
|
// Draw that fun first person HUD! Drawn ASAP so it looks more "real".
|
||||||
if ((stplyr == &players[displayplayer] && !camera.chase)
|
if ((stplyr == &players[displayplayer] && !camera.chase)
|
||||||
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|
||||||
|| ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
|| ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
||||||
|
@ -5187,7 +5187,7 @@ void K_drawKartHUD(void)
|
||||||
if (leveltime < 15 && stplyr == &players[displayplayer])
|
if (leveltime < 15 && stplyr == &players[displayplayer])
|
||||||
{
|
{
|
||||||
if (leveltime <= 5)
|
if (leveltime <= 5)
|
||||||
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first three frames, to hide SRB2's awful level load artifacts
|
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,120); // Pure white on first few frames, to hide SRB2's awful level load artifacts
|
||||||
else
|
else
|
||||||
V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there
|
V_DrawFadeScreen(120, 15-leveltime); // Then gradually fade out from there
|
||||||
}
|
}
|
||||||
|
|
|
@ -455,15 +455,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
boom->color = SKINCOLOR_RED;
|
boom->color = SKINCOLOR_RED;
|
||||||
S_StartSound(boom, special->info->attacksound);
|
S_StartSound(boom, special->info->attacksound);
|
||||||
|
|
||||||
K_ExplodePlayer(player, special->target);
|
|
||||||
|
|
||||||
special->target->player->kartstuff[k_comebackpoints] += 2;
|
special->target->player->kartstuff[k_comebackpoints] += 2;
|
||||||
if (netgame && cv_hazardlog.value)
|
if (netgame && cv_hazardlog.value)
|
||||||
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[special->target->player-players], player_names[player-players]);
|
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||||
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||||
K_StealBalloon(special->target->player, player, true);
|
K_StealBalloon(special->target->player, player, true);
|
||||||
|
|
||||||
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
|
|
||||||
|
K_ExplodePlayer(player, special->target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (special->target->player->kartstuff[k_comebackmode] == 1 && P_CanPickupItem(player, true))
|
else if (special->target->player->kartstuff[k_comebackmode] == 1 && P_CanPickupItem(player, true))
|
||||||
|
@ -471,16 +470,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
mobj_t *poof = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_EXPLODE);
|
mobj_t *poof = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_EXPLODE);
|
||||||
S_StartSound(poof, special->info->seesound);
|
S_StartSound(poof, special->info->seesound);
|
||||||
|
|
||||||
player->kartstuff[k_itemroulette] = 1;
|
|
||||||
player->kartstuff[k_roulettetype] = 1;
|
|
||||||
|
|
||||||
special->target->player->kartstuff[k_comebackmode] = 0;
|
special->target->player->kartstuff[k_comebackmode] = 0;
|
||||||
special->target->player->kartstuff[k_comebackpoints]++;
|
special->target->player->kartstuff[k_comebackpoints]++;
|
||||||
|
|
||||||
if (netgame && cv_hazardlog.value)
|
if (netgame && cv_hazardlog.value)
|
||||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
|
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||||
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||||
K_StealBalloon(special->target->player, player, true);
|
K_StealBalloon(special->target->player, player, true);
|
||||||
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
|
|
||||||
|
player->kartstuff[k_itemroulette] = 1;
|
||||||
|
player->kartstuff[k_roulettetype] = 1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
|
|
65
src/p_user.c
65
src/p_user.c
|
@ -1039,11 +1039,7 @@ void P_DoSuperTransformation(player_t *player, boolean giverings)
|
||||||
// Adds to the player's score
|
// Adds to the player's score
|
||||||
void P_AddPlayerScore(player_t *player, UINT32 amount)
|
void P_AddPlayerScore(player_t *player, UINT32 amount)
|
||||||
{
|
{
|
||||||
UINT32 oldscore;
|
//UINT32 oldscore;
|
||||||
|
|
||||||
#if 1
|
|
||||||
return; // Nope, still don't need this for Battle even
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (player->bot)
|
if (player->bot)
|
||||||
player = &players[consoleplayer];
|
player = &players[consoleplayer];
|
||||||
|
@ -1051,60 +1047,7 @@ void P_AddPlayerScore(player_t *player, UINT32 amount)
|
||||||
if (player->exiting) // srb2kart
|
if (player->exiting) // srb2kart
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// NiGHTS does it different!
|
//oldscore = player->score;
|
||||||
if (gamestate == GS_LEVEL && mapheaderinfo[gamemap-1]->typeoflevel & TOL_NIGHTS)
|
|
||||||
{
|
|
||||||
if ((netgame || multiplayer) && G_IsSpecialStage(gamemap))
|
|
||||||
{ // Pseudo-shared score for multiplayer special stages.
|
|
||||||
INT32 i;
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE)
|
|
||||||
{
|
|
||||||
oldscore = players[i].marescore;
|
|
||||||
|
|
||||||
// Don't go above MAXSCORE.
|
|
||||||
if (players[i].marescore + amount < MAXSCORE)
|
|
||||||
players[i].marescore += amount;
|
|
||||||
else
|
|
||||||
players[i].marescore = MAXSCORE;
|
|
||||||
|
|
||||||
// Continues are worthless in netgames.
|
|
||||||
// If that stops being the case uncomment this.
|
|
||||||
/* if (!ultimatemode && players[i].marescore > 50000
|
|
||||||
&& oldscore < 50000)
|
|
||||||
{
|
|
||||||
players[i].continues += 1;
|
|
||||||
players[i].gotcontinue = true;
|
|
||||||
if (P_IsLocalPlayer(player))
|
|
||||||
S_StartSound(NULL, sfx_flgcap);
|
|
||||||
} */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oldscore = player->marescore;
|
|
||||||
|
|
||||||
// Don't go above MAXSCORE.
|
|
||||||
if (player->marescore + amount < MAXSCORE)
|
|
||||||
player->marescore += amount;
|
|
||||||
else
|
|
||||||
player->marescore = MAXSCORE;
|
|
||||||
|
|
||||||
if (!ultimatemode && !(netgame || multiplayer) && G_IsSpecialStage(gamemap)
|
|
||||||
&& player->marescore >= 50000 && oldscore < 50000)
|
|
||||||
{
|
|
||||||
player->continues += 1;
|
|
||||||
player->gotcontinue = true;
|
|
||||||
if (P_IsLocalPlayer(player))
|
|
||||||
S_StartSound(NULL, sfx_flgcap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gametype == GT_COOP)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
oldscore = player->score;
|
|
||||||
|
|
||||||
// Don't go above MAXSCORE.
|
// Don't go above MAXSCORE.
|
||||||
if (player->score + amount < MAXSCORE)
|
if (player->score + amount < MAXSCORE)
|
||||||
|
@ -1113,11 +1056,11 @@ void P_AddPlayerScore(player_t *player, UINT32 amount)
|
||||||
player->score = MAXSCORE;
|
player->score = MAXSCORE;
|
||||||
|
|
||||||
// check for extra lives every 50000 pts
|
// check for extra lives every 50000 pts
|
||||||
if (!ultimatemode && !modeattacking && player->score > oldscore && player->score % 50000 < amount && (gametype == GT_COMPETITION || gametype == GT_COOP))
|
/*if (!ultimatemode && !modeattacking && player->score > oldscore && player->score % 50000 < amount && (gametype == GT_COMPETITION || gametype == GT_COOP))
|
||||||
{
|
{
|
||||||
P_GivePlayerLives(player, (player->score/50000) - (oldscore/50000));
|
P_GivePlayerLives(player, (player->score/50000) - (oldscore/50000));
|
||||||
P_PlayLivesJingle(player);
|
P_PlayLivesJingle(player);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// In team match, all awarded points are incremented to the team's running score.
|
// In team match, all awarded points are incremented to the team's running score.
|
||||||
if (gametype == GT_TEAMMATCH)
|
if (gametype == GT_TEAMMATCH)
|
||||||
|
|
Loading…
Reference in a new issue