mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Merge branch 'master' into tilemapobject/dev
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -401,6 +401,8 @@ const float SearchContext::sqrt2 = 1.414213562;
|
||||
}
|
||||
|
||||
PathfindingAutomatism::PathfindingAutomatism() :
|
||||
parentScene(NULL),
|
||||
sceneManager(NULL),
|
||||
pathFound(false),
|
||||
allowDiagonals(true),
|
||||
acceleration(400),
|
||||
@@ -422,7 +424,11 @@ PathfindingAutomatism::PathfindingAutomatism() :
|
||||
|
||||
void PathfindingAutomatism::MoveTo(RuntimeScene & scene, float x, float y)
|
||||
{
|
||||
if ( !sceneManager ) return;
|
||||
if ( parentScene != &scene ) //Parent scene has changed
|
||||
{
|
||||
parentScene = &scene;
|
||||
sceneManager = parentScene ? &ScenePathfindingObstaclesManager::managers[&scene] : NULL;
|
||||
}
|
||||
|
||||
path.clear();
|
||||
|
||||
@@ -685,4 +691,4 @@ bool PathfindingAutomatism::UpdateProperty(const std::string & name, const std::
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user