diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index a7460b5d7..0023883bd 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4384,7 +4384,21 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { /* Update the boat's position on the server, without sending an update */ boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading), false); return; - } else return; + } + else { + // Eye of Zomm needs code here to track position of the eye on server + // so that other clients see it. I could add a check here for eye of zomm + // race, to limit this code, but this should handle any client controlled + // mob that gets updates from OP_ClientUpdate + Mob *cmob = entity_list.GetMob(ppu->spawn_id); + if (cmob != nullptr) { + cmob->SetPosition(ppu->x_pos, ppu->y_pos, ppu->z_pos); + cmob->SetHeading(EQ12toFloat(ppu->heading)); + mMovementManager->SendCommandToClients(cmob, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny, nullptr, this); + cmob->CastToNPC()->SaveGuardSpot(glm::vec4(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading))); + } + } + return; } if (IsDraggingCorpse()) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 2f87a1912..5e40dfeee 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -727,7 +727,8 @@ void MobMovementManager::SendCommandToClients( float delta_heading, int anim, ClientRange range, - Client* single_client + Client* single_client, + Client* ignore_client ) { if (range == ClientRangeNone) { @@ -745,6 +746,10 @@ void MobMovementManager::SendCommandToClients( continue; } + if (ignore_client && c == ignore_client) { + continue; + } + _impl->Stats.TotalSent++; if (anim != 0) { @@ -769,6 +774,10 @@ void MobMovementManager::SendCommandToClients( continue; } + if (ignore_client && c == ignore_client) { + continue; + } + float distance = c->CalculateDistance(mob->GetX(), mob->GetY(), mob->GetZ()); bool match = false; diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 3c616cc5a..ff7e08436 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -59,7 +59,8 @@ public: float delta_heading, int anim, ClientRange range, - Client* single_client = nullptr + Client* single_client = nullptr, + Client* ignore_client = nullptr ); float FixHeading(float in); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 501cf752a..841d6fc0b 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1561,7 +1561,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove char eye_name[64]; snprintf(eye_name, sizeof(eye_name), "Eye_of_%s", caster->GetCleanName()); int duration = CalcBuffDuration(caster, this, spell_id) * 6; - caster->TemporaryPets(spell_id, nullptr, eye_name, duration); + caster->TemporaryPets(spell_id, nullptr, eye_name, duration, false); } break; }