diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 2c102494c..c9a2de0e2 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -459,7 +459,7 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); } if (playerquitflag[i] == 0) continue; l = packbuf[k++]; - l |= (long)packbuf[k++] << 8; + l += (long)(packbuf[k++]<<8); if (i == myconnectindex) { j += ((l&1)<<1)+(l&2)+((l&4)>>2)+((l&8)>>3)+((l&16)>>4)+((l&32)>>5)+((l&64)>>6)+((l&128)>>7)+((l&256)>>8)+((l&512)>>9)+((l&1024)>>10)+((l&2048)>>11); continue; } @@ -505,7 +505,7 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); } break; case 1: //[1] (receive slave sync buffer) - j = 3; k = packbuf[1] + ((long)packbuf[2] << 8); + j = 3; k = packbuf[1] + (long)(packbuf[2]<<8); osyn = (input *)&inputfifo[(movefifoend[other]-1)&(MOVEFIFOSIZ-1)][0]; nsyn = (input *)&inputfifo[(movefifoend[other])&(MOVEFIFOSIZ-1)][0]; @@ -695,7 +695,8 @@ if( !(ps[myconnectindex].gm&MODE_GAME) ) { OSD_DispatchQueued(); } copybufbyte(&osyn[other],&nsyn[other],sizeof(input)); k = packbuf[j++]; - k |= (long)packbuf[j++] << 8; + k += (long)(packbuf[j++]<<8); + if (k&1) nsyn[other].fvel = packbuf[j]+((short)packbuf[j+1]<<8), j += 2; if (k&2) nsyn[other].svel = packbuf[j]+((short)packbuf[j+1]<<8), j += 2; if (k&4) nsyn[other].avel = (signed char)packbuf[j++]; @@ -7593,11 +7594,18 @@ void checkcommandline(int argc,char **argv) if(argc > 1) { + int keepaddr = 0; + while(i < argc) { c = argv[i]; if (((*c == '/') || (*c == '-')) && (!firstnet)) { + if (!Bstrcasecmp(c+1,"keepaddr")) { + keepaddr = 1; + i++; + continue; + } if (!Bstrcasecmp(c+1,"rmnet")) { if (argc > i+1) @@ -7613,47 +7621,49 @@ void checkcommandline(int argc,char **argv) CommandNet = 0; - for(j=0;j