Compare commits
No commits in common. "b05cad5633e6a9a15a606e23ffb7e414a1d1d619" and "d05b22e38d5a5b72838cf9e326ca04f9a56a9eae" have entirely different histories.
b05cad5633
...
d05b22e38d
5 changed files with 9 additions and 19 deletions
|
@ -138,7 +138,7 @@ minetest.override_item("ctf_bandages:bandage", {
|
|||
|
||||
local diggers = {}
|
||||
local DIG_COOLDOWN = 30
|
||||
local DIG_DIST_LIMIT = 10
|
||||
local DIG_DIST_LIMIT = 50
|
||||
local DIG_SPEED = 0.1
|
||||
|
||||
local function isdiggable(name)
|
||||
|
@ -171,10 +171,7 @@ local function remove_pillar(pos, pname)
|
|||
minetest.dig_node(pos)
|
||||
|
||||
if player and diggers[pname] and type(diggers[pname]) ~= "table" then
|
||||
local distance = vector.subtract(player:get_pos(), pos)
|
||||
-- Ignore vertical distance
|
||||
distance.y = 0
|
||||
if vector.length(distance) <= DIG_DIST_LIMIT then
|
||||
if vector.distance(player:get_pos(), pos) <= DIG_DIST_LIMIT then
|
||||
pos.y = pos.y + 1
|
||||
minetest.after(DIG_SPEED, remove_pillar, pos, pname)
|
||||
else
|
||||
|
|
|
@ -277,14 +277,15 @@ local function select_map()
|
|||
end
|
||||
else
|
||||
-- Choose next map index, but don't select the same one again
|
||||
if ctf_map.map and #ctf_map.available_maps > 1 then
|
||||
idx = math.random(1, #ctf_map.available_maps - 1)
|
||||
if ctf_map.map then
|
||||
idx = math.random(#ctf_map.available_maps - 1)
|
||||
if idx >= ctf_map.map.idx then
|
||||
idx = idx + 1
|
||||
end
|
||||
else
|
||||
idx = math.random(1, #ctf_map.available_maps)
|
||||
idx = math.random(#ctf_map.available_maps)
|
||||
end
|
||||
ctf_map.next_idx = (idx % #ctf_map.available_maps) + 1
|
||||
end
|
||||
return idx
|
||||
end
|
||||
|
|
|
@ -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 enemies, healing teammates as a medic, or by capturing the flag.",
|
||||
"Gain more score by killing more than you die, by 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 and either killing 3 people for every 2 deaths and capturing the flag 10 times or killing as many people as you die, capturing the flag on every 3rd attempt and at least 30 times.",
|
||||
"Access the pro section of the chest by achieving a 10k+ score and either killing 3 people for every 2 deaths and capture the flag 10 times or killing as many people as you die, capturing the flag on every 3rd attempt and at least 30 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,7 +80,6 @@ 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
|
||||
|
||||
|
|
|
@ -36,13 +36,6 @@ 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)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
name = sprint
|
||||
depends = medkits, physics, ctf_match
|
||||
depends = medkits, physics
|
||||
optional_depends = hudbars
|
||||
|
|
Loading…
Reference in a new issue