diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index c446ea011..176d42505 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -4524,7 +4524,7 @@ DETONATEB: { /* addweapon(&ps[p],HANDBOMB_WEAPON); */ if (!(ps[p].weaponswitch & 1)) addweaponnoswitch(&ps[p],HANDBOMB_WEAPON); - else addweapon( &ps[p],HANDBOMB_WEAPON); + else addweapon( &ps[p],HANDBOMB_WEAPON); } if( sprite[s->owner].picnum != APLAYER ) diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 7182f7c01..b48e2ab20 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -591,7 +591,7 @@ void CONFIG_ReadSetup( void ) SCRIPT_GetNumber( scripthandle, "Misc", "DemoCams",&ud.democams); SCRIPT_GetNumber( scripthandle, "Misc", "ShowFPS",&ud.tickrate); SCRIPT_GetNumber( scripthandle, "Misc", "Color",&ud.color); - ud.pcolor[0] = ud.color; + ps[0].palookup = ud.pcolor[0] = ud.color; dummy = useprecache; SCRIPT_GetNumber( scripthandle, "Misc", "UsePrecache",&dummy); useprecache = dummy != 0; if(ud.wchoice[0][0] == 0 && ud.wchoice[0][1] == 0) { diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 4a6aae5c2..4c20f796f 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1582,9 +1582,9 @@ void displayfragbar(void) for(i=connecthead;i>=0;i=connectpoint2[i]) { - minitext(21+(73*(i&3)),2+((i&28)<<1),&ud.user_name[i][0],sprite[ps[i].i].pal,2+8+16); + minitext(21+(73*(i&3)),2+((i&28)<<1),&ud.user_name[i][0],/*sprite[ps[i].i].pal*/ps[i].palookup,2+8+16); Bsprintf(tempbuf,"%d",ps[i].frag-ps[i].fraggedself); - minitext(17+50+(73*(i&3)),2+((i&28)<<1),tempbuf,sprite[ps[i].i].pal,2+8+16); + minitext(17+50+(73*(i&3)),2+((i&28)<<1),tempbuf,/*sprite[ps[i].i].pal*/ps[i].palookup,2+8+16); } } @@ -8627,7 +8627,7 @@ char opendemoread(char which_demo) // 0 = mine if (kread(recfilep,(int32 *)&i,sizeof(int32)) != sizeof(int32)) goto corrupt; if(ver == BYTEVERSION) { - if (kread(recfilep,(char *)boardfilename,sizeof(boardfilename)) != sizeof(boardfilename)) goto corrupt; + if (kread(recfilep,(char *)boardfilename,sizeof(boardfilename)) != sizeof(boardfilename)) goto corrupt; } else if (kread(recfilep,(char *)boardfilename,128) != 128) goto corrupt; if( boardfilename[0] != 0 ) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 22f02e465..6e7660a60 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -600,80 +600,80 @@ void menus(void) if (current_menu == 20002) { x = probe(46,50,20,4); switch(x) { - case -1: - cmenu(202); - probey = 3; - break; + case -1: + cmenu(202); + probey = 3; + break; - case 0: - strcpy(buf, myname); - inputloc = strlen(buf); - current_menu = 20003; + case 0: + strcpy(buf, myname); + inputloc = strlen(buf); + current_menu = 20003; - KB_ClearKeyDown(sc_Enter); - KB_ClearKeyDown(sc_kpad_Enter); - KB_FlushKeyboardQueue(); - break; + KB_ClearKeyDown(sc_Enter); + KB_ClearKeyDown(sc_kpad_Enter); + KB_FlushKeyboardQueue(); + break; - case 2: - AutoAim = (AutoAim == 2) ? 0 : AutoAim+1; - goto player_menu_update; - break; + case 2: + AutoAim = (AutoAim == 2) ? 0 : AutoAim+1; + goto player_menu_update; + break; - case 3: - ud.weaponswitch = (ud.weaponswitch == 3) ? 0 : ud.weaponswitch+1; - goto player_menu_update; - break; + case 3: + ud.weaponswitch = (ud.weaponswitch == 3) ? 0 : ud.weaponswitch+1; + goto player_menu_update; + break; - case 4: + case 4: player_menu_update: - if(ud.multimode > 1) + if(ud.multimode > 1) + { + // send update + for(l=0;myname[l];l++) + ud.user_name[myconnectindex][l] = Btoupper(myname[l]); + + buf[0] = 6; + buf[1] = myconnectindex; + buf[2] = BYTEVERSION; + l = 3; + + //null terminated player name to send + for(i=0;myname[i];i++) buf[l++] = Btoupper(myname[i]); + buf[l++] = 0; + + for(i=0;i<10;i++) { - // send update - for(l=0;myname[l];l++) - ud.user_name[myconnectindex][l] = Btoupper(myname[l]); - - buf[0] = 6; - buf[1] = myconnectindex; - buf[2] = BYTEVERSION; - l = 3; - - //null terminated player name to send - for(i=0;myname[i];i++) buf[l++] = Btoupper(myname[i]); - buf[l++] = 0; - - for(i=0;i<10;i++) - { - ud.wchoice[myconnectindex][i] = ud.wchoice[0][i]; - buf[l++] = (char)ud.wchoice[0][i]; - } - - buf[l++] = ps[myconnectindex].aim_mode = ud.mouseaiming; - buf[l++] = ps[myconnectindex].auto_aim = AutoAim; - buf[l++] = ps[myconnectindex].weaponswitch = ud.weaponswitch; - - buf[l++] = ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color; - if(sprite[ps[myconnectindex].i].picnum == APLAYER) - sprite[ps[myconnectindex].i].pal = ud.color; - - for(i=connecthead;i>=0;i=connectpoint2[i]) - { - if (i != myconnectindex) sendpacket(i,&buf[0],l); - if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master - } + ud.wchoice[myconnectindex][i] = ud.wchoice[0][i]; + buf[l++] = (char)ud.wchoice[0][i]; } - else - { - ps[myconnectindex].aim_mode = ud.mouseaiming; - ps[myconnectindex].auto_aim = AutoAim; - ps[myconnectindex].weaponswitch = ud.weaponswitch; - ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color; - if(sprite[ps[myconnectindex].i].picnum == APLAYER) - sprite[ps[myconnectindex].i].pal = ud.color; - } - break; + buf[l++] = ps[myconnectindex].aim_mode = ud.mouseaiming; + buf[l++] = ps[myconnectindex].auto_aim = AutoAim; + buf[l++] = ps[myconnectindex].weaponswitch = ud.weaponswitch; + + buf[l++] = ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color; + if(sprite[ps[myconnectindex].i].picnum == APLAYER) + sprite[ps[myconnectindex].i].pal = ud.color; + + for(i=connecthead;i>=0;i=connectpoint2[i]) + { + if (i != myconnectindex) sendpacket(i,&buf[0],l); + if ((!networkmode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master + } } + else + { + ps[myconnectindex].aim_mode = ud.mouseaiming; + ps[myconnectindex].auto_aim = AutoAim; + ps[myconnectindex].weaponswitch = ud.weaponswitch; + + ps[myconnectindex].palookup = ud.pcolor[myconnectindex] = ud.color; + if(sprite[ps[myconnectindex].i].picnum == APLAYER) + sprite[ps[myconnectindex].i].pal = ud.color; + } + break; + } } else { x = strget(200,50-9,buf,12,0); if (x) { @@ -693,7 +693,7 @@ player_menu_update: menutext(40,50,0,0,"NAME"); menutext(40,50+20,0,0,"COLOR"); - { + { int ud_color,aaim,ud_weaponswitch; ud_color = ud.color; @@ -703,11 +703,11 @@ player_menu_update: modval(0,2,(int *)&AutoAim,1,probey==2); modval(0,3,(int *)&ud.weaponswitch,1,probey==3); - { - int i, disallowed[] = { 1, 2, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 22 }; + { + int i, disallowed[] = { 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 22 }; for(i=0;i<(signed)(sizeof(disallowed)/sizeof(disallowed[0]));i++) { - if(ud.color == disallowed[i]) { + if(ud.color == disallowed[i]) { if(ud.color > ud_color) ud.color++; else ud.color--; @@ -715,7 +715,7 @@ player_menu_update: } } if(ud_color != ud.color || aaim != AutoAim || ud_weaponswitch != ud.weaponswitch) - goto player_menu_update; + goto player_menu_update; } } rotatesprite((280)<<16,(35+(tilesizy[APLAYER]>>1))<<16,49152L,0,1426,0,ud.color,10,0,0,xdim-1,ydim-1); @@ -724,8 +724,8 @@ player_menu_update: if (current_menu == 20002) { gametext(200,50-9,myname,0,2+8+16); } - { char *s[] = { "Auto","","","Blue","","","","","","","Dk red","Green","Gray","Dk gray","Dk green","Brown", - "Dk blue","","","","","Red","","Yellow","","" }; + { char *s[] = { "Auto","","","","","","","","","Blue","Dk red","Green","Gray","Dk gray","Dk green","Brown", + "Dk blue","","","","","Red","","Yellow","","" }; gametext(200,50+20-9,s[ud.color],0,2+8+16); } { char *s[] = { "Off", "Full", "Hitscan" }; gametext(200,50+20+20-9,s[AutoAim],0,2+8+16); } diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 44c98e138..89ac33f9a 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1221,7 +1221,7 @@ void resetpspritevars(char g) int k; for(k=0;k= 17 ) which_palookup = 9;