From 506b3ca4a0d65ef325361dcb48561eba51b1a955 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 8 Sep 2014 21:43:25 -0400 Subject: [PATCH] Fix slow calculation Full details: http://www.eqemulator.org/forums/showthread.php?t=38734 --- changelog.txt | 4 ++++ zone/mob.cpp | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 233f26b5e..f61ed4255 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 09/08/2014 == +demonstar55: Fix slow calc + see: http://www.eqemulator.org/forums/showthread.php?t=38734 + == 09/07/2014 == Akkadius: Fixed ROF Augment item dupe with not checking for available slots properly and adding items to the virtual instance diff --git a/zone/mob.cpp b/zone/mob.cpp index e3a23efc6..2b38e4714 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1941,10 +1941,8 @@ void Mob::Kill() { void Mob::SetAttackTimer() { float PermaHaste; - if(GetHaste() > 0) - PermaHaste = 1 / (1 + (float)GetHaste()/100); - else if(GetHaste() < 0) - PermaHaste = 1 * (1 - (float)GetHaste()/100); + if (GetHaste()) + PermaHaste = 1 / (1 + (float)GetHaste() / 100); else PermaHaste = 1.0f;