From 6f6d5687205e0c8be85999359fc30ab57d84945f Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 20 Oct 2019 17:55:28 +0000 Subject: [PATCH] This fixes most issues with the player clipping through the walls of rotating sectors git-svn-id: https://svn.eduke32.com/eduke32@8243 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index f9ed2a221..1799ceea4 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -4920,6 +4920,9 @@ void P_ProcessInput(int playerNum) pPlayer->opyoff = pPlayer->pyoff; pPlayer->oq16ang = pPlayer->q16ang; + updatesector(pPlayer->pos.x, pPlayer->pos.y, &pPlayer->cursectnum); + pushmove(&pPlayer->pos, &pPlayer->cursectnum, pPlayer->clipdist - 1, (4L<<8), stepHeight, CLIPMASK0); + if (pPlayer->one_eighty_count < 0) { pPlayer->one_eighty_count += 128; @@ -5011,8 +5014,7 @@ void P_ProcessInput(int playerNum) pPlayer->pos.z = floorZ - (floorZOffset << 8); else { - pPlayer->on_ground = 0; - pPlayer->vel.z += (g_spriteGravity + 80); // (TICSPERFRAME<<6); + pPlayer->vel.z += (g_spriteGravity + 80); // (TICSPERFRAME<<6); if (pPlayer->vel.z >= (4096 + 2048)) pPlayer->vel.z = (4096 + 2048); @@ -5058,7 +5060,10 @@ void P_ProcessInput(int playerNum) A_PlaySound(DUKE_LAND, pPlayer->i); #endif } + pPlayer->on_ground = 1; } + else + pPlayer->on_ground = 0; } } else