mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 15:27:47 -04:00
Core/Maps - Improvements to Cinematic function
- Moves to own class for reading, storage and player subclass - Proper destruction handling for player (ensure cinematic is ended) - Timeout for cinematic if it reaches past the end without completing - boost::filesystem::path used for path/filename transform - Correct for assert trigger under certain circumstances - Other changes previously suggested
This commit is contained in:
@@ -1471,7 +1471,7 @@ float WorldObject::GetGridActivationRange() const
|
||||
{
|
||||
if (ToPlayer())
|
||||
{
|
||||
if (ToPlayer()->IsOnCinematic())
|
||||
if (ToPlayer()->GetCinematicMgr()->IsOnCinematic())
|
||||
return DEFAULT_VISIBILITY_INSTANCE;
|
||||
return GetMap()->GetVisibilityRange();
|
||||
}
|
||||
@@ -1504,7 +1504,7 @@ float WorldObject::GetSightRange(const WorldObject* target) const
|
||||
{
|
||||
if (target && target->isActiveObject() && !target->ToPlayer())
|
||||
return MAX_VISIBILITY_DISTANCE;
|
||||
else if (ToPlayer()->IsOnCinematic())
|
||||
else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic())
|
||||
return DEFAULT_VISIBILITY_INSTANCE;
|
||||
else
|
||||
return GetMap()->GetVisibilityRange();
|
||||
|
||||
Reference in New Issue
Block a user