#ifdef BETTER2DMODE
if (twodlevel)
{
// Camera doesn't ALWAYS need to move, only when running..
if(player->speed > 10)
{
if(mo->momx > 0)
{
// Move the camera all smooth-like, not jerk it around..
if (player->camrelativex < MAXCAMERADIST)
player->camrelativex += 4*FRACUNIT;
}
else if(mo->momx < 0)
{
// Move the camera all smooth-like, not jerk it around..
if (player->camrelativex > -MAXCAMERADIST)
player->camrelativex -= 4*FRACUNIT;
}
}
// If speed is less than required, start moving the camera back.
else
{
if(player->camrelativex > 0)
player->camrelativex -= 4*FRACUNIT;
else if (player->camrelativex < 0)
player->camrelativex += 4*FRACUNIT;
}
// Add the relative x to the global x
x += player->camrelativex;
y += mo->momy << 1;
}
#elif defined (SRB2TODO)
if (twodlevel || (mo->flags2 & MF2_TWOD))
{
x += mo->momx << 1;
y += mo->momy << 1;
}
#endif