R2NorthstarCN_Launcher icon indicating copy to clipboard operation
R2NorthstarCN_Launcher copied to clipboard

_stats.nut文件中含有错误导致服务器在游玩时崩溃,请求修复

Open AnsonSkywalker opened this issue 3 months ago • 0 comments

1.18版本在服务器(消耗战模式)中对局时偶发以下崩溃情况:

[2024-11-24] [21:13:31] [SCRIPT SV] [info] SCRIPT ERROR: [SERVER] Given object is not an entity (type = null)
[2024-11-24] [21:13:31] [SCRIPT SV] [info]  -> if ( !attacker.IsPlayer() )
[2024-11-24] [21:13:31] [SCRIPT SV] [info] 
CALLSTACK
*FUNCTION [Stats_OnPlayerDidDamage()] mp/_stats.nut line [223]
*FUNCTION [CodeCallback_DamagePlayerOrNPC()] mp/_codecallbacks.gnut line [434]

[2024-11-24] [21:13:31] [SCRIPT SV] [info] LOCALS
[attacker] NULL
[damageInfo] INSTANCE
[victim] ENTITY (npc_spectre [294] (NPC "npc_spectre" at <2517.76 -2194.05 -134.385>))
[this] TABLE
[titanDamage] unknown struct
[savedDamage] 123
[damageSourceId] 9
[damageMultiplier] 1
[attackerIsNPC] true
[attackerIsTitan] true
[attackerIsPlayer] false
[inflictor] ENTITY (npc_titan [209] (NPC "npc_titan_auto_atlas_vanguard" at <2405.12 -2123.74 -121.145>))
[attacker] ENTITY (npc_titan [209] (NPC "npc_titan_auto_atlas_vanguard" at <2405.12 -2123.74 -121.145>))
[entIsNPC] true
[entIsTitan] false
[entIsPlayer] false
[damageInfo] INSTANCE
[ent] ENTITY (npc_spectre [294] (NPC "npc_spectre" at <2517.76 -2194.05 -134.385>))
[this] TABLE

DIAGPRINTS

为了修复此BUG,请求修改...\R2Northstar\mods\Northstar.CustomServers\mod\scripts\mp下的_stats.nut文件: 第223行的 if ( !attacker.IsPlayer() ) 更改为 if ( IsValid(attacker)&&!attacker.IsPlayer() )

AnsonSkywalker avatar Nov 24 '24 13:11 AnsonSkywalker