Address World Server Packet timing and erroneous log (#929)

* Fix overread in projectile behavior

* Fix stuns

* Correctly read in bitStream

* Fix projectile behavior

* Address movement type issues

* Update shutdown time to be accurate

* Fix small issues
This commit is contained in:
David Markowitz 2022-12-29 06:34:53 -08:00 committed by GitHub
parent bd28e4051f
commit 9adbb7aa86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ void BasicAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi
void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
auto* targetEntity = EntityManager::Instance()->GetEntity(branch.target);
if (!targetEntity) {
Game::logger->Log("BasicAttackBehavior", "Target targetEntity %i not found.", branch.target);
Game::logger->Log("BasicAttackBehavior", "Target targetEntity %llu not found.", branch.target);
return;
}

View File

@ -416,7 +416,7 @@ int main(int argc, char** argv) {
HandlePacket(packet);
auto t2 = std::chrono::high_resolution_clock::now();
timeSpent += std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
timeSpent += std::chrono::duration_cast<std::chrono::duration<float>>(t2 - t1).count();
Game::server->DeallocatePacket(packet);
packet = nullptr;
} else {