Fix for a problem with the automatic color selection setting for player color and add some additional informational text to the screen when someone has called a vote.

git-svn-id: https://svn.eduke32.com/eduke32@273 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-08-21 07:43:45 +00:00
parent 511a6517cb
commit 827eb34b95
2 changed files with 28 additions and 10 deletions

View file

@ -76,6 +76,7 @@ static int netparamcount = 0;
static char **netparam = NULL;
int votes[MAXPLAYERS], gotvote[MAXPLAYERS], voting = -1;
int vote_map, vote_episode;
int recfilep,totalreccnt;
char debug_on = 0,actor_tog = 0,*rtsptr,memorycheckoveride=0;
@ -533,6 +534,8 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); }
case 1: // call map vote
voting = packbuf[2];
vote_episode = packbuf[3];
vote_map = packbuf[4];
Bsprintf(tempbuf,"%s HAS CALLED A VOTE TO CHANGE MAP TO %s (E%dL%d)",ud.user_name[packbuf[2]],level_names[packbuf[3]*11 + packbuf[4]],packbuf[3]+1,packbuf[4]+1);
adduserquote(tempbuf);
Bsprintf(tempbuf,"PRESS F1 TO VOTE YES, F2 TO VOTE NO");
@ -2098,8 +2101,16 @@ void tics(void)
j=(TICRATE*AVERAGEFRAMES)/(i-frameval[framecnt]);
if (ud.tickrate && !(ps[myconnectindex].gm&MODE_MENU))
{
int k = 1;
if(ud.screen_size != 0 && GTFLAGS(GAMETYPE_FLAG_FRAGBAR))
{
k += 8;
if(ud.multimode > 4)
k += 8;
}
Bsprintf(b,"%ld",j>0?j:0);
minitext(320-strlen(b)*4,ud.screen_size!=0?(ud.multimode>1&&ud.multimode<5?9:(ud.multimode>4?17:1)):1,b,(TICRATE*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
minitext(320-strlen(b)*4,k,b,(TICRATE*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
}
framerate = j;
frameval[framecnt] = i;
@ -6836,8 +6847,7 @@ FOUNDCHEAT:
sprite[ps[myconnectindex].i].hitag = 0;
sprite[ps[myconnectindex].i].lotag = 0;
sprite[ps[myconnectindex].i].pal =
ps[myconnectindex].palookup;
sprite[ps[myconnectindex].i].pal = ps[myconnectindex].palookup;
FTA(17,&ps[myconnectindex]);
}
@ -8853,7 +8863,6 @@ void updatenames(void)
ps[myconnectindex].auto_aim = AutoAim;
ps[myconnectindex].weaponswitch = ud.weaponswitch;
ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color;
j = ps[myconnectindex].team;
ps[myconnectindex].team = ud.pteam[myconnectindex] = ud.team;
@ -9272,7 +9281,10 @@ MAIN_LOOP_RESTART:
case 1: k = 21; break;
}
ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = k;
} else ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color;
} else {
if(ud.color) ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color;
else ps[myconnectindex].palookup = ud.pcolor[myconnectindex];
}
ud.warp_on = 0;
KB_KeyDown[sc_Pause] = 0; // JBF: I hate the pause key
@ -9352,7 +9364,13 @@ MAIN_LOOP_RESTART:
displayrest(i);
if(gotvote[myconnectindex] == 0 && voting != -1 && voting != myconnectindex)
gametext(160,60,"PRESS F1 TO VOTE YES, F2 TO VOTE NO",0,2+8+16);
{
Bsprintf(tempbuf,"%s HAS CALLED A VOTE FOR MAP",ud.user_name[voting]);
gametext(160,40,tempbuf,0,2+8+16);
Bsprintf(tempbuf,"%s (E%dL%d)",level_names[vote_episode*11 + vote_map],vote_episode+1,vote_map+1);
gametext(160,48,tempbuf,0,2+8+16);
gametext(160,70,"PRESS F1 TO VOTE YES, F2 TO VOTE NO",0,2+8+16);
}
// if( KB_KeyPressed(sc_F) )
// {

View file

@ -1237,11 +1237,11 @@ void resetpspritevars(char g)
k=0;
}
}
s->pal = ps[j].palookup = which_palookup++;
ud.pcolor[j] = s->pal = ps[j].palookup = which_palookup++;
if( which_palookup >= 17 )
which_palookup = 9;
}
else ps[j].palookup = s->pal;
else ud.pcolor[j] = ps[j].palookup = s->pal;
}
else
{