| 309 | } |
| 310 | |
| 311 | void CPathPadDialog::OnPathpadCenterView() { |
| 312 | if (Num_game_paths < 1) { |
| 313 | MessageBox("There are no paths to operate on."); |
| 314 | return; |
| 315 | } |
| 316 | |
| 317 | int p = D3EditState.current_path; |
| 318 | int n = D3EditState.current_node; |
| 319 | |
| 320 | game_path *gp = &GamePaths[p]; |
| 321 | |
| 322 | vector attempted_pos; |
| 323 | vector subvec = {0.0, 0.0, 0.0}; // changed for now |
| 324 | |
| 325 | attempted_pos = gp->pathnodes[n].pos - subvec; |
| 326 | |
| 327 | fvi_query fq; |
| 328 | fvi_info hit_info; |
| 329 | |
| 330 | fq.p0 = &GamePaths[p].pathnodes[n].pos; |
| 331 | fq.startroom = GamePaths[p].pathnodes[n].roomnum; |
| 332 | fq.p1 = &attempted_pos; |
| 333 | fq.rad = 0.0f; |
| 334 | fq.thisobjnum = -1; |
| 335 | fq.ignore_obj_list = NULL; |
| 336 | fq.flags = FQ_TRANSPOINT | FQ_IGNORE_RENDER_THROUGH_PORTALS; |
| 337 | |
| 338 | int hit = fvi_FindIntersection(&fq, &hit_info); |
| 339 | |
| 340 | if (hit != HIT_NONE) |
| 341 | Int3(); // what does it mean that we hit something? |
| 342 | |
| 343 | ObjSetPos(Viewer_object, &hit_info.hit_pnt, hit_info.hit_room, NULL, false); |
| 344 | |
| 345 | World_changed = 1; |
| 346 | UpdateDialog(); |
| 347 | } |
| 348 | |
| 349 | void CPathPadDialog::OnPathpadMoveDown() { |
| 350 | if (Num_game_paths < 1) { |
nothing calls this directly
no test coverage detected