mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-28 00:17:23 +00:00
Correctly read in bitStream
This commit is contained in:
parent
9cfc126842
commit
d78b2958d3
@ -31,6 +31,14 @@ void ProjectileAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStrea
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_ProjectileType == 1) {
|
||||
NiPoint3 targetPosition = NiPoint3::ZERO;
|
||||
if (!bitStream->Read(targetPosition)) {
|
||||
Game::logger->Log("ProjectileAttackBehavior", "Unable to read targetPosition from bitStream, aborting Handle! %i", bitStream->GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
auto* targetEntity = EntityManager::Instance()->GetEntity(target);
|
||||
|
||||
for (auto i = 0u; i < this->m_projectileCount; ++i) {
|
||||
@ -149,4 +157,6 @@ void ProjectileAttackBehavior::Load() {
|
||||
this->m_trackRadius = GetFloat("track_radius");
|
||||
|
||||
this->m_useMouseposit = GetBoolean("use_mouseposit");
|
||||
|
||||
this->m_ProjectileType = GetInt("projectile_type");
|
||||
}
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
|
||||
bool m_useMouseposit;
|
||||
|
||||
int32_t m_ProjectileType;
|
||||
|
||||
/*
|
||||
* Inherited
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user