From 1831da8496227f2ee644fefe3358a27ce7773a85 Mon Sep 17 00:00:00 2001 From: David Leal Date: Sun, 6 Jun 2021 08:28:03 -0500 Subject: [PATCH 1/4] Reset sprint on new match (#893) --- mods/other/sprint/init.lua | 7 +++++++ mods/other/sprint/mod.conf | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mods/other/sprint/init.lua b/mods/other/sprint/init.lua index c1dd642..b77e648 100644 --- a/mods/other/sprint/init.lua +++ b/mods/other/sprint/init.lua @@ -35,6 +35,13 @@ local function setSprinting(player, info, sprinting) end end +ctf_match.register_on_new_match(function() + for pname in pairs(players) do + local player = minetest.get_player_by_name(pname) + players[player:get_player_name()].stamina = STAMINA_MAX + end +end) + minetest.register_globalstep(function(dtime) for name, info in pairs(players) do local player = minetest.get_player_by_name(name) diff --git a/mods/other/sprint/mod.conf b/mods/other/sprint/mod.conf index 995b058..e58b0f1 100644 --- a/mods/other/sprint/mod.conf +++ b/mods/other/sprint/mod.conf @@ -1,3 +1,3 @@ name = sprint -depends = medkits, physics +depends = medkits, physics, ctf_match optional_depends = hudbars From ecd8cbb6c70239c3cc5b1a2e42933cf613440feb Mon Sep 17 00:00:00 2001 From: _Lucy <80708819+Lucyucy@users.noreply.github.com> Date: Thu, 10 Jun 2021 19:53:47 +0200 Subject: [PATCH 2/4] Update random messages (#894) * Update random messages Edits 2 messages, adds 1 message * Update init.lua Co-authored-by: LoneWolfHT --- mods/other/random_messages/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/other/random_messages/init.lua b/mods/other/random_messages/init.lua index 26c3fd0..c337138 100644 --- a/mods/other/random_messages/init.lua +++ b/mods/other/random_messages/init.lua @@ -52,11 +52,11 @@ function random_messages.read_messages() "Use medkits to gradually restore your health.", "Moving or fighting while using medkits will interrupt the healing process.", "Knights have a slight damage bonus (up to 1.5 hp) when attacking with swords.", - "Gain more score by killing more than you die, by healing teammates as a medic, or by capturing the flag.", + "Gain more score by killing enemies, healing teammates as a medic, or by capturing the flag.", "You gain more score the better the opponent you defeat.", "Find weapons in chests or mine and use furnaces to make stronger swords.", "Players are immune to attack for 5 seconds after they respawn.", - "Access the pro section of the chest by achieving a 10k+ score, killing 3 people for every 2 deaths and capture the flag 10 times.", + "Access the pro section of the chest by achieving a 10k+ score, killing 3 people for every 2 deaths and capturing the flag 10 times.", "Use team doors (steel) to stop the enemy walking into your base.", "Craft 6 cobbles and 1 steel ingot together to make reinforced cobble.", "Sprint by pressing the fast key (E) when you have stamina.", @@ -80,6 +80,7 @@ function random_messages.read_messages() "Hitting your enemy does more damage than not hitting them.", "Press right mouse button or double-tap the screen to activate scope while wielding a sniper rifle.", "Medics can dig pillars by right clicking the base of one with their paxel.", + "Use `/help all` to see all available commands.", } end From 8c944a57afba9a606b980ced1ab29a20d14c4593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Sun, 20 Jun 2021 00:07:26 +0200 Subject: [PATCH 3/4] Paxel: Ignore vertical distance, lower dist limit (#883) * Paxel: Ignore vertical distance, lower dist. limit * Update medic.lua Co-authored-by: LoneWolfHT --- mods/ctf/ctf_classes/medic.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ctf/ctf_classes/medic.lua b/mods/ctf/ctf_classes/medic.lua index 7a198a5..de07c13 100644 --- a/mods/ctf/ctf_classes/medic.lua +++ b/mods/ctf/ctf_classes/medic.lua @@ -138,7 +138,7 @@ minetest.override_item("ctf_bandages:bandage", { local diggers = {} local DIG_COOLDOWN = 30 -local DIG_DIST_LIMIT = 50 +local DIG_DIST_LIMIT = 10 local DIG_SPEED = 0.1 local function isdiggable(name) @@ -171,7 +171,10 @@ local function remove_pillar(pos, pname) minetest.dig_node(pos) if player and diggers[pname] and type(diggers[pname]) ~= "table" then - if vector.distance(player:get_pos(), pos) <= DIG_DIST_LIMIT then + local distance = vector.subtract(player:get_pos(), pos) + -- Ignore vertical distance + distance.y = 0 + if vector.length(distance) <= DIG_DIST_LIMIT then pos.y = pos.y + 1 minetest.after(DIG_SPEED, remove_pillar, pos, pname) else From cd6c8e74f3d594efc2a2fbd53af88c4a6a669f2c Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Mon, 21 Jun 2021 01:33:02 +0200 Subject: [PATCH 4/4] Fix bug in map selection (#902) --- mods/ctf/ctf_map/ctf_map_core/schem_map.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mods/ctf/ctf_map/ctf_map_core/schem_map.lua b/mods/ctf/ctf_map/ctf_map_core/schem_map.lua index 2286a0c..e48cb18 100644 --- a/mods/ctf/ctf_map/ctf_map_core/schem_map.lua +++ b/mods/ctf/ctf_map/ctf_map_core/schem_map.lua @@ -277,15 +277,14 @@ local function select_map() end else -- Choose next map index, but don't select the same one again - if ctf_map.map then - idx = math.random(#ctf_map.available_maps - 1) + if ctf_map.map and #ctf_map.available_maps > 1 then + idx = math.random(1, #ctf_map.available_maps - 1) if idx >= ctf_map.map.idx then idx = idx + 1 end else - idx = math.random(#ctf_map.available_maps) + idx = math.random(1, #ctf_map.available_maps) end - ctf_map.next_idx = (idx % #ctf_map.available_maps) + 1 end return idx end