From 7be5abbe376e8d7a229069173693e6efc26e06da Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 12 Feb 2018 02:32:43 +0000 Subject: [PATCH] Revert the functional changes of r4741 and r4703 relating to conveyors. This restores conveyor belts to their original v1.5 speeds at the expense of the corner cases the original commits addressed. This can be revisited in the future to address these corner cases without breaking the original game. git-svn-id: https://svn.eduke32.com/eduke32@6649 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 6 ++++++ source/duke3d/src/player.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index 061bf2749..528b482ca 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -5669,6 +5669,12 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 int32_t q = 0, j, k, l, m, x; int spriteNum = headspritestat[STAT_EFFECTOR]; + for (native_t TRAVERSE_CONNECT(playerNum)) + { + vec2_t & fric = g_player[playerNum].ps->fric; + fric.x = fric.y = 0; + } + while (spriteNum >= 0) { int const nextSprite = nextspritestat[spriteNum]; diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index d7a6c12f3..dd6121bbe 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -3051,10 +3051,12 @@ void P_GetInput(int playerNum) } localInput.fvel = mulscale9(staticInput.fvel, sintable[(pPlayer->ang + 2560) & 2047]) + - (mulscale9(staticInput.svel, sintable[(pPlayer->ang + 2048) & 2047])); + mulscale9(staticInput.svel, sintable[(pPlayer->ang + 2048) & 2047]) + + pPlayer->fric.x; localInput.svel = mulscale9(staticInput.fvel, sintable[(pPlayer->ang + 2048) & 2047]) + - (mulscale9(staticInput.svel, sintable[(pPlayer->ang + 1536) & 2047])); + mulscale9(staticInput.svel, sintable[(pPlayer->ang + 1536) & 2047]) + + pPlayer->fric.y; localInput.avel = staticInput.avel; localInput.horz = staticInput.horz; @@ -5223,13 +5225,11 @@ HORIZONLY:; updatesectorz(pPlayer->pos.x, pPlayer->pos.y, pPlayer->pos.z, &pPlayer->cursectnum); } #endif - int const spriteNum = clipmove((vec3_t *) pPlayer, &pPlayer->cursectnum, pPlayer->vel.x + (pPlayer->fric.x << 9), - pPlayer->vel.y + (pPlayer->fric.y << 9), pPlayer->clipdist, (4L << 8), stepHeight, CLIPMASK0); + int const spriteNum = clipmove((vec3_t *) pPlayer, &pPlayer->cursectnum, pPlayer->vel.x, + pPlayer->vel.y, pPlayer->clipdist, (4L << 8), stepHeight, CLIPMASK0); if (spriteNum) P_CheckTouchDamage(pPlayer, spriteNum); - - pPlayer->fric.x = pPlayer->fric.y = 0; } // This makes the player view lower when shrunk. NOTE that it can get the