diff --git a/mods/ITEMS/mcl_bows/mod.conf b/mods/ITEMS/mcl_bows/mod.conf index 7b174826a..0fdd666a3 100644 --- a/mods/ITEMS/mcl_bows/mod.conf +++ b/mods/ITEMS/mcl_bows/mod.conf @@ -1,6 +1,6 @@ name = mcl_bows author = Arcelmi description = This mod adds bows and arrows for MineClone 2. -depends = controls, mcl_particles, mcl_enchanting, mcl_init, mcl_util, mcl_shields +depends = controls, mcl_particles, mcl_enchanting, mcl_init, mcl_util, mcl_shields, mcl_fovapi optional_depends = awards, mcl_achievements, mcl_core, mcl_mobitems, playerphysics, doc, doc_identifier, mesecons_button diff --git a/mods/ITEMS/mcl_spyglass/mod.conf b/mods/ITEMS/mcl_spyglass/mod.conf index c13b281e1..6a78e86a5 100644 --- a/mods/ITEMS/mcl_spyglass/mod.conf +++ b/mods/ITEMS/mcl_spyglass/mod.conf @@ -1,4 +1,4 @@ name = mcl_spyglass author = NO11 description = This mod adds a spyglass, which is an item that can be used for zooming in on specific locations. -depends = mcl_core, controls +depends = mcl_core, controls, mcl_fovapi diff --git a/mods/PLAYER/mcl_fovapi/init.lua b/mods/PLAYER/mcl_fovapi/init.lua index ace5ca96f..153cd47a9 100644 --- a/mods/PLAYER/mcl_fovapi/init.lua +++ b/mods/PLAYER/mcl_fovapi/init.lua @@ -60,6 +60,10 @@ function mcl_fovapi.register_modifier(name, fov_factor, time, is_multiplier, exc end +minetest.register_on_respawnplayer(function(player) + mcl_fovapi.remove_all_modifiers(player:get_player_name()) +end) + function mcl_fovapi.apply_modifier(player, modifier_name) if player == nil then return @@ -162,6 +166,9 @@ function mcl_fovapi.remove_all_modifiers(player) end player:set_fov(0, false, 0) + if mcl_fovapi.registered_modifiers[modifier_name].on_end ~= nil then + mcl_fovapi.registered_modifiers[modifier_name].on_end(player) + end end diff --git a/mods/PLAYER/mcl_sprint/mod.conf b/mods/PLAYER/mcl_sprint/mod.conf index 0d20f80a3..9b9a7366b 100644 --- a/mods/PLAYER/mcl_sprint/mod.conf +++ b/mods/PLAYER/mcl_sprint/mod.conf @@ -1,4 +1,5 @@ name = mcl_sprint author = GunshipPenguin -description = Allows the player to sprint by pressing the “Use” key (default: E). -depends = mcl_playerinfo, playerphysics, mcl_hunger +description = Allows the player to sprint by pressing the “AUX” key (default: E). +depends = mcl_playerinfo, playerphysics, mcl_hunger, mcl_fovapi +optional = mcl_bows \ No newline at end of file