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
This commit is contained in:
terminx 2019-10-20 17:55:35 +00:00 committed by Christoph Oelckers
parent 4c28d25e3f
commit 9aae157e27

View file

@ -6128,9 +6128,9 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
g_playerSpawnPoints[playerNum].pos.y += x; g_playerSpawnPoints[playerNum].pos.y += x;
} }
if (pSprite->sectnum == sprite[pPlayer->i].sectnum if (pSprite->sectnum == pPlayer->cursectnum
#ifdef YAX_ENABLE #ifdef YAX_ENABLE
|| (pData[9]>=0 && pData[9] == sprite[pPlayer->i].sectnum) || (pData[9]>=0 && pData[9] == pPlayer->cursectnum)
#endif #endif
) )
{ {
@ -6285,7 +6285,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
{ {
auto const pPlayer = g_player[playerNum].ps; 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.x += l;
pPlayer->pos.y += x; pPlayer->pos.y += x;
@ -6657,7 +6657,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
if ((pSector->lotag&0xff) != ST_27_STRETCH_BRIDGE) if ((pSector->lotag&0xff) != ST_27_STRETCH_BRIDGE)
for (bssize_t TRAVERSE_CONNECT(playerNum)) for (bssize_t TRAVERSE_CONNECT(playerNum))
if (pSector->lotag != ST_30_ROTATE_RISE_BRIDGE && pSector->lotag != ST_31_TWO_WAY_TRAIN && pSector->lotag != 0 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; j = 0;
if (j == 1) if (j == 1)
@ -7533,7 +7533,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
{ {
auto const pPlayer = g_player[p].ps; 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.x += l;
pPlayer->pos.y += x; pPlayer->pos.y += x;