- Switch from AvatarEvents to LocalEvents for ChangeFireState messages
- This matches how turrets broadcast their firing state
- Add WeaponFireMessage broadcast for each shot to enable client tracer rendering
- Both changes should help with tracer visibility
- Set DrawnSlot=2 BEFORE LoadPlayer packet so weapon is visible from spawn
- Remove ObjectHeld broadcast (weapon state is in initial spawn packet)
- Increase recognition time to minimum 2 seconds before firing
- Add TODO documenting LOS/wall shooting limitation for POC
Weapon draw fix:
- Spawn bots with hands down (don't set DrawnSlot on spawn)
- After 2 second delay, SET DrawnSlot=2 then broadcast ObjectHeld
- This fixes the visual bug where weapon appeared out, then went away
Line-of-sight check:
- Added Sidedness.equals() check to findTarget and target validation
- Uses same logic as turrets - bot and target must be on same side
of walls (both inside or both outside a building)
- Prevents bots from shooting through walls
New commands:
- !boton - Enable bot AI (targeting, movement, combat)
- !botoff - Disable bot AI (bots stand still, passive)
Bot AI defaults to OFF so you can spawn multiple bots then activate.
Fixes:
- 2 second delay before weapon draw (lets client fully load)
- Weapon draw broadcast delayed until readyTick passes
- weaponInHand in PlayerState reflects actual drawn state
This fixes the visual bug where weapon appeared to shoot from bot's back
because the draw happened before client loaded the model.
Root cause: DrawnSlot was never set, so getWeapon() always returned None
and bots couldn't shoot.
Changes:
- Set DrawnSlot = 2 (suppressor) on spawn and respawn
- Broadcast ObjectHeld so clients see weapon drawn
- Add logging: "has drawn", "acquired target", "is attacking"
- Validate target.Actor before sending Vitality.Damage
- Fix startFiring() to accept target name for logging
The two-force accuracy system (adjustment vs recoil from GAME_FEEL.md)
was already implemented but never triggered due to this bug.
- Add !botnc, !bottr, !botvs commands to spawn bots of specific factions
- Modify customCommandBot to accept faction parameter
- !bot now spawns bot of player's own faction (maintains backwards compat)
- Display faction name in spawn confirmation message
Fixes: bots were spawning as player's faction instead of specified faction
Initial implementation of server-side bots that:
- Spawn as real Player entities with full equipment
- Move and broadcast position updates (10 tick/sec)
- Take damage and die with backpack drops
- Respawn after death
- Combat system with accuracy model (adjustment vs recoil)
Includes project documentation in bot-docs/ and Claude agent helpers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* reverse order of protocol so that the avatar state (normal, csr) is checked first and then it calls back up to the specific avatar to perform the action
* reusing prior logic
* changed progress of damage inherit from 4->3->2->1->0 to [4,3,2]->1, 1->0
This addresses the 'stuck at authenticating' issue introduced in 662844b845, where runLoginTest() disconnected clients early if the 'PSForever' test account was missing or DB query failed.
Changes:
- Removed runLoginTest() method entirely.
- In beforeLoginBehavior, transition directly to accountLoginBehavior on ReceiveIPAddress.
- Removed context.become(idlingBehavior) calls in handleGamePktDuringLogin to prevent ignoring login packets.
Tested: Login now proceeds reliably without hangs, while preserving 662844b features like token expiration and state-based flow. THIS IS A HEAVILY ASSISTED AI COMMIT.
* differentiated between login test idling and post-message-received idling; added a messaging buffer that gets emptied during the transition to normal login behavior
* isolated behavior
Support for Unk0's subtypes Unk0 and Padding have been removed in favour of the main type.
Should be reimplemented at some point, but I don't know how yet.