NorthstarMods icon indicating copy to clipboard operation
NorthstarMods copied to clipboard

Hacked spectres causing a server crash in Attrition

Open CTalvio opened this issue 1 year ago • 7 comments

Hello! There seems to be a crash that occurs when spectres are hacked. Something goes wrong with their teamswitch.

The relevant log snippet would seem to be:


[23:29:00] [SCRIPT SV] [info] SCRIPT ERROR: [SERVER] ERROR: Squad 'player13spectreSquad' has enemies in it! 523 npc_spectre [523] doesn't like 515 npc_spectre [515]
[23:29:00] [SCRIPT SV] [info]  -> guy.SetSquad( squadName )
[23:29:00] [SCRIPT SV] [info]
CALLSTACK
*FUNCTION [SetSquad()] _utility.gnut line [3512]
*FUNCTION [NPCFollowsPlayer()] ai/_ai_utility.gnut line [82]
*FUNCTION [LeechGenericThread()] pilot/_leeching.gnut line [431]

[23:29:00] [SCRIPT SV] [info] LOCALS
[squadName] "player13spectreSquad"
[guy] ENTITY (npc_spectre [523] (NPC "npc_spectre" at <-442.471 -422.705 90.5699>))
[this] TABLE
[squadName] "player13spectreSquad"
[leader] ENTITY (player J4GE [13] (player "J4GE" at <-425.756 -397.111 90.5699>))
[npc] ENTITY (npc_spectre [523] (NPC "npc_spectre" at <-442.471 -422.705 90.5699>))
[this] TABLE
[timerCredit] 9
[leechSound] "diag_spectre_gs_LeechEnd_01_1"
[leecher] ENTITY (player J4GE [13] (player "J4GE" at <-425.756 -397.111 90.5699>))
[self] ENTITY (npc_spectre [523] (NPC "npc_spectre" at <-442.471 -422.705 90.5699>))
[this] TABLE

DIAGPRINTS

CTalvio avatar Jun 13 '23 23:06 CTalvio

Addition: It does not happen every time, and seems somewhat rare. Though this may be due to how seldom players actually bother hacking spectres in multiplayer.

CTalvio avatar Jun 14 '23 00:06 CTalvio

Crash is on client or server? What gamemode? (I guess Attrition, cause idk if you can hack spectres in other modes)

GeckoEidechse avatar Jun 14 '23 00:06 GeckoEidechse

Attrition, on server.

CTalvio avatar Jun 14 '23 00:06 CTalvio

[11:33:21] [SCRIPT SV] [info] SCRIPT ERROR: [SERVER] Attempted to call EnableNPCFlag on invalid entity
[11:33:21] [SCRIPT SV] [info]  -> guy.EnableNPCFlag( NPC_ALLOW_PATROL | NPC_ALLOW_INVESTIGATE | NPC_ALLOW_HAND_SIGNALS | NPC_ALLOW_FLEE )
[11:33:21] [SCRIPT SV] [info]
CALLSTACK
*FUNCTION [SquadHandler()] gamemodes/_gamemode_aitdm.nut line [437]

[11:33:21] [SCRIPT SV] [info] LOCALS
[@ITERATOR@] 1
[guy] ENTITY (NULL)
[@INDEX@] 0
[point] <2720.3, -10203.8, 4575.86>
[points] ARRAY
[squadAlive] true
[players] ARRAY
[team] 2
[guys] ARRAY
[this] TABLE

DIAGPRINTS

Seems there might be more than one way spectre hacking can cause issues?

CTalvio avatar Jun 15 '23 11:06 CTalvio

first one is probably caused by the player switching teams second one is a probelm in ai spawning code

F1F7Y avatar Jun 15 '23 16:06 F1F7Y

first one is probably caused by the player switching teams

This could be solved by switching all hacked spectres when the player gets switched.

second one is a probelm in ai spawning code

This one is just going to be a simple fix, couple of lines at worst

ASpoonPlaysGames avatar Jul 20 '23 09:07 ASpoonPlaysGames

first one is probably caused by the player switching teams

This could be solved by switching all hacked spectres when the player gets switched.

Could probably also just kill them off when the player switches. At least I assume that's less hassle to deal with ^^" Unless there's a need to keep them around?

GeckoEidechse avatar Jul 20 '23 12:07 GeckoEidechse