Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Oct 20, 2023
1 parent bae190c commit aa89b2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mods/ctf/ctf_modebase/features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ctf_core.testing = {
-- -so I don't need to restart for every little change
-- pkd, kd_diff, actual_kd_diff, players_diff, best_kd, worst_kd, total_players, worst_players, best_players
--ctf_core.testing.
testing = true,
test = function(
pkd, kd_diff, actual_kd_diff, players_diff, best_kd, worst_kd, total_players, worst_players, best_players
)
Expand Down Expand Up @@ -386,7 +387,8 @@ return {
local player_rankings = recent_rankings.get(player) --[pteam.."_score"]

if ctf_core.testing.testing then
if not rem_team or math.max(player_rankings[rem_team.."_kills"], player_rankings[rem_team.."_deaths"]) <= 6 then
if not rem_team or
math.max(player_rankings[rem_team.."_kills"] or 0, player_rankings[rem_team.."_deaths"] or 0) <= 6 then
player_rankings = rankings:get(player) or {}
else
player_rankings.kills = player_rankings[rem_team.."_kills"] or 0
Expand Down

0 comments on commit aa89b2d

Please sign in to comment.