Merge remote-tracking branch 'public-gl/next' into 2122-version

This commit is contained in:
mazmazz 2018-12-25 00:19:42 -05:00
commit a626660564
3 changed files with 45 additions and 27 deletions

View file

@ -227,7 +227,6 @@ matrix:
- compiler: clang-3.9 - compiler: clang-3.9
- compiler: clang-4.0 - compiler: clang-4.0
- compiler: clang-5.0 - compiler: clang-5.0
- compiler: gcc-8
cache: cache:
apt: true apt: true

View file

@ -1010,7 +1010,7 @@ static fixed_t angleturn[3] = {640, 1280, 320}; // + slow turn
void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics) void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
{ {
boolean forcestrafe = false; boolean forcestrafe = false;
INT32 tspeed, forward, side, axis, i; INT32 tspeed, forward, side, axis, altaxis, i;
const INT32 speed = 1; const INT32 speed = 1;
// these ones used for multiple conditions // these ones used for multiple conditions
boolean turnleft, turnright, mouseaiming, analogjoystickmove, gamepadjoystickmove, thisjoyaiming; boolean turnleft, turnright, mouseaiming, analogjoystickmove, gamepadjoystickmove, thisjoyaiming;
@ -1125,9 +1125,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
// forward with key or button // forward with key or button
axis = JoyAxis(AXISMOVE); axis = JoyAxis(AXISMOVE);
if (PLAYER1INPUTDOWN(gc_forward) || (gamepadjoystickmove && axis < 0)) altaxis = JoyAxis(AXISLOOK);
if (PLAYER1INPUTDOWN(gc_forward) || (gamepadjoystickmove && axis < 0)
|| ((player->pflags & PF_NIGHTSMODE)
&& (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && altaxis < 0))))
forward = forwardmove[speed]; forward = forwardmove[speed];
if (PLAYER1INPUTDOWN(gc_backward) || (gamepadjoystickmove && axis > 0)) if (PLAYER1INPUTDOWN(gc_backward) || (gamepadjoystickmove && axis > 0)
|| ((player->pflags & PF_NIGHTSMODE)
&& (PLAYER1INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && altaxis > 0))))
forward -= forwardmove[speed]; forward -= forwardmove[speed];
if (analogjoystickmove && axis != 0) if (analogjoystickmove && axis != 0)
@ -1231,18 +1236,21 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
if (!keyboard_look && cv_lookaxis.value == 0 && !joyaiming && !mouseaiming) if (!keyboard_look && cv_lookaxis.value == 0 && !joyaiming && !mouseaiming)
localaiming = 0; localaiming = 0;
if (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0)) if (!(player->pflags & PF_NIGHTSMODE))
{ {
localaiming += KB_LOOKSPEED * screen_invert; if (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
keyboard_look = true; {
localaiming += KB_LOOKSPEED * screen_invert;
keyboard_look = true;
}
else if (PLAYER1INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && axis > 0))
{
localaiming -= KB_LOOKSPEED * screen_invert;
keyboard_look = true;
}
else if (PLAYER1INPUTDOWN(gc_centerview))
localaiming = 0;
} }
else if (PLAYER1INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && axis > 0))
{
localaiming -= KB_LOOKSPEED * screen_invert;
keyboard_look = true;
}
else if (PLAYER1INPUTDOWN(gc_centerview))
localaiming = 0;
// accept no mlook for network games // accept no mlook for network games
if (!cv_allowmlook.value) if (!cv_allowmlook.value)
@ -1312,7 +1320,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics) void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
{ {
boolean forcestrafe = false; boolean forcestrafe = false;
INT32 tspeed, forward, side, axis, i; INT32 tspeed, forward, side, axis, altaxis, i;
const INT32 speed = 1; const INT32 speed = 1;
// these ones used for multiple conditions // these ones used for multiple conditions
boolean turnleft, turnright, mouseaiming, analogjoystickmove, gamepadjoystickmove, thisjoyaiming; boolean turnleft, turnright, mouseaiming, analogjoystickmove, gamepadjoystickmove, thisjoyaiming;
@ -1427,9 +1435,14 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
// forward with key or button // forward with key or button
axis = Joy2Axis(AXISMOVE); axis = Joy2Axis(AXISMOVE);
if (PLAYER2INPUTDOWN(gc_forward) || (gamepadjoystickmove && axis < 0)) altaxis = Joy2Axis(AXISLOOK);
if (PLAYER2INPUTDOWN(gc_forward) || (gamepadjoystickmove && axis < 0)
|| ((player->pflags & PF_NIGHTSMODE)
&& (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && altaxis < 0))))
forward = forwardmove[speed]; forward = forwardmove[speed];
if (PLAYER2INPUTDOWN(gc_backward) || (gamepadjoystickmove && axis > 0)) if (PLAYER2INPUTDOWN(gc_backward) || (gamepadjoystickmove && axis > 0)
|| ((player->pflags & PF_NIGHTSMODE)
&& (PLAYER2INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && altaxis > 0))))
forward -= forwardmove[speed]; forward -= forwardmove[speed];
if (analogjoystickmove && axis != 0) if (analogjoystickmove && axis != 0)
@ -1530,18 +1543,21 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
if (!keyboard_look && cv_lookaxis2.value == 0 && !joyaiming && !mouseaiming) if (!keyboard_look && cv_lookaxis2.value == 0 && !joyaiming && !mouseaiming)
localaiming2 = 0; localaiming2 = 0;
if (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0)) if (!(player->pflags & PF_NIGHTSMODE))
{ {
localaiming2 += KB_LOOKSPEED * screen_invert; if (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
keyboard_look = true; {
localaiming2 += KB_LOOKSPEED * screen_invert;
keyboard_look = true;
}
else if (PLAYER2INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && axis > 0))
{
localaiming2 -= KB_LOOKSPEED * screen_invert;
keyboard_look = true;
}
else if (PLAYER2INPUTDOWN(gc_centerview))
localaiming2 = 0;
} }
else if (PLAYER2INPUTDOWN(gc_lookdown) || (gamepadjoystickmove && axis > 0))
{
localaiming2 -= KB_LOOKSPEED * screen_invert;
keyboard_look = true;
}
else if (PLAYER2INPUTDOWN(gc_centerview))
localaiming2 = 0;
// accept no mlook for network games // accept no mlook for network games
if (!cv_allowmlook.value) if (!cv_allowmlook.value)

View file

@ -1126,6 +1126,9 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
// Get data for the column // Get data for the column
col = (column_t *)((UINT8 *)R_GetColumn(texnum,maskedtexturecol[dc_x]) - 3); col = (column_t *)((UINT8 *)R_GetColumn(texnum,maskedtexturecol[dc_x]) - 3);
// guess what I just fixed? -monster psychic cat
dc_colormap = colormaps;
// SoM: New code does not rely on R_DrawColumnShadowed_8 which // SoM: New code does not rely on R_DrawColumnShadowed_8 which
// will (hopefully) put less strain on the stack. // will (hopefully) put less strain on the stack.
if (dc_numlights) if (dc_numlights)