Skip to content

Commit

Permalink
Fix crash due to running :get_player_name() on a string
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Nov 12, 2018
1 parent c6b3fbd commit 190d7b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mods/ctf_stats/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ ctf.register_on_killedplayer(function(victim, killer)
local main, match = ctf_stats.player(killer)
if main and match then
local reward = calculateKillReward(victim, killer)
local bounty_kill = victim:get_player_name() ==
ctf_stats.current_bounty["name"] and true or false
local bounty_kill = (victim == ctf_stats.current_bounty["name"]) and true or false
showKillPoints(killer, bounty_kill, reward)
main.kills = main.kills + 1
main.score = main.score + reward
Expand Down

0 comments on commit 190d7b7

Please sign in to comment.