Skip to content

Commit

Permalink
Revert "Prevent client update while on boat if boat turning (#1343)"
Browse files Browse the repository at this point in the history
This reverts commit b335568.
  • Loading branch information
Akkadius authored May 10, 2021
1 parent b335568 commit 4df19bb
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions zone/client_packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4474,8 +4474,6 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
LogError("Can't find boat for client position offset.");
}
else {
if (boat->turning) return;

// Calculate angle from boat heading to EQ heading
double theta = std::fmod(((boat->GetHeading() * 360.0) / 512.0),360.0);
double thetar = (theta * M_PI) / 180.0;
Expand Down
1 change: 0 additions & 1 deletion zone/mob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ Mob::Mob(
AI_Init();
SetMoving(false);
moved = false;
turning = false;
m_RewindLocation = glm::vec3();
m_RelativePosition = glm::vec4();

Expand Down
1 change: 0 additions & 1 deletion zone/mob.h
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,6 @@ class Mob : public Entity {
bool GetWasSpawnedInWater() const;

void SetSpawnedInWater(bool spawned_in_water);
bool turning;

protected:

Expand Down
4 changes: 0 additions & 4 deletions zone/mob_movement_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class RotateToCommand : public IMovementCommand {

if (!m_started) {
m_started = true;
mob->turning = true;
mob->SetMoving(true);

if (dist > 15.0f && rotate_to_speed > 0.0 && rotate_to_speed <= 25.0) { //send basic rotation
Expand All @@ -85,7 +84,6 @@ class RotateToCommand : public IMovementCommand {
mob->SetHeading(to);
mob->SetMoving(false);
mob_movement_manager->SendCommandToClients(mob, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium);
mob->turning = false;
return true;
}

Expand Down Expand Up @@ -1372,9 +1370,7 @@ void MobMovementManager::UpdatePathBoat(Mob *who, float x, float y, float z, Mob
{
auto eiter = _impl->Entries.find(who);
auto &ent = (*eiter);
float to = who->CalculateHeadingToTarget(x, y);

PushRotateTo(ent.second, who, to, mode);
PushSwimTo(ent.second, x, y, z, mode);
PushStopMoving(ent.second);
}
Expand Down

0 comments on commit 4df19bb

Please sign in to comment.