mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Avoids the possible incorrect swimming state when bots coming ashore (#1051)
Improves the check for when in/under water, avoiding the possible incorrect swimming state when bots coming ashore (shortly swimming in air).
This commit is contained in:
parent
fe21dfe48e
commit
13a4dde643
@ -24,5 +24,7 @@ bool IsSwimmingValue::Calculate()
|
|||||||
if (!target)
|
if (!target)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return target->IsUnderWater() || (target->GetLiquidData().Status == LIQUID_MAP_IN_WATER && target->CanSwim());
|
int8 targetInLiquidState = target->GetLiquidData().Status;
|
||||||
|
|
||||||
|
return targetInLiquidState == LIQUID_MAP_UNDER_WATER || (targetInLiquidState == LIQUID_MAP_IN_WATER && target->CanSwim());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user