Commit graph

560 commits

Author SHA1 Message Date
Claude dc81207366
test: Set weapon firing flag at spawn to test tracer visibility 2025-11-23 08:04:15 +00:00
Claude 4ad46daf90
fix: Use LocalEvents for bot weapon fire (like turrets do) and add WeaponFireMessage
- 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
2025-11-23 07:23:25 +00:00
Claude 0695a93c3a
fix: Spawn bots with weapon drawn and add 2-sec fire delay
- 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
2025-11-23 07:05:45 +00:00
Claude 10f682b72e
fix: Correct weapon draw timing and add LOS check
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
2025-11-23 06:55:29 +00:00
Claude ba0e43cfed
feat: Add bot AI toggle and spawn delay for weapon draw
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.
2025-11-23 06:39:54 +00:00
Claude 905f156e50
fix: Bot combat - draw weapon and validate targets
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.
2025-11-23 06:25:52 +00:00
Claude 88d547a88a
feat: Add faction-specific bot spawn commands
- 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
2025-11-23 05:49:50 +00:00
2revoemag 2e5b5e0dbd feat: Add bot player system for PlanetSide population
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>
2025-11-23 00:22:30 -05:00
ScrawnyRonnie 5d8d55c482 normal length 2025-11-19 08:26:34 -05:00
ScrawnyRonnie de6afa789c no motd 2025-11-19 07:13:53 -05:00
ScrawnyRonnie 79d66bbc19 different llu facility time 2025-11-10 21:03:46 -05:00
ScrawnyRonnie 919e06f72f swap iffs, disable nonfunctional items 2025-10-28 18:55:45 -04:00
ScrawnyRonnie 1282761f5c
PR #1311 When Squad Leader Leaves
When Squad Leader Leaves...
2025-10-07 10:38:42 -04:00
ScrawnyRonnie d5471e28de don't disband when sl leaves, pause weather 2025-10-06 12:40:56 -04:00
Fate-JH abb71e9f53
No Stamina No Life (#1310)
* 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
2025-10-02 01:30:55 -04:00
2revOemaG b78ee8d028 Fix authentication hang by removing runLoginTest and simplifying state transitions
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.
2025-09-21 21:05:11 -04:00
Fate-JH f88323805a
Login Safety (#1299)
* 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
2025-09-15 19:36:54 -04:00
ScrawnyRonnie 617d2532f5 cc hacking and cep, outfit login time 2025-09-11 16:00:54 -04:00
ScrawnyRonnie 42e21f7c31 allow neutral 2025-09-06 19:39:23 -04:00
ScrawnyRonnie 036d226de1 kicked player leaves outfit chat 2025-09-02 09:19:52 -04:00
ScrawnyRonnie 0ce5e1ab0c ensure different factions and reward changes 2025-09-01 21:21:22 -04:00
ScrawnyRonnie 5a5ed7425c correct points reward 2025-09-01 16:24:56 -04:00
ScrawnyRonnie bf4a911418 check once to not join chat channel again 2025-09-01 11:39:44 -04:00
ScrawnyRonnie 6ae3a71907 ants share exp with squad 2025-09-01 08:18:57 -04:00
Resaec 1556025ce6 added schedule to update materialized view outfitpoint_mv
added concurrently option to query
2025-08-31 23:43:02 +02:00
Resaec 474993a4e2 keep outfit title colorization when receiving Rank action from client 2025-08-31 23:38:52 +02:00
Resaec c0428bd3f6 add outfit (list) window event subscription handling
fix Kicked action send instead of Leaving action when players leave on their own
2025-08-31 23:37:30 +02:00
Resaec c84bf9ae74 evict players from the outfit. no longer shall you spy on our stale info!
update packet types
2025-08-31 03:05:31 +02:00
Resaec 8dcf678045 add Outfit Rank / Title updates 2025-08-31 00:01:58 +02:00
Resaec 446dee8235 Merge branch 'even-more-outfit-packets-2' into outfit 2025-08-30 22:44:18 +02:00
ScrawnyRonnie e5909bdac3 gain outfit points 2025-08-30 08:03:40 -04:00
ScrawnyRonnie 16900cd918 outfit persistence and minor fixes 2025-08-29 22:05:40 -04:00
Resaec 18dd426d13 fix outfit rank names not representing DB values
add MOTD handling
renaming OMR packet types with known uses
handling outfit promotions (setrank)
handle outfit owner changes
changing the migration to change to unique index. allows concurrent refresh of MV
2025-08-30 01:35:51 +02:00
ScrawnyRonnie ad52c8076c mostly kick from outfit 2025-08-29 15:31:26 -04:00
ScrawnyRonnie 402259e338 outfit checkpoint 2025-08-28 21:06:19 -04:00
Resaec cc16040ec3 Simplified Outfit packet usage
Outfit cleanup
More tests
2025-08-24 16:43:24 +02:00
Resaec 8de797087f OutfitListEvent cleanup 2025-08-24 03:43:50 +02:00
Resaec 72a8a7cd89 OutfitEvent rework
renamed type Unk4 to UpdateOutfitId
2025-08-24 00:24:32 +02:00
Resaec e3fe9b69bf OutfitMemberEvent now supports the two main packet types Unk0 and Unk1.
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.
2025-08-23 21:54:07 +02:00
Resaec 7528388eb1 OutfitMemberEvent
I failed horribly implementing two type conditionals, please send help
2025-08-22 01:28:27 +02:00
Resaec f3eed484af OutfitMembershipResponse rework, tests added 2025-08-21 23:04:29 +02:00
Resaec 17682c08d6 OutfitMembershipRequest all packets known!
OutfitMembershipResponse decoded, needs rework
OutfitMemberEvent decoded, needs rework
Tests reworked
2025-08-21 02:23:32 +02:00
ScrawnyRonnie b070834a8a member packets 2025-08-20 12:31:08 -04:00
Resaec d450a1b6e5 OutfitListEvent ListElementOutfit decoded 2025-08-20 00:03:17 +02:00
Resaec 308ea20dee same same, same same... uint32L? 2025-08-17 21:20:29 +02:00
Resaec d19cd744d5 extend OMR with Unk2 codec 2025-08-17 19:51:20 +02:00
Resaec f2001dbc5f random values :( 2025-08-17 18:58:36 +02:00
Resaec 868439bb21 missed some bytes of the packet, avatar_guid is wrong 2025-08-17 15:07:42 +02:00
Resaec b242c4c4bf outfit_(gu)id is uint32L (too) 2025-08-17 14:07:48 +02:00
Resaec 6e23b701a6 outfit_id is uint32L 2025-08-16 00:19:13 +02:00