You know that problem where you bumped on the edges of Mario blocks and Bustable blocks and Bouncy FOFs sometimes? Wham. Bam. In the van.

Issue was caused by attempting to traverse the sector's thing-touching-list across all the things in the sector (which would inevitably have the same sector as the first node in mobj->touching_sectorlist) instead of traversing the thing's sector-touching-list (which has the same thing but different sector references).

I wonder how many times AJ copypasted this code with absolutely no idea why it wasn't working properly. I'll figure that out tomorrow, maybe set up some compiler macros so this mistake is never made again. For now, I must sleeb.
This commit is contained in:
toasterbabe 2016-06-09 00:02:50 +01:00
parent 742353d0ab
commit 0b920ee249
2 changed files with 4 additions and 4 deletions

View file

@ -1530,7 +1530,7 @@ static void P_PushableCheckBustables(mobj_t *mo)
mo->y += mo->momy;
P_SetThingPosition(mo);
for (node = mo->touching_sectorlist; node; node = node->m_snext)
for (node = mo->touching_sectorlist; node; node = node->m_tnext)
{
if (!node->m_sector)
break;
@ -2880,7 +2880,7 @@ nightsdone:
if (CheckForMarioBlocks && !(netgame && mo->player->spectator)) // Only let the player punch
{
// Search the touching sectors, from side-to-side...
for (node = mo->touching_sectorlist; node; node = node->m_snext)
for (node = mo->touching_sectorlist; node; node = node->m_tnext)
{
ffloor_t *rover;
if (!node->m_sector->ffloors)

View file

@ -1684,7 +1684,7 @@ static void P_CheckBustableBlocks(player_t *player)
player->mo->y += player->mo->momy;
P_SetThingPosition(player->mo);
for (node = player->mo->touching_sectorlist; node; node = node->m_snext)
for (node = player->mo->touching_sectorlist; node; node = node->m_tnext)
{
if (!node->m_sector)
break;
@ -1801,7 +1801,7 @@ static void P_CheckBouncySectors(player_t *player)
player->mo->z += player->mo->momz;
P_SetThingPosition(player->mo);
for (node = player->mo->touching_sectorlist; node; node = node->m_snext)
for (node = player->mo->touching_sectorlist; node; node = node->m_tnext)
{
if (!node->m_sector)
break;