mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-23 05:00:17 +00:00
dCinema improvements
* Visiblity and effect records * Recorder will catch effects from behaviors * Documentation for setting up a scene to play automatically. * Documentation for server-side preconditions.
This commit is contained in:
@@ -3,13 +3,17 @@
|
||||
#include "BehaviorContext.h"
|
||||
#include "BehaviorBranchContext.h"
|
||||
|
||||
#include "Recorder.h"
|
||||
|
||||
void PlayEffectBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
|
||||
const auto& target = branch.target == LWOOBJID_EMPTY ? context->originator : branch.target;
|
||||
|
||||
Cinema::Recording::Recorder::RegisterEffectForActor(target, this->m_effectId);
|
||||
|
||||
// On managed behaviors this is handled by the client
|
||||
if (!context->unmanaged)
|
||||
return;
|
||||
|
||||
const auto& target = branch.target == LWOOBJID_EMPTY ? context->originator : branch.target;
|
||||
|
||||
PlayFx(u"", target);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user