Manually merge EDuke32 SVN commit 8551.

This commit is contained in:
Mitchell Richters 2020-03-18 09:24:27 +11:00 committed by Christoph Oelckers
parent 61135e2635
commit 84c518a067
2 changed files with 461 additions and 328 deletions

View File

@ -1123,11 +1123,8 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
omypos.z + mulscale16(mypos.z - omypos.z, smoothRatio) }; omypos.z + mulscale16(mypos.z - omypos.z, smoothRatio) };
CAMERA(pos) = camVect; CAMERA(pos) = camVect;
CAMERA(q16ang) = omyang CAMERA(q16ang) = myang + fix16_from_int(pPlayer->look_ang);
+ mulscale16(((myang + F16(1024) - omyang) & 0x7FFFFFF) - F16(1024), smoothRatio) CAMERA(q16horiz) = myhoriz + myhorizoff;
+ fix16_from_int(pPlayer->look_ang);
CAMERA(q16horiz) = omyhoriz + omyhorizoff
+ mulscale16((myhoriz + myhorizoff - omyhoriz - omyhorizoff), smoothRatio);
CAMERA(sect) = mycursectnum; CAMERA(sect) = mycursectnum;
} }
else else
@ -1137,11 +1134,8 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
pPlayer->opos.z + mulscale16(pPlayer->pos.z - pPlayer->opos.z, smoothRatio) }; pPlayer->opos.z + mulscale16(pPlayer->pos.z - pPlayer->opos.z, smoothRatio) };
CAMERA(pos) = camVect; CAMERA(pos) = camVect;
CAMERA(q16ang) = pPlayer->oq16ang CAMERA(q16ang) = pPlayer->q16ang + fix16_from_int(pPlayer->look_ang);
+ mulscale16(((pPlayer->q16ang + F16(1024) - pPlayer->oq16ang) & 0x7FFFFFF) - F16(1024), smoothRatio) CAMERA(q16horiz) = pPlayer->q16horiz + pPlayer->q16horizoff;
+ fix16_from_int(pPlayer->look_ang);
CAMERA(q16horiz) = pPlayer->oq16horiz + pPlayer->oq16horizoff
+ mulscale16((pPlayer->q16horiz + pPlayer->q16horizoff - pPlayer->oq16horiz - pPlayer->oq16horizoff), smoothRatio);
} }
if (cl_viewbob) if (cl_viewbob)
@ -7428,7 +7422,6 @@ MAIN_LOOP_RESTART:
frameJustDrawn = false; frameJustDrawn = false;
#ifdef NETCODE_DISABLE
if (RRRA && g_player[myconnectindex].ps->on_motorcycle) if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
P_GetInputMotorcycle(myconnectindex); P_GetInputMotorcycle(myconnectindex);
else if (RRRA && g_player[myconnectindex].ps->on_boat) else if (RRRA && g_player[myconnectindex].ps->on_boat)
@ -7436,14 +7429,25 @@ MAIN_LOOP_RESTART:
else else
P_GetInput(myconnectindex); P_GetInput(myconnectindex);
inputfifo[g_player[myconnectindex].movefifoend&(MOVEFIFOSIZ-1)][myconnectindex] = localInput; // this is where we fill the input_t struct that is actually processed by P_ProcessInput()
auto const pPlayer = g_player[myconnectindex].ps;
int16_t const q16ang = fix16_to_int(pPlayer->q16ang);
auto & input = inputfifo[g_player[myconnectindex].movefifoend&(MOVEFIFOSIZ-1)][myconnectindex];
input = localInput;
input.fvel = mulscale9(localInput.fvel, sintable[(q16ang + 2560) & 2047]) +
mulscale9(localInput.svel, sintable[(q16ang + 2048) & 2047]) +
pPlayer->fric.x;
input.svel = mulscale9(localInput.fvel, sintable[(q16ang + 2048) & 2047]) +
mulscale9(localInput.svel, sintable[(q16ang + 1536) & 2047]) +
pPlayer->fric.y;
localInput = {};
g_player[myconnectindex].movefifoend++; g_player[myconnectindex].movefifoend++;
#endif
do do
{ {
if (ready2send == 0) break; if (ready2send == 0) break;
Net_GetInput();
ototalclock += TICSPERFRAME; ototalclock += TICSPERFRAME;
@ -7490,6 +7494,13 @@ MAIN_LOOP_RESTART:
} }
else */if (G_FPSLimit()) else */if (G_FPSLimit())
{ {
if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
P_GetInputMotorcycle(myconnectindex);
else if (RRRA && g_player[myconnectindex].ps->on_boat)
P_GetInputBoat(myconnectindex);
else
P_GetInput(myconnectindex);
int const smoothRatio = calc_smoothratio(totalclock, ototalclock); int const smoothRatio = calc_smoothratio(totalclock, ototalclock);
G_DrawRooms(screenpeek, smoothRatio); G_DrawRooms(screenpeek, smoothRatio);

File diff suppressed because it is too large Load Diff