diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 9f49be516..804dce95d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7863,30 +7863,9 @@ bool Unit::isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, boo if (!IsWithinDistInMap(viewPoint,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f), is3dDistance)) return false; } - else if(GetTypeId()==TYPEID_PLAYER) // distance for show player + else if(!at_same_transport) // distance for show player/pet/creature (no transport case) { - if(u->GetTypeId()==TYPEID_PLAYER) - { - // Players far than max visible distance for player or not in our map are not visible too - if (!at_same_transport && !IsWithinDistInMap(viewPoint, _map.GetVisibilityDistance() + (inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f), is3dDistance)) - return false; - } - else - { - // Units far than max visible distance for creature or not in our map are not visible too - if (!IsWithinDistInMap(viewPoint, _map.GetVisibilityDistance() + (inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f), is3dDistance)) - return false; - } - } - else if (!GetCharmerOrOwnerGuid().IsEmpty()) // distance for show pet/charmed - { - // Pet/charmed far than max visible distance for player or not in our map are not visible too - if (!IsWithinDistInMap(viewPoint, _map.GetVisibilityDistance() + (inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f), is3dDistance)) - return false; - } - else // distance for show creature - { - // Units far than max visible distance for creature or not in our map are not visible too + // Any units far than max visible distance for viewer or not in our map are not visible too if (!IsWithinDistInMap(viewPoint, _map.GetVisibilityDistance() + (inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f), is3dDistance)) return false; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c8d141dad..dbb05e17f 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10804" + #define REVISION_NR "10805" #endif // __REVISION_NR_H__