mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 07:12:03 +00:00
Merge remote-tracking branch 'public-gl/next' into 2122-version
This commit is contained in:
commit
a626660564
3 changed files with 45 additions and 27 deletions
|
@ -227,7 +227,6 @@ matrix:
|
|||
- compiler: clang-3.9
|
||||
- compiler: clang-4.0
|
||||
- compiler: clang-5.0
|
||||
- compiler: gcc-8
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
|
|
68
src/g_game.c
68
src/g_game.c
|
@ -1010,7 +1010,7 @@ static fixed_t angleturn[3] = {640, 1280, 320}; // + slow turn
|
|||
void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
||||
{
|
||||
boolean forcestrafe = false;
|
||||
INT32 tspeed, forward, side, axis, i;
|
||||
INT32 tspeed, forward, side, axis, altaxis, i;
|
||||
const INT32 speed = 1;
|
||||
// these ones used for multiple conditions
|
||||
boolean turnleft, turnright, mouseaiming, analogjoystickmove, gamepadjoystickmove, thisjoyaiming;
|
||||
|
@ -1125,9 +1125,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
|
||||
// forward with key or button
|
||||
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];
|
||||
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];
|
||||
|
||||
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)
|
||||
localaiming = 0;
|
||||
|
||||
if (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
|
||||
if (!(player->pflags & PF_NIGHTSMODE))
|
||||
{
|
||||
localaiming += KB_LOOKSPEED * screen_invert;
|
||||
keyboard_look = true;
|
||||
if (PLAYER1INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
|
||||
{
|
||||
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
|
||||
if (!cv_allowmlook.value)
|
||||
|
@ -1312,7 +1320,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
||||
{
|
||||
boolean forcestrafe = false;
|
||||
INT32 tspeed, forward, side, axis, i;
|
||||
INT32 tspeed, forward, side, axis, altaxis, i;
|
||||
const INT32 speed = 1;
|
||||
// these ones used for multiple conditions
|
||||
boolean turnleft, turnright, mouseaiming, analogjoystickmove, gamepadjoystickmove, thisjoyaiming;
|
||||
|
@ -1427,9 +1435,14 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
|||
|
||||
// forward with key or button
|
||||
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];
|
||||
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];
|
||||
|
||||
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)
|
||||
localaiming2 = 0;
|
||||
|
||||
if (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
|
||||
if (!(player->pflags & PF_NIGHTSMODE))
|
||||
{
|
||||
localaiming2 += KB_LOOKSPEED * screen_invert;
|
||||
keyboard_look = true;
|
||||
if (PLAYER2INPUTDOWN(gc_lookup) || (gamepadjoystickmove && axis < 0))
|
||||
{
|
||||
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
|
||||
if (!cv_allowmlook.value)
|
||||
|
|
|
@ -1126,6 +1126,9 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
// Get data for the column
|
||||
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
|
||||
// will (hopefully) put less strain on the stack.
|
||||
if (dc_numlights)
|
||||
|
|
Loading…
Reference in a new issue