diff --git a/src/libs/eval.nim b/src/libs/eval.nim index 29423d7c..68063da0 100644 --- a/src/libs/eval.nim +++ b/src/libs/eval.nim @@ -223,7 +223,9 @@ proc loadModule*(i: Interpreter, fileName, code: string, var module: PSym let moduleName = fileName.splitFile.name for iface in i.graph.ifaces: - if iface.module != nil and iface.module.name.s == moduleName: + if iface.module != nil and iface.module.name.s == moduleName and + fileName == toFullPath(i.graph.config, iface.module.info): + module = iface.module break diff --git a/src/nodes/build_node.nim b/src/nodes/build_node.nim index a051ae63..951343bc 100644 --- a/src/nodes/build_node.nim +++ b/src/nodes/build_node.nim @@ -200,13 +200,15 @@ gdobj BuildNode of VoxelTerrain: self.model.sight_query = query method process(delta: float) = - if ?self.model and self.model.code.owner == state.worker_ctx_name: - self.model.transform_value.pause self.transform_zid: - self.model.transform = self.transform - if get_mono_time() > self.toggle_error_highlight_at: - self.error_highlight_on = not self.error_highlight_on - self.toggle_error_highlight_at = get_mono_time() + error_flash_time - self.set_highlight() + if ?self.model: + if self.model.code.owner == state.worker_ctx_name: + self.model.transform_value.pause self.transform_zid: + self.model.transform = self.transform + + if get_mono_time() > self.toggle_error_highlight_at: + self.error_highlight_on = not self.error_highlight_on + self.toggle_error_highlight_at = get_mono_time() + error_flash_time + self.set_highlight() proc setup* = let was_skipping_join = dont_join