1 | if (global.phasing == 0) |
2 | { |
3 | if (global.interact == 0) |
4 | { |
5 | if (global.facing == 1) |
6 | { |
7 | if (collision_point(bbox_right + 2, bbox_top - 2, obj_solidparent, 0, 1) == -4) |
8 | { |
9 | x = xprevious + 3; |
10 | y = yprevious - 3; |
11 | } |
12 | else |
13 | { |
14 | x = xprevious; |
15 | } |
16 | } |
17 | if (global.facing == 0) |
18 | { |
19 | if (collision_point(bbox_left - 3, bbox_bottom + 3, obj_solidparent, 0, 1) == -4) |
20 | { |
21 | x = xprevious - 3; |
22 | y = yprevious + 3; |
23 | } |
24 | else |
25 | { |
26 | y = yprevious; |
27 | } |
28 | } |
29 | if (global.facing == 2) |
30 | { |
31 | x = xprevious; |
32 | y = yprevious - 3; |
33 | } |
34 | if (global.facing == 3) |
35 | { |
36 | y = yprevious; |
37 | x = xprevious - 3; |
38 | } |
39 | if (obj_time.down && obj_time.right) |
40 | { |
41 | x = xprevious; |
42 | y = yprevious; |
43 | } |
44 | if ((x % 3) != 0) |
45 | x -= 1; |
46 | if ((y % 3) != 0) |
47 | y -= 1; |
48 | moving = 0; |
49 | } |
50 | } |
51 | if (global.interact == 5 || global.interact == 1 || (global.interact == 3 && global.phasing == 0)) |
52 | { |
53 | x = xprevious; |
54 | y = yprevious; |
55 | } |