mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Fix overread in projectile behavior and address broken stuns (#898)
* Fix overread in projectile behavior * Fix stuns * Correctly read in bitStream
This commit is contained in:
@@ -31,7 +31,7 @@ void ProjectileAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStrea
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_useMouseposit) {
|
||||
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());
|
||||
@@ -157,4 +157,6 @@ void ProjectileAttackBehavior::Load() {
|
||||
this->m_trackRadius = GetFloat("track_radius");
|
||||
|
||||
this->m_useMouseposit = GetBoolean("use_mouseposit");
|
||||
|
||||
this->m_ProjectileType = GetInt("projectile_type");
|
||||
}
|
||||
|
Reference in New Issue
Block a user