How karola3vax/cs2ac works
CS2AC is a server-side anti-cheat plugin for Counter-Strike 2 community servers. Its principal workflow is to observe server-visible player inputs and behavior, evaluate aim, movement, and cheat-trace signals, then announce detections and optionally report them to Discord or a JSON endpoint and issue configured kick/ban commands. The graph preserves documented detection families and separates movement analysis, player state, and operational integrations. Several implementation files were not sampled, so relationships shown only at the product level cite the README; uncertain internal calls are omitted.
Main entry points: detection_system.cpp Detection Coordinator · player_context.cpp Movement Context · webhook.cpp Webhook Reporting · cs2ac.cpp Plugin Lifecycle
Components 23
Plugin Runtime
- Plugin Lifecycle
src/cs2ac.cpp - Game SDK Access
src/sdk/services.h - Player State
src/player/player.cpp - Settings
src/settings.cpp - Client CVar Queries
src/clientcvar/client_cvar_value.cpp
Detection
- Detection Coordinator
src/detection/detection_system.cpp - Aim Detectors
src/detection/aimbot_module.cpp - Aimlock Detector
src/detection/aimlock_module.cpp - Shot Detectors
src/detection/silent_aim_module.cpp - Cheat Trace Detectors
src/detection
Movement Analysis
- Movement Hooks
src/movement/mv_hooks.cpp - Movement Player
src/movement/movement.h - Movement Context
src/movement_analysis/player_context.cpp - Movement Detectors
src/movement_analysis/detection/movement_detection.cpp - Jump Analysis
src/movement_analysis/jump_analysis/jump_analysis.cpp - Movement Events
src/movement_analysis/events/movement_events.cpp
Responses
- Announcements
src/utils/utils.cpp - Localization
src/localization.cpp - Webhook Reporting
src/webhook.cpp
Other components
- CS2 Server
- Admin Plugin
- Discord Webhook
- JSON Endpoint
Connections 25
- CS2 Server → Plugin Lifecycle: hosts
README.md - Plugin Lifecycle → Game SDK Access: uses
- Plugin Lifecycle → Detection Coordinator: runs detection
- CS2 Server → Player State: provides player data
README.md - CS2 Server → Movement Hooks: provides movement
README.md - Movement Hooks → Movement Context: updates
- Movement Context → Movement Player: extends
- Movement Context → Movement Detectors: uses
src/movement_analysis/player_context.cpp - Movement Context → Jump Analysis: uses
src/movement_analysis/player_context.cpp - Movement Context → Movement Events: uses
src/movement_analysis/player_context.cpp - Detection Coordinator → Movement Context: uses
src/detection/detection_system.cpp - Detection Coordinator → Settings: reads
src/detection/detection_system.cpp - CS2 Server → Client CVar Queries: queries settings
README.md - Client CVar Queries → Cheat Trace Detectors: supports CVar checks
- Detection Coordinator → Aim Detectors: evaluates
- Detection Coordinator → Aimlock Detector: evaluates
- Detection Coordinator → Shot Detectors: evaluates
- Detection Coordinator → Cheat Trace Detectors: evaluates
src/detection/detection_system.cpp - Detection Coordinator → Announcements: announces detections
README.md - Detection Coordinator → Webhook Reporting: reports detections
README.md - Webhook Reporting → Discord Webhook: sends reports
README.md - Webhook Reporting → JSON Endpoint: sends reports
README.md - Detection Coordinator → Admin Plugin: issues punishment command
README.md - Announcements → Localization: formats messages
- Webhook Reporting → Localization: formats reports
src/webhook.cpp