Add check to not rebake while navmesh is baking
parent
c3ead0cdaa
commit
057aedca30
|
@ -59,10 +59,13 @@ public partial class DynamicDoor : StaticBody2D
|
|||
{
|
||||
// rebake navmesh so NPCs can correctly travel conditionally
|
||||
GD.Print("Dynamic door updated; rebaking navmeshes...");
|
||||
if (!navmesh.IsBaking())
|
||||
{
|
||||
navmesh.BakeNavigationPolygon();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Open()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue