1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-30 23:17:53 +02:00

Fix a missing check when players get killed by empty vehicle, for example while its still rolling

This commit is contained in:
blubFisch 2022-10-10 22:24:17 +01:00
parent 4da6721e7e
commit be09971901

View File

@ -59,7 +59,7 @@ local function on_player_died(event)
if cause.type == 'car' then
local driver = cause.get_driver()
if driver.player then
if driver and driver.player then
game.print(player.name .. tag .. ' was killed by ' .. driver.player.name .. ' ' .. player.tag .. '.', message_color)
return
end