| 552 | } |
| 553 | |
| 554 | void afxEffectron::init_constraints() |
| 555 | { |
| 556 | if (constraints_initialized) |
| 557 | { |
| 558 | //Con::printf("CONSTRAINTS ALREADY INITIALIZED"); |
| 559 | return; |
| 560 | } |
| 561 | |
| 562 | Vector<afxConstraintDef> defs; |
| 563 | datablock->gatherConstraintDefs(defs); |
| 564 | |
| 565 | constraint_mgr->initConstraintDefs(defs, isServerObject()); |
| 566 | |
| 567 | if (isServerObject()) |
| 568 | { |
| 569 | // find local camera |
| 570 | camera_cons_obj = get_camera(); |
| 571 | if (camera_cons_obj) |
| 572 | camera_cons_id = constraint_mgr->setReferenceObject(CAMERA_CONS, camera_cons_obj); |
| 573 | } |
| 574 | else // if (isClientObject()) |
| 575 | { |
| 576 | // find local camera |
| 577 | camera_cons_obj = get_camera(); |
| 578 | if (camera_cons_obj) |
| 579 | camera_cons_id = constraint_mgr->setReferenceObject(CAMERA_CONS, camera_cons_obj); |
| 580 | |
| 581 | // find local listener |
| 582 | Point3F listener_pos; |
| 583 | listener_pos = SFX->getListener().getTransform().getPosition(); |
| 584 | listener_cons_id = constraint_mgr->setReferencePoint(LISTENER_CONS, listener_pos); |
| 585 | } |
| 586 | |
| 587 | constraint_mgr->adjustProcessOrdering(this); |
| 588 | |
| 589 | constraints_initialized = true; |
| 590 | } |
| 591 | |
| 592 | void afxEffectron::init_scoping() |
| 593 | { |
nothing calls this directly
no test coverage detected