mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Peer-to-peer multiplayer with > 2 players now works, some other minor changes
git-svn-id: https://svn.eduke32.com/eduke32@129 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
301a6eefd5
commit
7d8048482a
9 changed files with 24 additions and 25 deletions
|
@ -60,7 +60,7 @@ char buildkeys[NUMBUILDKEYS] =
|
|||
{
|
||||
0xc8,0xd0,0xcb,0xcd,0x2a,0x9d,0x1d,0x39,
|
||||
0x1e,0x2c,0xd1,0xc9,0x33,0x34,
|
||||
0x9c,0x1c,0xd,0xc,0xf,0x45
|
||||
0x9c,0x1c,0xd,0xc,0xf,0x29
|
||||
};
|
||||
|
||||
long posx, posy, posz, horiz = 100;
|
||||
|
|
|
@ -176,7 +176,7 @@ if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i);
|
|||
if (readconfig(fp, "key2dzoomin", val, VL) > 0) keys[16] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "key2dzoomout", val, VL) > 0) keys[17] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keychat", val, VL) > 0) keys[18] = Bstrtol(val, NULL, 16);
|
||||
if (readconfig(fp, "keyconsole", val, VL) > 0) { keys[19] = Bstrtol(val, NULL, 16); OSD_CaptureKey(keys[19]); }
|
||||
if (readconfig(fp, "keyconsole", val, VL) > 0) { keys[19] = Bstrtol(val, NULL, 16); OSD_CaptureKey(keys[19]); }
|
||||
|
||||
if (readconfig(fp, "mousesensitivity", val, VL) > 0) msens = Bstrtod(val, NULL);
|
||||
|
||||
|
|
|
@ -361,7 +361,8 @@ if ((danetmode == 255) && (daindex)) { numplayers = 2; danetmode = 0; } //an IP
|
|||
for(i=0;i<numplayers-1;i++) connectpoint2[i] = i+1;
|
||||
connectpoint2[numplayers-1] = -1;
|
||||
|
||||
return (((!danetmode) && (numplayers >= 2)) || (numplayers == 2));
|
||||
// return (((!danetmode) && (numplayers >= 2)) || (numplayers == 2));
|
||||
return (numplayers >= 2);
|
||||
}
|
||||
|
||||
long initmultiplayerscycle(void)
|
||||
|
|
|
@ -121,7 +121,7 @@ char inputdevices=0;
|
|||
char quitevent=0, appactive=1;
|
||||
long mousex=0, mousey=0, mouseb=0;
|
||||
static unsigned long mousewheel[2] = { 0,0 };
|
||||
#define MouseWheelFakePressTime (100) // getticks() is a 1000Hz timer, and the button press is faked for 100ms
|
||||
#define MouseWheelFakePressTime (25) // getticks() is a 1000Hz timer, and the button press is faked for 100ms
|
||||
long *joyaxis = NULL, joyb=0, *joyhat = NULL;
|
||||
char joyisgamepad=0, joynumaxes=0, joynumbuttons=0, joynumhats=0;
|
||||
|
||||
|
|
|
@ -1344,7 +1344,7 @@ void orderweaponnum(short ind,long x,long y,char ha)
|
|||
rotatesprite(sbarx(x-7),sbary(y),sbarsc(65536L),0,THREEBYFIVE+ind+1,ha-10,7,10,0,0,xdim-1,ydim-1);
|
||||
rotatesprite(sbarx(x-3),sbary(y),sbarsc(65536L),0,THREEBYFIVE+10,ha,0,10,0,0,xdim-1,ydim-1);
|
||||
|
||||
minitextshade(x+1,y-4,"ORDER",26,6,2+8+16+128 + 256);
|
||||
minitextshade(x+1,y-4,"ORDER",26,6,2+8+16);
|
||||
}
|
||||
|
||||
void weaponnum(short ind,long x,long y,long num1, long num2,char ha)
|
||||
|
@ -9615,7 +9615,7 @@ FAKEHORIZONLY:
|
|||
}
|
||||
|
||||
if(p->aim_mode)
|
||||
myhoriz += syn->horz>>1;
|
||||
myhoriz += syn->horz/2;
|
||||
else
|
||||
{
|
||||
if( myhoriz > 95 && myhoriz < 105) myhoriz = 100;
|
||||
|
|
|
@ -54,7 +54,7 @@ char keys[NUMBUILDKEYS] =
|
|||
{
|
||||
0xc8,0xd0,0xcb,0xcd,0x2a,0x9d,0x1d,0x39,
|
||||
0x1e,0x2c,0xd1,0xc9,0x47,0x49,
|
||||
0x9c,0x1c,0xd,0xc,0xf,0x45
|
||||
0x9c,0x1c,0xd,0xc,0xf,0x29
|
||||
};
|
||||
|
||||
int nextvoxid = 0;
|
||||
|
|
|
@ -2870,16 +2870,16 @@ cheat_for_port_credits:
|
|||
|
||||
{
|
||||
short sense;
|
||||
sense = CONTROL_GetMouseSensitivity();
|
||||
barsm(248,128,&sense,1,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7));
|
||||
CONTROL_SetMouseSensitivity( sense );
|
||||
sense = CONTROL_GetMouseSensitivity()-1;
|
||||
barsm(248,128,&sense,2,x==(MAXMOUSEBUTTONS-2)*2+2,MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2),PHX(-7));
|
||||
CONTROL_SetMouseSensitivity( sense+1 );
|
||||
}
|
||||
|
||||
if (!ud.mouseaiming) modval(0,1,(int *)&myaimmode,1,probey == (MAXMOUSEBUTTONS-2)*2+2+1);
|
||||
modval(0,1,(int *)&ud.mouseflip,1,probey == (MAXMOUSEBUTTONS-2)*2+2+2);
|
||||
|
||||
gametextpal(240,122+9, myaimmode && !ud.mouseaiming ? "On" : "Off", !ud.mouseaiming?MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+1):15, 0);
|
||||
gametextpal(240,122+9+9, ud.mouseflip ? "On" : "Off", MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2), 0);
|
||||
gametextpal(240,122+9+9, !ud.mouseflip ? "On" : "Off", MENUHIGHLIGHT((MAXMOUSEBUTTONS-2)*2+2+2), 0);
|
||||
|
||||
if (probey < (MAXMOUSEBUTTONS-2)*2+2) {
|
||||
gametext(160,164,"UP/DOWN = SELECT BUTTON",0,2+8+16);
|
||||
|
|
|
@ -262,25 +262,25 @@ static int osdcmd_vidmode(const osdfuncparm_t *parm)
|
|||
static int osdcmd_setstatusbarscale(const osdfuncparm_t *parm)
|
||||
{
|
||||
if (parm->numparms == 0) {
|
||||
OSD_Printf("setstatusbarscale: scale is %d%%\n", ud.statusbarscale);
|
||||
return OSDCMD_OK;
|
||||
OSD_Printf("\"cl_statusbarscale\" is \"%d\"\n", ud.statusbarscale);
|
||||
return OSDCMD_SHOWHELP;
|
||||
} else if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
setstatusbarscale(Batol(parm->parms[0]));
|
||||
OSD_Printf("setstatusbarscale: new scale is %d%%\n", ud.statusbarscale);
|
||||
OSD_Printf("cl_statusbarscale %d\n", ud.statusbarscale);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_setstatusbarmode(const osdfuncparm_t *parm)
|
||||
{
|
||||
if (parm->numparms == 0) {
|
||||
OSD_Printf("cl_statusbarmode: \"%d\"\n", ud.statusbarmode);
|
||||
return OSDCMD_OK;
|
||||
OSD_Printf("\"cl_statusbarmode\" is \"%d\"\n", ud.statusbarmode);
|
||||
return OSDCMD_SHOWHELP;
|
||||
} else if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
ud.statusbarmode = Batol(parm->parms[0]);
|
||||
vscrn();
|
||||
OSD_Printf("cl_statusbarmode: \"%d\"\n", ud.statusbarmode);
|
||||
OSD_Printf("cl_statusbarmode %d\n", ud.statusbarmode);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
@ -503,8 +503,8 @@ int osdcmd_cvar_set(const osdfuncparm_t *parm)
|
|||
int osdcmd_sensitivity(const osdfuncparm_t *parm)
|
||||
{
|
||||
if (parm->numparms != 1) {
|
||||
OSD_Printf("sensitivity %d\n",CONTROL_GetMouseSensitivity());
|
||||
return OSDCMD_OK;
|
||||
OSD_Printf("\"sensitivity\" is \"%d\"\n",CONTROL_GetMouseSensitivity());
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
CONTROL_SetMouseSensitivity(atoi(parm->parms[0]));
|
||||
OSD_Printf("sensitivity %d\n",CONTROL_GetMouseSensitivity());
|
||||
|
@ -514,12 +514,12 @@ int osdcmd_sensitivity(const osdfuncparm_t *parm)
|
|||
int osdcmd_gamma(const osdfuncparm_t *parm)
|
||||
{
|
||||
if (parm->numparms != 1) {
|
||||
OSD_Printf("gamma %d\n",ud.brightness>>2);
|
||||
return OSDCMD_OK;
|
||||
OSD_Printf("\"gamma\" \"%d\"\n",ud.brightness>>2);
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
ud.brightness = atoi(parm->parms[0])<<2;
|
||||
setbrightness(ud.brightness>>2,&ps[screenpeek].palette[0],0);
|
||||
OSD_Printf("\n");
|
||||
OSD_Printf("gamma %d\n",ud.brightness>>2);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -2832,8 +2832,6 @@ void getinput(short snum)
|
|||
horiz = -(info.dz+lastinfo.dz)/(314-128);
|
||||
else horiz = (info.dz+lastinfo.dz)/(314-128);
|
||||
|
||||
if(horiz > -1)
|
||||
horiz++;
|
||||
lastinfo.dz = (lastinfo.dz+info.dz) % (314-128);
|
||||
info.dz = 0;
|
||||
} else {
|
||||
|
@ -4390,7 +4388,7 @@ HORIZONLY:
|
|||
}
|
||||
|
||||
if(p->aim_mode)
|
||||
p->horiz += sync[snum].horz>>1;
|
||||
p->horiz += sync[snum].horz/2;
|
||||
else
|
||||
{
|
||||
if( p->horiz > 95 && p->horiz < 105) p->horiz = 100;
|
||||
|
|
Loading…
Reference in a new issue