Resolve issues with NPC's hopping to the ceiling in small corridors

Improved grounding issues with NPC's during combat
Improved scenarios where NPC's need to be dragged out of the ground - they should correct themselves far more consistently
	- Scenarios where an NPC is coming up from the bottom floor, or from the top floor, they will correct much better
	- A video of these tests can be found here: https://www.youtube.com/watch?v=HtC7bVNM7ZQ&feature=youtu.be
This commit is contained in:
Akkadius
2017-07-01 15:57:41 -05:00
parent 1f39a0cb3e
commit c3c60b331a
4 changed files with 19 additions and 4 deletions
+2 -2
View File
@@ -879,8 +879,8 @@ void Mob::FixZ() {
if (!RuleB(Watermap, CheckForWaterWhenMoving) || !zone->HasWaterMap() ||
(zone->HasWaterMap() && !zone->watermap->InWater(glm::vec3(m_Position))))
{
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 10);
/* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5);
auto duration = timer.elapsed();