MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / onVisualChanged

Method onVisualChanged

src/logic/PlayerController.cpp:493–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493void 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
520void PlayerController::onUpdateByInput(float deltaTime)
521{

Callers

nothing calls this directly

Calls 8

getCollisionBBoxMethod · 0.80
getModelRootMethod · 0.80
setTransientMethod · 0.80
setCallbackEventSFXMethod · 0.80
setCallbackEventTagMethod · 0.80
setCallbackEventPfxMethod · 0.80

Tested by

no test coverage detected