Fix crash due to running :get_player_name() on a string
Fixes #239. @ClobberXD
This commit is contained in:
parent
c6b3fbd0ce
commit
190d7b7e55
1 changed files with 1 additions and 2 deletions
|
@ -346,8 +346,7 @@ ctf.register_on_killedplayer(function(victim, killer)
|
||||||
local main, match = ctf_stats.player(killer)
|
local main, match = ctf_stats.player(killer)
|
||||||
if main and match then
|
if main and match then
|
||||||
local reward = calculateKillReward(victim, killer)
|
local reward = calculateKillReward(victim, killer)
|
||||||
local bounty_kill = victim:get_player_name() ==
|
local bounty_kill = (victim == ctf_stats.current_bounty["name"]) and true or false
|
||||||
ctf_stats.current_bounty["name"] and true or false
|
|
||||||
showKillPoints(killer, bounty_kill, reward)
|
showKillPoints(killer, bounty_kill, reward)
|
||||||
main.kills = main.kills + 1
|
main.kills = main.kills + 1
|
||||||
main.score = main.score + reward
|
main.score = main.score + reward
|
||||||
|
|
Loading…
Reference in a new issue