Autopilot: the server plays even while the client is connected
When his owner is connected but idle for 20 s, Crashtroller keeps playing on his own in front of them. Any human gesture (keyboard, spell, attack, NPC click) pauses the AI. Added a decision debug mode.
- Commit
- 2bf59b3
- Build
- Build success (1 min) · Target worldserver
Why
First run: the owner's client reconnected 5 s after startup, the AI handed over… and the character stood still. An independent character must also play while being watched.
How
- The
CanPacketReceivehook spots deliberate client gestures (MSG_MOVE_START_*,MSG_MOVE_JUMP,CMSG_CAST_SPELL,CMSG_ATTACKSWING,CMSG_USE_ITEM,CMSG_GAMEOBJ_USE,CMSG_GOSSIP_HELLO,CMSG_QUESTGIVER_HELLO,CMSG_LOOT, flights) and timestamps the last human action. - After
FreeWill.AutopilotAfter(20 s) without action, the same brain drives the character through the client's session: the player watches their character walk, fight and turn in quests. - A human action stops the current movement at once: the human always has priority.
- Control status:
ai(no client),autopilot,human,offline. - Fix: no more false “owner left” while the character is loading.
FreeWill.Debugtraces decisions (path, distance, line of sight, movement type) without repetition.