Core/Objects:
* store liquid status lookups from UpdatePositionData in a member and draw liquid status information from it instead of doing extra vmap lookups. This also fixes collision height based liquid status states which was leading to false positive movement speed selection for creatures * remove redundant IsUnderWater helper override from player class as our object based liquid status also considers collision height
This commit is contained in:
1 parent
9bf01799f0
commit
d31f19265d
5 files changed
+8
-11
No files matched your search
@@ -3312,12 +3312,12 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
|
||||
bool Unit::IsInWater() const
|
||||
{
|
||||
return GetMap()->IsInWater(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
return GetLiquidStatus() & (LIQUID_MAP_IN_WATER | LIQUID_MAP_UNDER_WATER);
|
||||
}
|
||||
|
||||
bool Unit::IsUnderWater() const
|
||||
{
|
||||
return GetMap()->IsUnderWater(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ());
|
||||
return GetLiquidStatus() & LIQUID_MAP_UNDER_WATER;
|
||||
}
|
||||
|
||||
void Unit::ProcessPositionDataChanged(PositionFullTerrainStatus const& data)
|
||||
|
||||
Reference in new issue
Block a user