From 79e1ba9c6869bb27159fc56a38089205100da1cc Mon Sep 17 00:00:00 2001 From: Andrey Lemin Date: Wed, 8 Apr 2020 20:18:42 +0300 Subject: [PATCH] Fix validate_spatial method --- sceneObjects/DMeshSO.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sceneObjects/DMeshSO.cs b/sceneObjects/DMeshSO.cs index 42e1485..20c3378 100644 --- a/sceneObjects/DMeshSO.cs +++ b/sceneObjects/DMeshSO.cs @@ -349,7 +349,7 @@ void on_mesh_changed(bool bInvalidateSpatial = true, bool bInvalidateDecomp = tr void validate_spatial() { - if ( enable_spatial && spatial == null ) { + if (enable_spatial && (spatial == null || !spatial.IsValid)) { spatial = new DMeshAABBTree3(mesh); spatial.Build(); }