Skip to content

Commit

Permalink
use "minetest.get_modpath" to detect the qos mod
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed May 14, 2021
1 parent 1af0a5d commit ad4e151
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ if minetest.get_modpath("bones") then
dofile(MP.."/bones.lua")
end

local QoS
-- optional mapserver-bridge stuff below
local http = QoS and QoS(minetest.request_http_api(), 2) or minetest.request_http_api()
local http = minetest.request_http_api()
if minetest.get_modpath("qos") and http then
-- use qos-wrapped http
http = QoS(http, 2)
end

if http then
-- check if the mapserver.json is in the world-folder
Expand Down

0 comments on commit ad4e151

Please sign in to comment.