Manually merge EDuke32 SVN commit 8605.

This commit is contained in:
Mitchell Richters 2020-03-18 10:23:03 +11:00 committed by Christoph Oelckers
parent a5612b1a02
commit 15a362f9ac
2 changed files with 22 additions and 9 deletions

View File

@ -1111,6 +1111,23 @@ static int P_Submerge(int, int, DukePlayer_t *, int, int);
static int P_Emerge(int, int, DukePlayer_t *, int, int);
static void P_FinishWaterChange(int, DukePlayer_t *, int, int, int);
static fix16_t P_GetQ16AngleDeltaForTic(DukePlayer_t const *pPlayer)
{
auto oldAngle = pPlayer->oq16ang;
auto newAngle = pPlayer->q16ang;
if (klabs(fix16_sub(oldAngle, newAngle)) < F16(1024))
return fix16_sub(newAngle, oldAngle);
if (newAngle > F16(1024))
newAngle = fix16_sub(newAngle, F16(2048));
if (oldAngle > F16(1024))
oldAngle = fix16_sub(oldAngle, F16(2048));
return fix16_sub(newAngle, oldAngle);
}
ACTOR_STATIC void G_MovePlayers(void)
{
int spriteNum = headspritestat[STAT_PLAYER];
@ -1164,6 +1181,11 @@ ACTOR_STATIC void G_MovePlayers(void)
if (G_HaveActor(sprite[spriteNum].picnum))
A_Execute(spriteNum, P_GetP(pSprite), otherPlayerDist);
pPlayer->q16angvel = P_GetQ16AngleDeltaForTic(pPlayer);
pPlayer->oq16ang = pPlayer->q16ang;
pPlayer->oq16horiz = pPlayer->q16horiz;
pPlayer->oq16horizoff = pPlayer->q16horizoff;
if (g_netServer || ud.multimode > 1)
{
if (sprite[g_player[otherp].ps->i].extra > 0)

View File

@ -7116,7 +7116,6 @@ static void P_Dead(int const playerNum, int const sectorLotag, int const floorZ,
}
Bmemcpy(&pPlayer->opos, &pPlayer->pos, sizeof(vec3_t));
pPlayer->oq16ang = pPlayer->q16ang;
pPlayer->opyoff = pPlayer->pyoff;
pPlayer->q16horiz = F16(100);
@ -7772,9 +7771,6 @@ void P_ProcessInput(int playerNum)
actor[pPlayer->i].floorz = floorZ;
actor[pPlayer->i].ceilingz = ceilZ;
pPlayer->oq16horiz = pPlayer->q16horiz;
pPlayer->oq16horizoff = pPlayer->q16horizoff;
if (highZhit >= 0 && (highZhit&49152) == 49152)
{
highZhit &= (MAXSPRITES-1);
@ -8053,7 +8049,6 @@ check_enemy_sprite:
pPlayer->bobpos.y = pPlayer->pos.y;
pPlayer->opos.z = pPlayer->pos.z;
pPlayer->opyoff = pPlayer->pyoff;
pPlayer->oq16ang = pPlayer->q16ang;
if (pPlayer->one_eighty_count < 0)
{
@ -9124,9 +9119,6 @@ void P_DHProcessInput(int playerNum)
actor[pPlayer->i].floorz = floorZ;
actor[pPlayer->i].ceilingz = ceilZ;
pPlayer->oq16horiz = pPlayer->q16horiz;
pPlayer->oq16horizoff = pPlayer->q16horizoff;
if (pPlayer->q16horizoff > 0)
{
pPlayer->q16horizoff -= ((pPlayer->q16horizoff >> 3) + fix16_one);
@ -9282,7 +9274,6 @@ void P_DHProcessInput(int playerNum)
pPlayer->bobpos.y = pPlayer->pos.y;
pPlayer->opos.z = pPlayer->pos.z;
pPlayer->opyoff = pPlayer->pyoff;
pPlayer->oq16ang = pPlayer->q16ang;
if (pPlayer->one_eighty_count < 0)
{