attempt to fix "doublescore" bug

This commit is contained in:
chmodsayshello 2022-10-22 18:24:00 +00:00
parent 71374344ab
commit 85449fc076
2 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,7 @@ arena_lib.register_minigame("the_bridge", {
},
temp_properties = {
finished = false,
scoring = false,
},
in_game_physics = {

View File

@ -43,6 +43,9 @@ function after_goal(arena) --global because its called once outside of this file
gain = 2.0,
})
end
time = os.clock()
while (os.clock() < time +3) do end
arena.scoring = false
end
local goalfunc = function(pos, node, player)
@ -52,6 +55,7 @@ local goalfunc = function(pos, node, player)
nodename = node.name
if nodename == "the_bridge:goal_area_red" then
if arena.scoring then return end
local temp = arena.teams[arena.team_id_red].goals +1
arena.teams[arena.team_id_red].goals = temp
if temp > 4 and arena.in_game then
@ -63,6 +67,7 @@ local goalfunc = function(pos, node, player)
after_goal(arena)
elseif nodename == "the_bridge:goal_area_blue" then
if arena.scoring then return end
local temp = arena.teams[arena.team_id_blue].goals +1
arena.teams[arena.team_id_blue].goals = temp
if temp > 4 and arena.in_game then