mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-28 08:12:27 +00:00
[Bug Fix] Fix issue with mobs summoning PCs into ceilings (#1921)
This commit is contained in:
parent
a6cd0bc33a
commit
7749c626f0
@ -3594,7 +3594,10 @@ bool Mob::HateSummon() {
|
|||||||
if(summon_level == 1) {
|
if(summon_level == 1) {
|
||||||
entity_list.MessageClose(this, true, 500, Chat::Say, "%s says 'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() );
|
entity_list.MessageClose(this, true, 500, Chat::Say, "%s says 'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() );
|
||||||
|
|
||||||
|
float summoner_zoff = this->GetZOffset();
|
||||||
|
float summoned_zoff = target->GetZOffset();
|
||||||
auto new_pos = m_Position;
|
auto new_pos = m_Position;
|
||||||
|
new_pos.z -= (summoner_zoff - summoned_zoff);
|
||||||
float angle = new_pos.w - target->GetHeading();
|
float angle = new_pos.w - target->GetHeading();
|
||||||
new_pos.w = target->GetHeading();
|
new_pos.w = target->GetHeading();
|
||||||
|
|
||||||
|
|||||||
@ -958,6 +958,7 @@ void Mob::TryMoveAlong(float distance, float angle, bool send)
|
|||||||
}
|
}
|
||||||
|
|
||||||
new_pos.z = GetFixedZ(new_pos);
|
new_pos.z = GetFixedZ(new_pos);
|
||||||
|
|
||||||
Teleport(new_pos);
|
Teleport(new_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -971,7 +972,6 @@ glm::vec4 Mob::TryMoveAlong(const glm::vec4 &start, float distance, float angle)
|
|||||||
glm::vec3 new_pos = start;
|
glm::vec3 new_pos = start;
|
||||||
new_pos.x += distance * g_Math.FastSin(angle);
|
new_pos.x += distance * g_Math.FastSin(angle);
|
||||||
new_pos.y += distance * g_Math.FastCos(angle);
|
new_pos.y += distance * g_Math.FastCos(angle);
|
||||||
new_pos.z += GetZOffset();
|
|
||||||
|
|
||||||
if (zone->HasMap()) {
|
if (zone->HasMap()) {
|
||||||
if (zone->zonemap->LineIntersectsZone(start, new_pos, 0.0f, &tmp_pos))
|
if (zone->zonemap->LineIntersectsZone(start, new_pos, 0.0f, &tmp_pos))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user