Browse Source

Use minetest.get_modpath() in CSM if possible.

master
luk3yx 3 weeks ago
parent
commit
46977b593e
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      init.lua

+ 7
- 1
init.lua View File

@@ -8,7 +8,13 @@ local modname = minetest.get_current_modname()

-- If this is running as a CSM (improper installation), load the CSM code.
if INIT == 'client' then
dofile(modname .. ':csm/init.lua')
local modpath
if minetest.get_modpath then
modpath = minetest.get_modpath(modname)
else
modpath = modname .. ':'
end
dofile(modpath .. 'csm/init.lua')
return
end


Loading…
Cancel
Save