Skip to content

Commit

Permalink
Cleanup and crash prevention
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 23, 2003
1 parent 5b4caf9 commit a9b37fc
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions doomsday/Src/jHexen/Am_map.c
Expand Up @@ -531,18 +531,13 @@ void AM_changeWindowScale(void)

void AM_doFollowPlayer(void)
{
if (f_oldloc.x != plr->plr->mo->x || f_oldloc.y != plr->plr->mo->y)
{
// m_x = FTOM(MTOF(plr->plr->mo->x - m_w/2));
// m_y = FTOM(MTOF(plr->plr->mo->y - m_h/2));
// m_x = plr->plr->mo->x - m_w/2;
// m_y = plr->plr->mo->y - m_h/2;
/*m_x = FTOM(MTOF(plr->plr->mo->x)) - m_w/2;
m_y = FTOM(MTOF(plr->plr->mo->y)) - m_h/2;*/
m_x = plr->plr->mo->x - m_w/2;
m_y = plr->plr->mo->y - m_h/2;
m_x2 = m_x + m_w;
m_y2 = m_y + m_h;
if(!plr->plr->mo) return;
if (f_oldloc.x != plr->plr->mo->x || f_oldloc.y != plr->plr->mo->y)
{
m_x = plr->plr->mo->x - m_w/2;
m_y = plr->plr->mo->y - m_h/2;
m_x2 = m_x + m_w;
m_y2 = m_y + m_h;

// do the parallax parchment scrolling.
/*
Expand All @@ -563,9 +558,9 @@ void AM_doFollowPlayer(void)
while(mapystart < 0)
mapystart += finit_height;
*/
f_oldloc.x = plr->plr->mo->x;
f_oldloc.y = plr->plr->mo->y;
}
f_oldloc.x = plr->plr->mo->x;
f_oldloc.y = plr->plr->mo->y;
}
}

// Ripped out for Heretic
Expand Down

0 comments on commit a9b37fc

Please sign in to comment.