[Core/Maps] Activate creatures and objects during opening cinematics
As well as other flyby cameras (like sunwell etc) Requires re-running map extractor to extract camera m2 files from data files. These are very small.
This commit is contained in:
1 parent
aec309a533
commit
527654b512
18 files changed
+859
-12
No files matched your search
@@ -1655,9 +1655,20 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
|
||||
float WorldObject::GetGridActivationRange() const
|
||||
{
|
||||
if (ToPlayer())
|
||||
{
|
||||
if (ToPlayer()->GetCinematicMgr()->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;
|
||||
}
|
||||
@@ -1678,6 +1689,8 @@ float WorldObject::GetSightRange(const WorldObject* target) const
|
||||
{
|
||||
if (target && target->isActiveObject() && !target->ToPlayer())
|
||||
return MAX_VISIBILITY_DISTANCE;
|
||||
else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic())
|
||||
return DEFAULT_VISIBILITY_INSTANCE;
|
||||
else
|
||||
return GetMap()->GetVisibilityRange();
|
||||
}
|
||||
@@ -1687,6 +1700,9 @@ 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