| 1518 | } |
| 1519 | |
| 1520 | void lock_target(S32 index, const xVec3* target, F32 opacity) |
| 1521 | { |
| 1522 | if (index <= -1 && hud.gizmos_used >= 33) |
| 1523 | { |
| 1524 | return; |
| 1525 | } |
| 1526 | |
| 1527 | hud_gizmo* gizmo; |
| 1528 | if (index <= -1) |
| 1529 | { |
| 1530 | index = hud.gizmos_used; |
| 1531 | hud.gizmos_used++; |
| 1532 | gizmo = &hud.gizmo[index]; |
| 1533 | show_gizmo(hud.gizmo[index], hud.gizmo[index].bound, hud.model.target); |
| 1534 | } |
| 1535 | gizmo = &hud.gizmo[index]; |
| 1536 | xVec3 screen_loc = cruise_bubble::world_to_screen(*target); |
| 1537 | |
| 1538 | gizmo->bound.set_size(current_tweak->hud.target.size); |
| 1539 | gizmo->bound.center(screen_loc.x, screen_loc.y); |
| 1540 | gizmo->flags = 0x1; |
| 1541 | gizmo->alpha_vel = 1.0f / current_tweak->hud.time_fade; |
| 1542 | gizmo->model = hud.model.target; |
| 1543 | gizmo->target = target; |
| 1544 | gizmo->opacity = opacity; |
| 1545 | } |
| 1546 | |
| 1547 | void check_lock_target(const xVec3* target) |
| 1548 | { |
no test coverage detected