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:
r00ty-tc
2016-05-11 10:51:15 +01:00
parent 7e48a02398
commit de918a0f64
17 changed files with 712 additions and 532 deletions
+2 -2
View File
@@ -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();