| 491 | } |
| 492 | |
| 493 | void PlayerController::onVisualChanged() |
| 494 | { |
| 495 | getModelVisual()->getCollisionBBox(m_NPCProperties.collisionBBox); |
| 496 | m_NPCProperties.modelRoot = getModelVisual()->getModelRoot(); |
| 497 | |
| 498 | getModelVisual()->setTransient(true); // Don't export this from here. Will be rebuilt after loading anyways. |
| 499 | |
| 500 | // Setup callbacks |
| 501 | getModelVisual()->getAnimationHandler().setCallbackEventSFX([this](const ZenLoad::zCModelScriptEventSfx& sfx) { |
| 502 | AniEvent_SFX(sfx); |
| 503 | }); |
| 504 | |
| 505 | getModelVisual()->getAnimationHandler().setCallbackEventSFXGround([this](const ZenLoad::zCModelScriptEventSfx& sfx) { |
| 506 | AniEvent_SFXGround(sfx); |
| 507 | }); |
| 508 | |
| 509 | getModelVisual()->getAnimationHandler().setCallbackEventTag([this](const ZenLoad::zCModelScriptEventTag& tag) { |
| 510 | AniEvent_Tag(tag); |
| 511 | }); |
| 512 | getModelVisual()->getAnimationHandler().setCallbackEventPfx([this](const ZenLoad::zCModelScriptEventPfx& pfx) { |
| 513 | AniEvent_PFX(pfx); |
| 514 | }); |
| 515 | getModelVisual()->getAnimationHandler().setCallbackEventPfxStop([this](const ZenLoad::zCModelScriptEventPfxStop& pfxStop) { |
| 516 | AniEvent_PFXStop(pfxStop); |
| 517 | }); |
| 518 | } |
| 519 | |
| 520 | void PlayerController::onUpdateByInput(float deltaTime) |
| 521 | { |
nothing calls this directly
no test coverage detected