Merge remote-tracking branch 'refs/remotes/origin/main'

Conflicts:
	CMakeLists.txt
	dGame/CMakeLists.txt
	dGame/Entity.cpp
	dGame/dBehaviors/AttackDelayBehavior.cpp
	dGame/dBehaviors/PlayEffectBehavior.cpp
This commit is contained in:
wincent
2024-04-02 21:51:29 +02:00
418 changed files with 5806 additions and 5150 deletions

View File

@@ -6,11 +6,11 @@
#include "Recorder.h"
void AttackDelayBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream, const BehaviorBranchContext branch) {
void AttackDelayBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStream, const BehaviorBranchContext branch) {
uint32_t handle{};
if (!bitStream->Read(handle)) {
LOG("Unable to read handle from bitStream, aborting Handle! %i", bitStream->GetNumberOfUnreadBits());
if (!bitStream.Read(handle)) {
LOG("Unable to read handle from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
return;
};
@@ -21,10 +21,10 @@ void AttackDelayBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi
}
}
void AttackDelayBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStream, const BehaviorBranchContext branch) {
void AttackDelayBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, const BehaviorBranchContext branch) {
const auto handle = context->GetUniqueSkillId();
bitStream->Write(handle);
bitStream.Write(handle);
context->foundTarget = true;
@@ -35,11 +35,11 @@ void AttackDelayBehavior::Calculate(BehaviorContext* context, RakNet::BitStream*
}
}
void AttackDelayBehavior::Sync(BehaviorContext* context, RakNet::BitStream* bitStream, const BehaviorBranchContext branch) {
void AttackDelayBehavior::Sync(BehaviorContext* context, RakNet::BitStream& bitStream, const BehaviorBranchContext branch) {
this->m_action->Handle(context, bitStream, branch);
}
void AttackDelayBehavior::SyncCalculation(BehaviorContext* context, RakNet::BitStream* bitStream, const BehaviorBranchContext branch) {
void AttackDelayBehavior::SyncCalculation(BehaviorContext* context, RakNet::BitStream& bitStream, const BehaviorBranchContext branch) {
PlayFx(u"cast", context->originator);
this->m_action->Calculate(context, bitStream, branch);