mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 14:58:27 +00:00
chore: Change entity and component logic to use bitstream references (#1468)
* chore: Change entity and component logic to use bitstream references * merge
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "Logger.h"
|
||||
|
||||
|
||||
void VerifyBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
|
||||
void VerifyBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
||||
auto* entity = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
auto success = true;
|
||||
@@ -33,12 +33,12 @@ void VerifyBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitS
|
||||
}
|
||||
|
||||
if (branch.target != LWOOBJID_EMPTY && branch.target != context->originator) {
|
||||
bitStream->Write(success);
|
||||
bitStream.Write(success);
|
||||
|
||||
if (success) {
|
||||
bitStream->Write<uint32_t>(1);
|
||||
bitStream->Write0();
|
||||
bitStream->Write0();
|
||||
bitStream.Write<uint32_t>(1);
|
||||
bitStream.Write0();
|
||||
bitStream.Write0();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user