mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-12 18:12:43 +00:00
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:
parent
1f39a0cb3e
commit
c3c60b331a
@ -1,5 +1,12 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 7/1/2017 ==
|
||||||
|
Akkadius: Resolve issues with NPC's hopping to the ceiling in small corridors
|
||||||
|
Akkadius: Improved grounding issues with NPC's during combat
|
||||||
|
Akkadius: 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
|
||||||
|
|
||||||
== 6/28/2017 ==
|
== 6/28/2017 ==
|
||||||
Akkadius: Fixed issues with Z correctness when NPCs are pathing on normal grids
|
Akkadius: Fixed issues with Z correctness when NPCs are pathing on normal grids
|
||||||
Akkadius: Fixed issues with Z correctness when NPCs are engaged with players following
|
Akkadius: Fixed issues with Z correctness when NPCs are engaged with players following
|
||||||
|
|||||||
@ -492,6 +492,7 @@ public:
|
|||||||
inline const float GetTarVZ() const { return m_TargetV.z; }
|
inline const float GetTarVZ() const { return m_TargetV.z; }
|
||||||
inline const float GetTarVector() const { return tar_vector; }
|
inline const float GetTarVector() const { return tar_vector; }
|
||||||
inline const uint8 GetTarNDX() const { return tar_ndx; }
|
inline const uint8 GetTarNDX() const { return tar_ndx; }
|
||||||
|
inline const int8 GetFlyMode() const { return flymode; }
|
||||||
bool IsBoat() const;
|
bool IsBoat() const;
|
||||||
|
|
||||||
//Group
|
//Group
|
||||||
|
|||||||
@ -998,9 +998,16 @@ void Mob::AI_Process() {
|
|||||||
|
|
||||||
/* Fix Z when following during pull, not when engaged and stationary */
|
/* Fix Z when following during pull, not when engaged and stationary */
|
||||||
if (moving && fix_z_timer_engaged.Check())
|
if (moving && fix_z_timer_engaged.Check())
|
||||||
if(this->GetTarget())
|
if (this->GetTarget()) {
|
||||||
if(DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()) > 50)
|
/* If we are engaged, moving and following client, let's look for best Z more often */
|
||||||
|
if (DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()) > 50) {
|
||||||
this->FixZ();
|
this->FixZ();
|
||||||
|
}
|
||||||
|
/* If we are close to client and our Z differences aren't big, match the client */
|
||||||
|
else if (std::abs(this->GetZ() - this->GetTarget()->GetZ()) < 20){
|
||||||
|
this->m_Position.z = this->GetTarget()->GetZ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(m_PlayerState & static_cast<uint32>(PlayerState::Aggressive)))
|
if (!(m_PlayerState & static_cast<uint32>(PlayerState::Aggressive)))
|
||||||
SendAddPlayerState(PlayerState::Aggressive);
|
SendAddPlayerState(PlayerState::Aggressive);
|
||||||
|
|||||||
@ -879,8 +879,8 @@ void Mob::FixZ() {
|
|||||||
if (!RuleB(Watermap, CheckForWaterWhenMoving) || !zone->HasWaterMap() ||
|
if (!RuleB(Watermap, CheckForWaterWhenMoving) || !zone->HasWaterMap() ||
|
||||||
(zone->HasWaterMap() && !zone->watermap->InWater(glm::vec3(m_Position))))
|
(zone->HasWaterMap() && !zone->watermap->InWater(glm::vec3(m_Position))))
|
||||||
{
|
{
|
||||||
|
/* 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, 10);
|
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5);
|
||||||
|
|
||||||
auto duration = timer.elapsed();
|
auto duration = timer.elapsed();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user