Fix #382 - ground mobs will swim in water instead of going to bottom surface
This commit is contained in:
parent
465b23b1bc
commit
31e13d5c58
1 changed files with 2 additions and 2 deletions
|
@ -2770,7 +2770,7 @@ void Spawn::MoveToLocation(Spawn* spawn, float distance, bool immediate, bool ma
|
|||
|
||||
if (!IsPlayer() && distance > 0.0f)
|
||||
{
|
||||
if ((IsFlyingCreature() || IsWaterCreature()) && CheckLoS(spawn))
|
||||
if ((IsFlyingCreature() || IsWaterCreature() || InWater()) && CheckLoS(spawn))
|
||||
{
|
||||
if (immediate)
|
||||
ClearRunningLocations();
|
||||
|
@ -3430,7 +3430,7 @@ void Spawn::CalculateRunningLocation(bool stop){
|
|||
{
|
||||
if (GetDistance(GetTarget()) > rule_manager.GetGlobalRule(R_Combat, MaxCombatRange)->GetFloat())
|
||||
{
|
||||
if ((IsFlyingCreature() || IsWaterCreature()) && CheckLoS(GetTarget()))
|
||||
if ((IsFlyingCreature() || IsWaterCreature() || InWater()) && CheckLoS(GetTarget()))
|
||||
AddRunningLocation(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetSpeed(), 0, false);
|
||||
else
|
||||
GetZone()->movementMgr->NavigateTo((Entity*)this, GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ());
|
||||
|
|
Loading…
Add table
Reference in a new issue