/// sc_move_obj(collsion obj);

var _obj = argument[0];
var _time_hspd = hspd * game_speed;
var _time_vspd = vspd * game_speed;

if (place_meeting(x+_time_hspd, y, _obj)) {
  while(!place_meeting(x+sign(_time_hspd), y, _obj))
    x += sign(_time_hspd);
  _time_hspd = 0;
  hspd = 0;
}
x += _time_hspd;

if (place_meeting(x, y+_time_vspd, _obj)) {
  while(!place_meeting(x, y+sign(_time_vspd), _obj))
    y += sign(_time_vspd);
  _time_vspd = 0;
  vspd = 0;
}
y += _time_vspd;