12-02-2009, 05:29 PM
Code:
if ( hspeed> 0 && x < other.x )
{
move_contact_all(direction,12);
hspeed = 0;
}
if ( vspeed> 0 && y < other.y )
{
move_contact_solid(direction,12);
vspeed = 0;
}
if ( vspeed< 0 && y > other.y )
{
move_contact_solid(direction,12);
vspeed = 0;
}
if ( hspeed< 0 && x > other.x )
{
move_contact_all(direction,12);
hspeed = 0;
}