mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 13:09:50 -04:00
[Core/Maps] Activate creatures and objects during opening cinematics and other flyby
cameras (sunwell etc). Requires re-running map extractor to extract camera m2 files from data files. These are very small. Closes #4755 Closes #16772
This commit is contained in:
@@ -1470,9 +1470,20 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
float WorldObject::GetGridActivationRange() const
|
||||
{
|
||||
if (ToPlayer())
|
||||
{
|
||||
if (ToPlayer()->IsOnCinematic())
|
||||
return DEFAULT_VISIBILITY_INSTANCE;
|
||||
return GetMap()->GetVisibilityRange();
|
||||
}
|
||||
else if (ToCreature())
|
||||
return ToCreature()->m_SightDistance;
|
||||
else if (ToDynObject())
|
||||
{
|
||||
if (isActiveObject())
|
||||
return GetMap()->GetVisibilityRange();
|
||||
else
|
||||
return 0.0f;
|
||||
}
|
||||
else
|
||||
return 0.0f;
|
||||
}
|
||||
@@ -1493,6 +1504,8 @@ float WorldObject::GetSightRange(const WorldObject* target) const
|
||||
{
|
||||
if (target && target->isActiveObject() && !target->ToPlayer())
|
||||
return MAX_VISIBILITY_DISTANCE;
|
||||
else if (ToPlayer()->IsOnCinematic())
|
||||
return DEFAULT_VISIBILITY_INSTANCE;
|
||||
else
|
||||
return GetMap()->GetVisibilityRange();
|
||||
}
|
||||
@@ -1502,6 +1515,11 @@ float WorldObject::GetSightRange(const WorldObject* target) const
|
||||
return SIGHT_RANGE_UNIT;
|
||||
}
|
||||
|
||||
if (ToDynObject() && isActiveObject())
|
||||
{
|
||||
return GetMap()->GetVisibilityRange();
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user