banishing hell map forcing

# Conflicts:
#	src/d_netcmd.c
#	src/y_inter.c
This commit is contained in:
JugadorXEI 2022-03-30 15:25:35 +02:00 committed by toaster
parent 8931522627
commit f17f6b7525
4 changed files with 39 additions and 54 deletions

View file

@ -2433,11 +2433,11 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pencoremode, boolean r
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;
INT32 i;
UINT8 secondgt = G_SometimesGetDifferentGametype();
INT16 votebuffer[4] = {-1,-1,-1, 0};
INT16 votebuffer[4] = {-1,-1,-1,0};
if ((cv_kartencore.value == 1) && (gametyperules & GTR_CIRCUIT))
WRITEUINT8(p, (gametype|0x80));
@ -2446,7 +2446,7 @@ void D_SetupVote(void)
WRITEUINT8(p, secondgt);
secondgt &= ~0x80;
for (i = 0; i < 5; i++)
for (i = 0; i < 4; i++)
{
UINT16 m;
if (i == 2) // sometimes a different gametype
@ -2508,10 +2508,7 @@ void D_PickVote(void)
if (numvotes > 0)
{
WRITESINT8(p, temppicks[key]);
if (force && templevels[key] == 3 && numvotes > 1)
WRITESINT8(p, 4);
else
WRITESINT8(p, templevels[key]);
WRITESINT8(p, templevels[key]);
}
else
{
@ -4883,7 +4880,7 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
gt = (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][1] = gt;

View file

@ -720,7 +720,7 @@ extern boolean legitimateexit;
extern boolean comebackshowninfo;
extern tic_t curlap, bestlap;
extern INT16 votelevels[5][2];
extern INT16 votelevels[4][2];
extern SINT8 votes[MAXPLAYERS];
extern SINT8 pickedvote;

View file

@ -311,7 +311,7 @@ boolean franticitems; // Frantic items currently enabled?
boolean comeback; // Battle Mode's karma comeback is on/off
// 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 pickedvote; // What vote the host rolls

View file

@ -1338,9 +1338,9 @@ static void Y_VoteStops(SINT8 pick, SINT8 level)
{
nextmap = votelevels[level][0];
if (level == 4)
S_StartSound(NULL, sfx_noooo2); // gasp
else if (mapheaderinfo[nextmap] && (mapheaderinfo[nextmap]->menuflags & LF2_HIDEINMENU))
//if (level == 4)
// S_StartSound(NULL, sfx_noooo2); // gasp
if (mapheaderinfo[nextmap] && (mapheaderinfo[nextmap]->menuflags & LF2_HIDEINMENU))
S_StartSound(NULL, sfx_noooo1); // this is bad
else if (netgame && P_IsLocalPlayer(&players[pick]))
S_StartSound(NULL, sfx_yeeeah); // yeeeah!
@ -1625,7 +1625,7 @@ void Y_StartVote(void)
for (i = 0; i < MAXPLAYERS; i++)
votes[i] = -1;
for (i = 0; i < 5; i++)
for (i = 0; i < 4; i++)
{
lumpnum_t lumpnum;
@ -1633,42 +1633,36 @@ void Y_StartVote(void)
levelinfo[i].encore = (votelevels[i][1] & 0x80);
votelevels[i][1] &= ~0x80;
// set up the str
if (i == 4)
levelinfo[i].str[0] = '\0';
// set up the levelstring
if (mapheaderinfo[votelevels[i][0]]->levelflags & LF_NOZONE || !mapheaderinfo[votelevels[i][0]]->zonttl[0])
{
if (mapheaderinfo[votelevels[i][0]]->actnum > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %d",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->actnum);
else
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s",
mapheaderinfo[votelevels[i][0]]->lvlttl);
}
else
{
// set up the levelstring
if (mapheaderinfo[votelevels[i][0]]->levelflags & LF_NOZONE || !mapheaderinfo[votelevels[i][0]]->zonttl[0])
{
if (mapheaderinfo[votelevels[i][0]]->actnum > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %d",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->actnum);
else
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s",
mapheaderinfo[votelevels[i][0]]->lvlttl);
}
if (mapheaderinfo[votelevels[i][0]]->actnum > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %s %d",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl, mapheaderinfo[votelevels[i][0]]->actnum);
else
{
if (mapheaderinfo[votelevels[i][0]]->actnum > 0)
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %s %d",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl, mapheaderinfo[votelevels[i][0]]->actnum);
else
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %s",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl);
}
levelinfo[i].str[sizeof levelinfo[i].str - 1] = '\0';
snprintf(levelinfo[i].str,
sizeof levelinfo[i].str,
"%s %s",
mapheaderinfo[votelevels[i][0]]->lvlttl, mapheaderinfo[votelevels[i][0]]->zonttl);
}
levelinfo[i].str[sizeof levelinfo[i].str - 1] = '\0';
// set up the gtc and gts
levelinfo[i].gtc = G_GetGametypeColor(votelevels[i][1]);
if (i == 2 && votelevels[i][1] != votelevels[0][1])
@ -1719,7 +1713,7 @@ static void Y_UnloadVoteData(void)
UNLOAD(rubyicon);
// to prevent double frees...
for (i = 0; i < 5; i++)
for (i = 0; i < 4; i++)
{
// I went to all the trouble of doing this,
// but literally nowhere else frees level pics.
@ -1729,7 +1723,7 @@ static void Y_UnloadVoteData(void)
if (!levelinfo[i].pic)
continue;
for (j = i+1; j < 5; j++)
for (j = i+1; j < 4; j++)
{
if (levelinfo[j].pic == levelinfo[i].pic)
levelinfo[j].pic = NULL;
@ -1772,12 +1766,6 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
if (votes[i] == -1 || endtype > 1) // Don't need to go on
continue;
if (level == 4)
{
votes[i] = 4;
continue;
}
if (endtype == 2)
continue;
@ -1790,7 +1778,7 @@ void Y_SetupVoteFinish(SINT8 pick, SINT8 level)
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);
S_ChangeMusicInternal("voteeb", false);