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