From 9aae157e27a4c5b5a98d77271033fdfcddf896b2 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 20 Oct 2019 17:55:35 +0000 Subject: [PATCH] This helps the player not fall off of the edges of certain types of moving sectors as easily git-svn-id: https://svn.eduke32.com/eduke32@8245 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index d63eb3045..8ce70f0b0 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -6128,9 +6128,9 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 g_playerSpawnPoints[playerNum].pos.y += x; } - if (pSprite->sectnum == sprite[pPlayer->i].sectnum + if (pSprite->sectnum == pPlayer->cursectnum #ifdef YAX_ENABLE - || (pData[9]>=0 && pData[9] == sprite[pPlayer->i].sectnum) + || (pData[9]>=0 && pData[9] == pPlayer->cursectnum) #endif ) { @@ -6285,7 +6285,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 { auto const pPlayer = g_player[playerNum].ps; - if (sprite[pPlayer->i].sectnum == pSprite->sectnum) + if (pPlayer->cursectnum == pSprite->sectnum) { pPlayer->pos.x += l; pPlayer->pos.y += x; @@ -6657,7 +6657,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 if ((pSector->lotag&0xff) != ST_27_STRETCH_BRIDGE) for (bssize_t TRAVERSE_CONNECT(playerNum)) if (pSector->lotag != ST_30_ROTATE_RISE_BRIDGE && pSector->lotag != ST_31_TWO_WAY_TRAIN && pSector->lotag != 0 - && pSprite->sectnum == sprite[g_player[playerNum].ps->i].sectnum) + && pSprite->sectnum == pPlayer->cursectnum) j = 0; if (j == 1) @@ -7533,7 +7533,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 { auto const pPlayer = g_player[p].ps; - if (pSprite->sectnum == sprite[pPlayer->i].sectnum && pPlayer->on_ground) + if (pSprite->sectnum == pPlayer->cursectnum && pPlayer->on_ground) { pPlayer->pos.x += l; pPlayer->pos.y += x;