Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var _bup = _id.bbox_top;
- var _bdown = _id.bbox_bottom;
- var _bleft = _id.bbox_left;
- var _bright = _id.bbox_right;
- // При полёте вниз
- if (_info.motion.ver_vel > 0) {
- var _new_y = round((_bdown + _info.motion.ver_vel)) div CH;
- if (mp_grid_get_cell(global.grid_settings.grid, _bleft div CW, _new_y) == -1)
- or(mp_grid_get_cell(global.grid_settings.grid, _bright div CW, _new_y) == -1) {
- _new_y *= CH;
- _new_y -= 1;
- _info.motion.ver_vel = clamp(_new_y - _bdown, 0, CH);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement