1 |
if (i_ex(collisionObject)) |
2 |
{ |
3 |
ox = (collisionObject.bbox_left + collisionObject.bbox_right) / 2; |
4 |
oy = collisionObject.bbox_bottom; |
5 |
lw = leaveAreaPixelLeeway; |
6 |
if (point_in_rectangle(ox, oy, x, y, x + sprite_width, y + sprite_height)) |
7 |
{ |
8 |
inside = 1; |
9 |
obj_camera_advanced.currentView = myView; |
10 |
} |
11 |
else if (revertViewWhenOutsideArea) |
12 |
{ |
13 |
if (!point_in_rectangle(ox, oy, x - lw, y - lw, x + sprite_width + lw, y + sprite_height + lw)) |
14 |
{ |
15 |
if (inside == 1) |
16 |
{ |
17 |
} |
18 |
inside = 0; |
19 |
if (obj_camera_advanced.currentView == myView) |
20 |
obj_camera_advanced.currentView = defaultOutsideView; |
21 |
} |
22 |
} |
23 |
} |