mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Dummy out wanted system
- Remove WANTED hud item - Person in 1st place is the bonus points giver - Sort players by Emeralds > Bumpers > Points
This commit is contained in:
parent
0f492f4300
commit
4a9a438270
6 changed files with 33 additions and 17 deletions
|
|
@ -2992,9 +2992,7 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (K_IsPlayerWanted(&players[playernum]))
|
K_CalculateBattleWanted();
|
||||||
K_CalculateBattleWanted();
|
|
||||||
|
|
||||||
LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting
|
LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting
|
||||||
|
|
||||||
// don't look through someone's view who isn't there
|
// don't look through someone's view who isn't there
|
||||||
|
|
|
||||||
|
|
@ -3469,8 +3469,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
if (gametyperules & GTR_BUMPERS) // SRB2kart
|
if (gametyperules & GTR_BUMPERS) // SRB2kart
|
||||||
{
|
{
|
||||||
players[playernum].marescore = 0;
|
players[playernum].marescore = 0;
|
||||||
if (K_IsPlayerWanted(&players[playernum]))
|
K_CalculateBattleWanted();
|
||||||
K_CalculateBattleWanted();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
K_PlayerForfeit(playernum, true);
|
K_PlayerForfeit(playernum, true);
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ INT32 K_StartingBumperCount(void)
|
||||||
|
|
||||||
boolean K_IsPlayerWanted(player_t *player)
|
boolean K_IsPlayerWanted(player_t *player)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
return (player->kartstuff[k_position] == 1);
|
||||||
|
#else
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
if (!(gametyperules & GTR_WANTED))
|
if (!(gametyperules & GTR_WANTED))
|
||||||
|
|
@ -54,6 +57,7 @@ boolean K_IsPlayerWanted(player_t *player)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_CalculateBattleWanted(void)
|
void K_CalculateBattleWanted(void)
|
||||||
|
|
@ -63,7 +67,9 @@ void K_CalculateBattleWanted(void)
|
||||||
UINT8 ties = 0, nextcamppos = 0;
|
UINT8 ties = 0, nextcamppos = 0;
|
||||||
UINT8 i, j;
|
UINT8 i, j;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (!(gametyperules & GTR_WANTED))
|
if (!(gametyperules & GTR_WANTED))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
memset(battlewanted, -1, sizeof (battlewanted));
|
memset(battlewanted, -1, sizeof (battlewanted));
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,7 @@ boolean K_OrbinautJawzCollide(mobj_t *t1, mobj_t *t2)
|
||||||
|
|
||||||
if (t2->player)
|
if (t2->player)
|
||||||
{
|
{
|
||||||
if (t2->player->powers[pw_flashing]
|
if (t2->player->powers[pw_flashing] && (t1->type == MT_ORBINAUT_SHIELD || t1->type == MT_JAWZ_SHIELD))
|
||||||
&& !(t1->type == MT_ORBINAUT || t1->type == MT_JAWZ || t1->type == MT_JAWZ_DUD))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (t2->player->kartstuff[k_hyudorotimer])
|
if (t2->player->kartstuff[k_hyudorotimer])
|
||||||
|
|
|
||||||
|
|
@ -2143,6 +2143,9 @@ static void K_drawKartWanted(void)
|
||||||
UINT8 *colormap = NULL;
|
UINT8 *colormap = NULL;
|
||||||
INT32 basex = 0, basey = 0;
|
INT32 basex = 0, basey = 0;
|
||||||
|
|
||||||
|
if (!splitscreen)
|
||||||
|
return;
|
||||||
|
|
||||||
if (stplyr != &players[displayplayers[0]])
|
if (stplyr != &players[displayplayers[0]])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -4118,6 +4121,6 @@ void K_drawKartHUD(void)
|
||||||
|
|
||||||
if (gametype == GT_BATTLE)
|
if (gametype == GT_BATTLE)
|
||||||
{
|
{
|
||||||
V_DrawString(8, 8, V_SPLITSCREEN|V_SNAPTOTOP|V_SNAPTOLEFT, va("Emeralds: %d / 7", K_NumEmeralds(stplyr)));
|
V_DrawRightAlignedString(BASEVIDWIDTH - 10, BASEVIDHEIGHT - 18, V_SPLITSCREEN|V_SNAPTOBOTTOM|V_SNAPTORIGHT, va("Emeralds: %d / 7", K_NumEmeralds(stplyr)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
src/k_kart.c
29
src/k_kart.c
|
|
@ -2454,9 +2454,7 @@ void K_RemoveBumper(player_t *player, mobj_t *inflictor, mobj_t *source, UINT8 a
|
||||||
}
|
}
|
||||||
|
|
||||||
player->bumpers -= amount;
|
player->bumpers -= amount;
|
||||||
|
K_CalculateBattleWanted();
|
||||||
if (K_IsPlayerWanted(player))
|
|
||||||
K_CalculateBattleWanted();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->bumpers <= 0)
|
if (player->bumpers <= 0)
|
||||||
|
|
@ -6793,7 +6791,7 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
if (!playeringame[i] || players[i].spectator || !players[i].mo)
|
if (!playeringame[i] || players[i].spectator || !players[i].mo)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (gametype == GT_RACE)
|
if (gametyperules & GTR_CIRCUIT)
|
||||||
{
|
{
|
||||||
if (player->exiting) // End of match standings
|
if (player->exiting) // End of match standings
|
||||||
{
|
{
|
||||||
|
|
@ -6812,7 +6810,7 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gametype == GT_BATTLE)
|
else
|
||||||
{
|
{
|
||||||
if (player->exiting) // End of match standings
|
if (player->exiting) // End of match standings
|
||||||
{
|
{
|
||||||
|
|
@ -6822,11 +6820,24 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// I have less points than but the same bumpers as this player OR
|
if (K_NumEmeralds(&players[i]) > K_NumEmeralds(player))
|
||||||
// I have less bumpers than this player
|
{
|
||||||
if ((players[i].bumpers == player->bumpers && players[i].marescore > player->marescore)
|
|
||||||
|| (players[i].bumpers > player->bumpers))
|
|
||||||
position++;
|
position++;
|
||||||
|
}
|
||||||
|
else if (players[i].bumpers > player->bumpers)
|
||||||
|
{
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
else if (players[i].marescore > player->marescore)
|
||||||
|
{
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else if (players[i].kartstuff[k_wanted] > player->kartstuff[k_wanted])
|
||||||
|
{
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue