From 8ca7780b153417f346a0f914252fcdca57600dc8 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 2 May 2026 22:44:40 +0900 Subject: [PATCH] . --- exp_scenario/module/control/extra_logging.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exp_scenario/module/control/extra_logging.lua b/exp_scenario/module/control/extra_logging.lua index cc827c1f..5241204b 100644 --- a/exp_scenario/module/control/extra_logging.lua +++ b/exp_scenario/module/control/extra_logging.lua @@ -37,8 +37,11 @@ local function on_pre_player_died(event) local player = assert(game.get_player(event.player_index)) local cause = event.cause if cause then - local by_player = event.cause.player - add_log_line("[DEATH] ", player.name, " died because of ", by_player and by_player.name or event.cause.name) + if cause.type == "character" then + add_log_line("[DEATH] ", player.name, " died because of ", (cause.player and cause.player.name) or cause.name) + else + add_log_line("[DEATH] ", player.name, " died because of ", cause.name) + end else add_log_line("[DEATH] ", player.name, " died because of unknown reason") end