mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-04 00:02:24 +00:00
Eye of Zomm needed support in OP_ClientUpdate.
This commit is contained in:
parent
7eb2e834b1
commit
ff59255e63
@ -4384,7 +4384,21 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
|||||||
/* Update the boat's position on the server, without sending an update */
|
/* 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);
|
boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading), false);
|
||||||
return;
|
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())
|
if (IsDraggingCorpse())
|
||||||
|
|||||||
@ -727,7 +727,8 @@ void MobMovementManager::SendCommandToClients(
|
|||||||
float delta_heading,
|
float delta_heading,
|
||||||
int anim,
|
int anim,
|
||||||
ClientRange range,
|
ClientRange range,
|
||||||
Client* single_client
|
Client* single_client,
|
||||||
|
Client* ignore_client
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (range == ClientRangeNone) {
|
if (range == ClientRangeNone) {
|
||||||
@ -745,6 +746,10 @@ void MobMovementManager::SendCommandToClients(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ignore_client && c == ignore_client) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
_impl->Stats.TotalSent++;
|
_impl->Stats.TotalSent++;
|
||||||
|
|
||||||
if (anim != 0) {
|
if (anim != 0) {
|
||||||
@ -769,6 +774,10 @@ void MobMovementManager::SendCommandToClients(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ignore_client && c == ignore_client) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
float distance = c->CalculateDistance(mob->GetX(), mob->GetY(), mob->GetZ());
|
float distance = c->CalculateDistance(mob->GetX(), mob->GetY(), mob->GetZ());
|
||||||
|
|
||||||
bool match = false;
|
bool match = false;
|
||||||
|
|||||||
@ -59,7 +59,8 @@ public:
|
|||||||
float delta_heading,
|
float delta_heading,
|
||||||
int anim,
|
int anim,
|
||||||
ClientRange range,
|
ClientRange range,
|
||||||
Client* single_client = nullptr
|
Client* single_client = nullptr,
|
||||||
|
Client* ignore_client = nullptr
|
||||||
);
|
);
|
||||||
|
|
||||||
float FixHeading(float in);
|
float FixHeading(float in);
|
||||||
|
|||||||
@ -1561,7 +1561,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
char eye_name[64];
|
char eye_name[64];
|
||||||
snprintf(eye_name, sizeof(eye_name), "Eye_of_%s", caster->GetCleanName());
|
snprintf(eye_name, sizeof(eye_name), "Eye_of_%s", caster->GetCleanName());
|
||||||
int duration = CalcBuffDuration(caster, this, spell_id) * 6;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user