Skip to content

implement weapon projectile#8

Merged
Krilliac merged 2 commits intomainfrom
claude/implement-weapon-projectile-HBQEU
Mar 1, 2026
Merged

implement weapon projectile#8
Krilliac merged 2 commits intomainfrom
claude/implement-weapon-projectile-HBQEU

Conversation

@Krilliac
Copy link
Copy Markdown
Owner

@Krilliac Krilliac commented Mar 1, 2026

No description provided.

- Create ProjectileManager class with full projectile lifecycle management,
  physics simulation (gravity, collision detection), hitscan raycasting with
  accuracy spread, explosive detonation with AoE damage, and hit zone
  determination based on relative hit position

- Implement Weapon::SpawnProjectile() with complete hitscan and physical
  projectile support, looking up ballistic properties from WeaponDatabase
  to determine fire mode, projectile speed, explosion radius, and damage
  source type. Broadcasts fire events to all clients via NetworkManager

- Integrate ProjectileManager into GameServer lifecycle (init, tick, shutdown)

- Implement DamageSystem::BroadcastDamageEvent() and BroadcastKillEvent()
  to serialize and broadcast damage/kill events to all clients via packets

- Implement ChatManager profanity filtering with configurable word list and
  rate limiting (5 messages per 10 second window per client)

- Implement MapManager::LoadGeometry() with binary file parsing, UE3 package
  magic detection, and bounds extraction with fallback to definition bounds

- Implement 60+ ScriptHost stubs including player management (kick, ban,
  get/set position/health/team), server info (player count, map, uptime),
  config management (get/set/reload/save via ConfigManager), game state
  (start/end/pause match, change map), weapon/inventory management,
  statistics tracking, network info (ping, packets/sec), debug drawing
  (broadcast shapes via network packets), and chat functions

- Add PlayerManager statistics tracking (kills, deaths, score per player)
- Add TeamManager methods (GetTeamName, SetTeamScore, SetTeamMaxSize, GetTeamSize)
- Add NetworkManager::GetPacketsPerSecond()
- Add ClientConnection::GetPing()/UpdatePing()

https://claude.ai/code/session_01Kf3WQeGBrrK4ZRt5gQJs8X
ScriptHelpers.cs: Complete rewrite with full native bindings for all
ScriptHost exports (debug drawing, entity management, weapon/inventory,
game state, config, file I/O, EAC memory, network/performance).
Replaced chat-stub debug draw methods with actual DebugDrawLine/Sphere/
Text/Arrow/Box native calls. Added missing wrapper methods used by
scripts (OnChatCommand, ChatTo, TeleportPlayer, DrawLine, etc).

Fixed 17 broken disabled scripts:
- FactionBalancer: replaced non-existent GetPlayerCountsPerTeam/
  GetPlayerLatencies with per-player iteration via ScriptHelpers API
- EacMemoryAllocator/Reader/Writer: fixed calls to non-existent
  methods (AllocateRemoteMemory -> AllocMem, WriteRemoteMemory ->
  WriteMem, ReadRemoteMemory -> ReadMem, SendChatToPlayer -> ChatTo)
- DevInfoOverlay: fixed GetMetricAverage -> Avg, DebugDrawText -> DrawText
- DevPathVisualizer: fixed DebugDrawLine -> DrawLine
- GameModeAndScoreOverrides: removed conflicting Native class, used
  ScriptHelpers.CfgSetInt/CfgGetInt, ScheduleOnce
- LogLevelController: fixed ProcessChatCommand -> ProcessChatCmd,
  removed non-existent SetLogLevel native, uses config writes instead
- MetricsReporter: fixed BroadcastChat -> ChatAll, ScheduleCallback
  -> ScheduleRecurring
- MovementValidator: fixed HasAdminLevel -> IsOnline, TeleportPlayer
  -> ScriptHelpers.TeleportPlayer
- OnPlayerJoinWelcomeAndCommands: fixed OnChatCommand usage
- PersistentLeaderboard: fixed LoadData/SaveData -> Load/Save
- Snapshotter: replaced non-existent GetPlayerScores/GetConnectedPlayers
  with proper player iteration via ScriptHelpers API
- StateValidator: fixed SendChatToPlayer -> ChatTo
- All scripts: removed duplicate Native static classes, added proper
  Cleanup() methods, use ScriptHelpers.OnEvent/OffEvent for registration

Added 9 new example scripts demonstrating all ScriptHost systems:
- AdminToolkit: 23 admin commands (kick/ban/heal/tp/give/map/mode/etc)
- WeaponAndDamageTracker: per-weapon kill stats with persistence
- KillStreakAnnouncer: streak/multi-kill/first-blood announcements
- MapRotation: configurable map rotation with persistence
- VehicleSpawnManager: entity spawning with cooldown respawns
- PerformanceDashboard: server metrics tracking with alerts
- AutoTeamBalance: automatic team rebalancing on join/leave
- HighPingKicker: progressive warnings and kicks for high ping
- EntityDebugVisualizer: debug overlay showing all entity positions

https://claude.ai/code/session_01Kf3WQeGBrrK4ZRt5gQJs8X
@Krilliac Krilliac merged commit 4a8b2c4 into main Mar 1, 2026
2 of 8 checks passed
@Krilliac Krilliac deleted the claude/implement-weapon-projectile-HBQEU branch March 1, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants