From 65428a2d1adda81ccb2b956c8ad1f917e97b7097 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 5 Aug 2020 17:43:06 +1000 Subject: [PATCH] - revert ea98978ae7a3c5ab2ca3841584f1e4686180bd78 and baed75ff8a91ac73e05204299101c6975ea43289, and do in a more compatible way with synchronised and unsychronised input. --- source/games/duke/src/actors.cpp | 26 ++++++++++++++++++++++++++ source/games/duke/src/player.cpp | 12 ------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 3ccdb9c92..afb382804 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -464,6 +464,19 @@ void moveplayers(void) //Players p->jetpack_amount = 1599; } + if (p->actorsqu >= 0) + { + int ang = getincangle(p->getang(), getangle(sprite[p->actorsqu].x - p->posx, sprite[p->actorsqu].y - p->posy)) >> 2; + if (!cl_syncinput) + { + p->angAdjust += ang; + } + else + { + p->addang(ang); + } + } + if (s->extra > 0) { // currently alive... @@ -481,6 +494,19 @@ void moveplayers(void) //Players p->posz = s->z - (20 << 8); p->newowner = -1; + + if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS) + { + int ang = getincangle(p->getang(), getangle(sprite[p->wackedbyactor].x - p->posx, sprite[p->wackedbyactor].y - p->posy)) >> 1; + if (!cl_syncinput) + { + p->angAdjust += ang; + } + else + { + p->addang(ang); + } + } } s->ang = p->getang(); } diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index 46098daef..da5d39175 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -810,11 +810,6 @@ void applylook(int snum, double factor, fixed_t adjustment) p->addrotscrnang(factor * -24); } - if (p->actorsqu >= 0) - { - p->q16ang += fix16_from_dbl(factor * (getincangle(p->getang(), getangle(sprite[p->actorsqu].x - p->posx, sprite[p->actorsqu].y - p->posy)) >> 2)); - } - if (p->one_eighty_count < 0 && p->on_crane < 0) { fixed_t add = fix16_from_dbl(factor * 128); @@ -830,13 +825,6 @@ void applylook(int snum, double factor, fixed_t adjustment) p->q16ang += fix16_from_dbl(factor * p->angAdjust) + adjustment; apply_seasick(p, factor); } - else - { - if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS) - { - p->q16ang += fix16_from_dbl(factor * (getincangle(p->getang(), getangle(sprite[p->wackedbyactor].x - p->posx, sprite[p->wackedbyactor].y - p->posy)) >> 1)); - } - } } //---------------------------------------------------------------------------