2022-08-06 03:01:59 +00:00
|
|
|
#include "PlayEffectBehavior.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
#include "BehaviorContext.h"
|
|
|
|
#include "BehaviorBranchContext.h"
|
|
|
|
|
2023-10-29 16:37:26 +00:00
|
|
|
#include "Recorder.h"
|
|
|
|
|
2024-02-27 07:25:44 +00:00
|
|
|
void PlayEffectBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
2023-10-29 16:37:26 +00:00
|
|
|
const auto& target = branch.target == LWOOBJID_EMPTY ? context->originator : branch.target;
|
|
|
|
|
|
|
|
Cinema::Recording::Recorder::RegisterEffectForActor(target, this->m_effectId);
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
// On managed behaviors this is handled by the client
|
|
|
|
if (!context->unmanaged)
|
|
|
|
return;
|
|
|
|
|
|
|
|
PlayFx(u"", target);
|
|
|
|
}
|
|
|
|
|
2024-02-27 07:25:44 +00:00
|
|
|
void PlayEffectBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
2021-12-05 17:54:36 +00:00
|
|
|
const auto& target = branch.target == LWOOBJID_EMPTY ? context->originator : branch.target;
|
|
|
|
|
|
|
|
//PlayFx(u"", target);
|
|
|
|
}
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
void PlayEffectBehavior::Load() {
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|