Skip to content

Commit

Permalink
add a comment and use os.time() instead of gametime
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqkz committed May 29, 2024
1 parent bb0411f commit 7521b1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mods/ctf/ctf_modebase/flags/taking.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function ctf_modebase.flag_on_punch(puncher, nodepos, node)
if ctf_modebase.flag_attempt_history[pname] == nil then
ctf_modebase.flag_attempt_history[pname] = {}
end
table.insert(ctf_modebase.flag_attempt_history[pname], minetest.get_gametime())
table.insert(ctf_modebase.flag_attempt_history[pname], os.time())

-- this is table of streaks.
-- mega streak means 4 or 5 attempt in less than 10 minutes
Expand All @@ -109,6 +109,7 @@ function ctf_modebase.flag_on_punch(puncher, nodepos, node)
end
number_of_attempts = number_of_attempts + 1
if total_time >= 60*10 then
-- if total_time was more than 10min...
break
end
end
Expand Down

0 comments on commit 7521b1e

Please sign in to comment.