mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge branch 'jug-noforcedhell' into 'next'
Remove Map Hell Force if all players random See merge request KartKrew/Kart-Public!275
This commit is contained in:
commit
da1dbac164
4 changed files with 37 additions and 53 deletions
|
@ -2393,11 +2393,11 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pencoremode, boolean r
|
||||||
|
|
||||||
void D_SetupVote(void)
|
void D_SetupVote(void)
|
||||||
{
|
{
|
||||||
UINT8 buf[6*2]; // five UINT16 maps (at twice the width of a UINT8), and two gametypes
|
UINT8 buf[5*2]; // four UINT16 maps (at twice the width of a UINT8), and two gametypes
|
||||||
UINT8 *p = buf;
|
UINT8 *p = buf;
|
||||||
INT32 i;
|
INT32 i;
|
||||||
UINT8 secondgt = G_SometimesGetDifferentGametype();
|
UINT8 secondgt = G_SometimesGetDifferentGametype();
|
||||||
INT16 votebuffer[3] = {-1,-1,-1};
|
INT16 votebuffer[4] = {-1,-1,-1,0};
|
||||||
|
|
||||||
if (cv_kartencore.value && G_RaceGametype())
|
if (cv_kartencore.value && G_RaceGametype())
|
||||||
WRITEUINT8(p, (gametype|0x80));
|
WRITEUINT8(p, (gametype|0x80));
|
||||||
|
@ -2406,7 +2406,7 @@ void D_SetupVote(void)
|
||||||
WRITEUINT8(p, secondgt);
|
WRITEUINT8(p, secondgt);
|
||||||
secondgt &= ~0x80;
|
secondgt &= ~0x80;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
UINT16 m;
|
UINT16 m;
|
||||||
if (i == 2) // sometimes a different gametype
|
if (i == 2) // sometimes a different gametype
|
||||||
|
@ -2469,9 +2469,6 @@ void D_PickVote(void)
|
||||||
if (numvotes > 0)
|
if (numvotes > 0)
|
||||||
{
|
{
|
||||||
WRITESINT8(p, temppicks[key]);
|
WRITESINT8(p, temppicks[key]);
|
||||||
if (force && templevels[key] == 3 && numvotes > 1)
|
|
||||||
WRITESINT8(p, 4);
|
|
||||||
else
|
|
||||||
WRITESINT8(p, templevels[key]);
|
WRITESINT8(p, templevels[key]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -5144,7 +5141,7 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
||||||
gt = (UINT8)READUINT8(*cp);
|
gt = (UINT8)READUINT8(*cp);
|
||||||
secondgt = (UINT8)READUINT8(*cp);
|
secondgt = (UINT8)READUINT8(*cp);
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
votelevels[i][0] = (UINT16)READUINT16(*cp);
|
votelevels[i][0] = (UINT16)READUINT16(*cp);
|
||||||
votelevels[i][1] = gt;
|
votelevels[i][1] = gt;
|
||||||
|
|
|
@ -482,7 +482,7 @@ extern boolean legitimateexit;
|
||||||
extern boolean comebackshowninfo;
|
extern boolean comebackshowninfo;
|
||||||
extern tic_t curlap, bestlap;
|
extern tic_t curlap, bestlap;
|
||||||
|
|
||||||
extern INT16 votelevels[5][2];
|
extern INT16 votelevels[4][2];
|
||||||
extern SINT8 votes[MAXPLAYERS];
|
extern SINT8 votes[MAXPLAYERS];
|
||||||
extern SINT8 pickedvote;
|
extern SINT8 pickedvote;
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ boolean franticitems; // Frantic items currently enabled?
|
||||||
boolean comeback; // Battle Mode's karma comeback is on/off
|
boolean comeback; // Battle Mode's karma comeback is on/off
|
||||||
|
|
||||||
// Voting system
|
// Voting system
|
||||||
INT16 votelevels[5][2]; // Levels that were rolled by the host
|
INT16 votelevels[4][2]; // Levels that were rolled by the host
|
||||||
SINT8 votes[MAXPLAYERS]; // Each player's vote
|
SINT8 votes[MAXPLAYERS]; // Each player's vote
|
||||||
SINT8 pickedvote; // What vote the host rolls
|
SINT8 pickedvote; // What vote the host rolls
|
||||||
|
|
||||||
|
|
|
@ -1219,9 +1219,9 @@ static void Y_VoteStops(SINT8 pick, SINT8 level)
|
||||||
{
|
{
|
||||||
nextmap = votelevels[level][0];
|
nextmap = votelevels[level][0];
|
||||||
|
|
||||||
if (level == 4)
|
//if (level == 4)
|
||||||
S_StartSound(NULL, sfx_noooo2); // gasp
|
// S_StartSound(NULL, sfx_noooo2); // gasp
|
||||||
else if (mapheaderinfo[nextmap] && (mapheaderinfo[nextmap]->menuflags & LF2_HIDEINMENU))
|
if (mapheaderinfo[nextmap] && (mapheaderinfo[nextmap]->menuflags & LF2_HIDEINMENU))
|
||||||
S_StartSound(NULL, sfx_noooo1); // this is bad
|
S_StartSound(NULL, sfx_noooo1); // this is bad
|
||||||
else if (netgame && P_IsLocalPlayer(&players[pick]))
|
else if (netgame && P_IsLocalPlayer(&players[pick]))
|
||||||
S_StartSound(NULL, sfx_yeeeah); // yeeeah!
|
S_StartSound(NULL, sfx_yeeeah); // yeeeah!
|
||||||
|
@ -1481,7 +1481,7 @@ void Y_StartVote(void)
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
votes[i] = -1;
|
votes[i] = -1;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
lumpnum_t lumpnum;
|
lumpnum_t lumpnum;
|
||||||
|
|
||||||
|
@ -1489,11 +1489,6 @@ void Y_StartVote(void)
|
||||||
levelinfo[i].encore = (votelevels[i][1] & 0x80);
|
levelinfo[i].encore = (votelevels[i][1] & 0x80);
|
||||||
votelevels[i][1] &= ~0x80;
|
votelevels[i][1] &= ~0x80;
|
||||||
|
|
||||||
// set up the str
|
|
||||||
if (i == 4)
|
|
||||||
levelinfo[i].str[0] = '\0';
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// set up the levelstring
|
// set up the levelstring
|
||||||
if (mapheaderinfo[votelevels[i][0]]->levelflags & LF_NOZONE || !mapheaderinfo[votelevels[i][0]]->zonttl[0])
|
if (mapheaderinfo[votelevels[i][0]]->levelflags & LF_NOZONE || !mapheaderinfo[votelevels[i][0]]->zonttl[0])
|
||||||
{
|
{
|
||||||
|
@ -1523,7 +1518,6 @@ void Y_StartVote(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
levelinfo[i].str[sizeof levelinfo[i].str - 1] = '\0';
|
levelinfo[i].str[sizeof levelinfo[i].str - 1] = '\0';
|
||||||
}
|
|
||||||
|
|
||||||
// set up the gtc and gts
|
// set up the gtc and gts
|
||||||
levelinfo[i].gtc = G_GetGametypeColor(votelevels[i][1]);
|
levelinfo[i].gtc = G_GetGametypeColor(votelevels[i][1]);
|
||||||
|
@ -1572,7 +1566,6 @@ static void Y_UnloadVoteData(void)
|
||||||
UNLOAD(randomlvl);
|
UNLOAD(randomlvl);
|
||||||
UNLOAD(rubyicon);
|
UNLOAD(rubyicon);
|
||||||
|
|
||||||
UNLOAD(levelinfo[4].pic);
|
|
||||||
UNLOAD(levelinfo[3].pic);
|
UNLOAD(levelinfo[3].pic);
|
||||||
UNLOAD(levelinfo[2].pic);
|
UNLOAD(levelinfo[2].pic);
|
||||||
UNLOAD(levelinfo[1].pic);
|
UNLOAD(levelinfo[1].pic);
|
||||||
|
@ -1610,12 +1603,6 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
|
||||||
if (votes[i] == -1 || endtype > 1) // Don't need to go on
|
if (votes[i] == -1 || endtype > 1) // Don't need to go on
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (level == 4)
|
|
||||||
{
|
|
||||||
votes[i] = 4;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (endtype == 2)
|
if (endtype == 2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1628,7 +1615,7 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
|
||||||
endtype = 2;
|
endtype = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (level == 4 || endtype == 1) // Only one unique vote, so just end it immediately.
|
if (endtype == 1) // Only one unique vote, so just end it immediately.
|
||||||
{
|
{
|
||||||
voteendtic = votetic + (5*TICRATE);
|
voteendtic = votetic + (5*TICRATE);
|
||||||
S_ChangeMusicInternal("voteeb", false);
|
S_ChangeMusicInternal("voteeb", false);
|
||||||
|
|
Loading…
Reference in a new issue