Skip to content

Commit

Permalink
Only reuse module if the absolute path matches
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrw committed Dec 8, 2023
1 parent 7e8d30c commit 26d2f01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/libs/eval.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 9 additions & 7 deletions src/nodes/build_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26d2f01

Please sign in to comment.