When the party leader exits a cell, the other player receives ownership of all NPCs in that cell, and with that calls SetRemote(false) on every one of them which unlocks NPC AI behavior.
Immediately afterward, most if not all NPCs begin spamming "Unequip" and "combatStanceStop" (and possibly others) on themselves. This animation spam sometimes prevents NPCs from attacking players, since they are stuck repeatedly attempting to "Unequip" with no effect. Once the party member(s) follow the leader into the new cell, everything usually returns to normal (as AI is disabled again).
For debugging, you can insert spdlog::info("Running action \"{}\" on {:X}", action.EventName.c_str(), action.ActorId) on this line to see the animation spam for yourself.
More context and potential solution:
Screenshot from #coding
When the party leader exits a cell, the other player receives ownership of all NPCs in that cell, and with that calls
SetRemote(false)on every one of them which unlocks NPC AI behavior.Immediately afterward, most if not all NPCs begin spamming "Unequip" and "combatStanceStop" (and possibly others) on themselves. This animation spam sometimes prevents NPCs from attacking players, since they are stuck repeatedly attempting to "Unequip" with no effect. Once the party member(s) follow the leader into the new cell, everything usually returns to normal (as AI is disabled again).
For debugging, you can insert
spdlog::info("Running action \"{}\" on {:X}", action.EventName.c_str(), action.ActorId)on this line to see the animation spam for yourself.More context and potential solution:
Screenshot from #coding