From 9e243a2426738e1fbd801c49faa3b681ff3b2d94 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 10 Sep 2014 22:33:30 -0700 Subject: [PATCH] bestz will no longer scale off of model size, also it adjusts up less extremely in general. Fixed super duper attack speed on command spawned npcs --- zone/npc.cpp | 2 ++ zone/waypoints.cpp | 12 +++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 8804c488b..a4ecaec3a 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -936,6 +936,8 @@ NPC* NPC::SpawnNPC(const char* spawncommand, float in_x, float in_y, float in_z, npc_type->WIS = 150; npc_type->CHA = 150; + npc_type->attack_delay = 30; + npc_type->prim_melee_type = 28; npc_type->sec_melee_type = 28; diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index f1a3dce18..5f2b0899f 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -567,9 +567,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b { Map::Vertex dest(x_pos, y_pos, z_pos); - float newz = zone->zonemap->FindBestZ(dest, nullptr); - float sz = GetSize(); - newz += sz >= 0.0f ? sz / 2.0f : 0.0f; + float newz = zone->zonemap->FindBestZ(dest, nullptr) + 2.0f; mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos); @@ -698,9 +696,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b { Map::Vertex dest(x_pos, y_pos, z_pos); - float newz = zone->zonemap->FindBestZ(dest, nullptr); - float sz = GetSize(); - newz += sz >= 0.0f ? sz / 2.0f : 0.0f; + float newz = zone->zonemap->FindBestZ(dest, nullptr); + 2.0f; mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos); @@ -825,9 +821,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec { Map::Vertex dest(x_pos, y_pos, z_pos); - float newz = zone->zonemap->FindBestZ(dest, nullptr); - float sz = GetSize(); - newz += sz >= 0.0f ? sz / 2.0f : 0.0f; + float newz = zone->zonemap->FindBestZ(dest, nullptr) + 2.0f; mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);