mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 06:57:28 +00:00
Correct Projectile behavior bitStream reads (#907)
This commit is contained in:
parent
559894024c
commit
38eb441ca1
@ -15,6 +15,8 @@ struct BehaviorBranchContext
|
||||
|
||||
uint32_t start = 0;
|
||||
|
||||
bool isSync = false;
|
||||
|
||||
BehaviorBranchContext();
|
||||
|
||||
BehaviorBranchContext(LWOOBJID target, float duration = 0, const NiPoint3& referencePosition = NiPoint3(0, 0, 0));
|
||||
|
@ -51,6 +51,7 @@ void BehaviorContext::RegisterSyncBehavior(const uint32_t syncId, Behavior* beha
|
||||
entry.handle = syncId;
|
||||
entry.behavior = behavior;
|
||||
entry.branchContext = branchContext;
|
||||
entry.branchContext.isSync = true;
|
||||
entry.ignoreInterrupts = ignoreInterrupts;
|
||||
|
||||
this->syncEntries.push_back(entry);
|
||||
|
@ -31,7 +31,7 @@ void ProjectileAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStrea
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_ProjectileType == 1) {
|
||||
if (m_useMouseposit && !branch.isSync) {
|
||||
NiPoint3 targetPosition = NiPoint3::ZERO;
|
||||
if (!bitStream->Read(targetPosition)) {
|
||||
Game::logger->Log("ProjectileAttackBehavior", "Unable to read targetPosition from bitStream, aborting Handle! %i", bitStream->GetNumberOfUnreadBits());
|
||||
|
Loading…
Reference in New Issue
Block a user