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:
jadebenn
2024-02-27 01:25:44 -06:00
committed by GitHub
parent 75544e3eec
commit b261e63233
190 changed files with 915 additions and 915 deletions

View File

@@ -271,7 +271,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
if (skill_component != nullptr) {
auto bs = RakNet::BitStream(reinterpret_cast<unsigned char*>(&message.sBitStream[0]), message.sBitStream.size(), false);
skill_component->SyncPlayerProjectile(message.i64LocalID, &bs, message.i64TargetID);
skill_component->SyncPlayerProjectile(message.i64LocalID, bs, message.i64TargetID);
}
break;
@@ -298,7 +298,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
auto* skillComponent = entity->GetComponent<SkillComponent>();
success = skillComponent->CastPlayerSkill(behaviorId, startSkill.uiSkillHandle, &bs, startSkill.optionalTargetID, startSkill.skillID);
success = skillComponent->CastPlayerSkill(behaviorId, startSkill.uiSkillHandle, bs, startSkill.optionalTargetID, startSkill.skillID);
if (success && entity->GetCharacter()) {
DestroyableComponent* destComp = entity->GetComponent<DestroyableComponent>();
@@ -353,7 +353,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
auto* skillComponent = entity->GetComponent<SkillComponent>();
skillComponent->SyncPlayerSkill(sync.uiSkillHandle, sync.uiBehaviorHandle, &bs);
skillComponent->SyncPlayerSkill(sync.uiSkillHandle, sync.uiBehaviorHandle, bs);
}
EchoSyncSkill echo = EchoSyncSkill();