Commit 5ef604d
Add server-side anti-cheat framework (movement/physics/spell/item detection + enforcement)
Introduces a config-gated, server-side anti-cheat / movement-validation
framework. OFF by default (AntiCheat.Enable = 0) — fully inert until enabled.
Core pieces:
- AntiCheatMgr: central scoring manager. Detectors only observe and score via
a single RecordViolation() ingress; the manager owns ALL enforcement. Score
decays over time and escalates through capped actions (log -> GM alert ->
rubberband to last validated position -> kick), with an optional account-level
autoban accumulator (escalating ban durations, slow hourly decay).
- MovementAnticheat: per-player validator running cheap, event-driven detectors
on each movement packet — fly/flag-spoof (water-walk/hover/slow-fall/transport/
swim, aura- or grant-aware), teleport/blink, speed, acceleration gate, vertical
climb, root/stun-break, opcode-legality, no-clip (VMap LoS), jump (infinite/
mid-air), fall-damage suppression, packet burst, client-timestamp regression,
bot-movement heuristic, and spell-cast timing (GCD bypass + cast spam).
- PhysicsValidator: side-effect-free terrain-plausibility stage (float-above /
below-surface), invoked only on suspicion to stay off the hot path.
Integration: movement validation in the movement opcode handler; spell-injection,
item-in-trade, GO-use and NPC interaction-distance hooks; cast-timing hook;
server-granted movement flags recorded in the Player Set* setters so the
flag-spoof detectors don't fire on legit grants; a rolling latency EWMA fed from
CMSG_PING for latency-aware tolerances. GM commands: .anticheat status / report /
reload / warn / jail / unjail / delete. Violations persist to
character_anticheat_violation; account autoban state to account_anticheat.
Time-sync, the spoof/test GM tooling, and the violation-marker visualizer are
follow-ups that build additively on this core.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2fb5905 commit 5ef604d
25 files changed
Lines changed: 1940 additions & 5 deletions
File tree
- cmake
- src
- game
- AntiCheat
- sql
- ChatCommands
- Object
- Server
- WorldHandlers
- mangosd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments