2P Bots become "phantom" nodes when spawning in Ringslinger game modes
This one is a little hard to explain.
2P bots will remain present in the list of player nodes upon spawning or loading into a map; but if no human players are present, their associated struct will be seemingly removed from the game. It will be impossible to use certain lua calls such as players.iterate
to reference them, and attempting to switch to their view will result in a hall of mirror effect for the viewing client.
My working theory is that this appears to be an issue of 2P bots not having a proper player target to spawn to, and thus despawning their player and object structs when an attempt is made. Also, bots with BOT_MPAI
status are naturally unaffected by this behavior, since they do not teleport to other players.
EDIT: Okay, this is actually weirder than I thought. I have tested 2P AI on a variety of custom game modes, and it is consistently the case that ringslinger game modes cause the bots to become "phantoms". Chaos is unaffected. Battle is unaffected.
I have no explanation for this, other than something regarding ringslinger game modes' rulesets seems to be tipping off the 2P AI in some way.
2022/4/4: It is possible for a cooperative bot to spawn in the game when there are no players at all, e.g. adding the bot via a dedicated server, at which point it can trigger the "phantom node" glitch. Hitting an intermission screen while a phantom node is present can produce a segment violation.
The phantom node will not occur in non-ringslinger modes so long as one player is in the game, even if it is another bot. This is interesting to note, since cooperative bots are not expected to respawn unless they have a valid botleader
, and other bots are not a valid selection.