Skip to content

Commit

Permalink
Revert debug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Dec 16, 2024
1 parent 948e941 commit e6142ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
5 changes: 0 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'net.minetest.minetest'
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
}

task prepareAssets() {
Expand Down
6 changes: 5 additions & 1 deletion android/app/src/main/java/net/minetest/minetest/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public static File getCacheDirectory(@NonNull Context context) {
}

public static boolean isInstallValid(@NonNull Context context) {
return false;
File userDataDirectory = getUserDataDirectory(context);
return userDataDirectory.isDirectory() &&
new File(userDataDirectory, "builtin").isDirectory() &&
new File(userDataDirectory, "client").isDirectory() &&
new File(userDataDirectory, "textures").isDirectory();
}
}
34 changes: 0 additions & 34 deletions builtin/game/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,3 @@ dofile(gamepath .. "death_screen.lua")
core.after(0, builtin_shared.cache_content_ids)

profiler = nil


local function clean_vec_print(v)
return string.format("%.3f, %.3f, %.3f", v.x, v.y, v.z)
end

function haha()
for _, p in ipairs(core.get_connected_players()) do
p:set_look_horizontal(math.random() * math.pi * 4)
p:set_look_vertical(math.random() * math.pi - math.pi/2)

-- Basically the usefulness of storing the point dir relative to the
-- look dir is this:
-- > When the server sets the look dir, the server knows the correct new point dir,
-- > even before the network round-trip to the client
-- or
-- > The two values printed below are equal
-- > (assuming no look dir / point dir changes happen on the client in the meantime)

-- This works both on desktop (or with touch_use_crosshair = true) and with
-- touch_use_crosshair = false.
-- To use this test code with touch_use_crosshair = false, just put your
-- finger anywhere on the screen.

core.log("error", "server-side point dir = " .. clean_vec_print(p:get_point_dir()) .. " (before round-trip)")
core.after(0.5, function()
core.log("error", "server-side point dir = " .. clean_vec_print(p:get_point_dir()) .. " (after round-trip)")
end)
end

core.after(2, haha)
end

core.after(2, haha)

0 comments on commit e6142ec

Please sign in to comment.