mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 04:28:00 +00:00
Movement will now be handled by the movement manager instead of mob
This commit is contained in:
+11
-12
@@ -427,7 +427,7 @@ Mob::Mob(const char* in_name,
|
||||
|
||||
m_TargetRing = glm::vec3();
|
||||
|
||||
flymode = FlyMode3;
|
||||
flymode = GravityBehavior::Ground;
|
||||
DistractedFromGrid = false;
|
||||
hate_list.SetHateOwner(this);
|
||||
|
||||
@@ -1167,7 +1167,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
ns->spawn.flymode = flymode;
|
||||
|
||||
if(IsBoat()) {
|
||||
ns->spawn.flymode = 1;
|
||||
ns->spawn.flymode = GravityBehavior::Floating;
|
||||
}
|
||||
|
||||
ns->spawn.lastName[0] = '\0';
|
||||
@@ -3566,17 +3566,9 @@ bool Mob::EntityVariableExists(const char *id)
|
||||
return false;
|
||||
}
|
||||
|
||||
void Mob::SetFlyMode(uint8 flymode)
|
||||
void Mob::SetFlyMode(GravityBehavior flymode)
|
||||
{
|
||||
if(IsClient() && flymode >= 0 && flymode < 3)
|
||||
{
|
||||
this->SendAppearancePacket(AT_Levitate, flymode);
|
||||
}
|
||||
else if(IsNPC() && flymode >= 0 && flymode <= 3)
|
||||
{
|
||||
this->SendAppearancePacket(AT_Levitate, flymode);
|
||||
this->CastToNPC()->SetFlyMode(flymode);
|
||||
}
|
||||
this->flymode = flymode;
|
||||
}
|
||||
|
||||
bool Mob::IsNimbusEffectActive(uint32 nimbus_effect)
|
||||
@@ -6014,6 +6006,13 @@ float Mob::GetDefaultRaceSize() const {
|
||||
return GetRaceGenderDefaultHeight(race, gender);
|
||||
}
|
||||
|
||||
void Mob::TryFixZ(int32 z_find_offset, bool fix_client_z)
|
||||
{
|
||||
if (fix_z_timer.Check() && flymode == GravityBehavior::Ground) {
|
||||
FixZ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef BOTS
|
||||
bool Mob::JoinHealRotationTargetPool(std::shared_ptr<HealRotation>* heal_rotation)
|
||||
|
||||
Reference in New Issue
Block a user