Skip to content

About

CS2 AntiWallHack is Metamod plugin (server-side visibility filtering)

Topics

Resources

Stars

22 stars

Watchers

0 watching

Forks

Repository files navigation

332

CS2 AntiWallHack

A Counter-Strike 2 AntiWallHack metamod plugin.

It does not detect cheats, issue bans or replace a complete anti-cheat system.

Protection Framework License Discord Buy Me a Coffee

This AC feature is taken from CS2 AntiCheat Defense

Showcase

CS2 AntiWallHack blocking wallhack on Mirage
Showcase on Mirage
CS2 AntiWallHack blocking wallhack on Dust2
Showcase on Dust2
CS2 AntiWallHack blocking wallhack on Dust2
Showcase on Dust2
CS2 AntiWallHack blocking wallhack on Vertigo
Showcase on Vertigo

A wallhack cannot render player data that has not been transmitted by the server.

AntiWallHack aims to reduce the enemy information available to wallhacks. When an enemy is completely hidden behind solid cover, the plugin can stop sending that enemy and their equipment to a player's game client. Once a visibility check finds a clear path, normal transmission is allowed again.


Note

Teammates, dead or spectator viewers, warmup, freeze time and ended rounds are not filtered. Bots can be enemy targets, but the plugin does not filter what bot viewers receive. Enemies outside the selected nearest group are left untouched.

Requirements

Metamod:Source

Features

  • Checks solid cover using the game's line-tracing API.
  • Anticipates movement to help reduce sudden appearances around corners.
  • Keeps recently visible enemies available briefly to reduce flickering.

How it works

  1. Check for a clear path. Rays run from the viewer's eyes to several points around each selected enemy.
  2. Check ahead when moving. Additional rays use estimated future positions based on current movement speed and direction.
  3. Keep visible enemies available. One clear or uncertain result is enough to allow normal transmission.
  4. Hide fully blocked enemies. If every tested path is blocked and the grace period has expired, the plugin withholds that enemy and their collected equipment from that viewer.

ACD (AntiCheat Defense)

Installation

  1. Get the antiwallhack and maps packages .
  2. Extract the antiwallhack package to your server's game/csgo/addons directory.
  3. Extract VIS maps to your server's game/csgo/addons/antiwallhack directory.
  4. Restart the server.

How to bake map visibility

VisBaker is published separately at ZusDev/VisBaker. You do not need to download the AntiWallHack source project to build this tool.

Configuration

game/csgo/cfg/AntiWallHack.cfg

The included config.jsonc contains:

// AntiWallHack configuration. Reload the plugin after editing.

Enabled                      1       // Enable visibility filtering.
Debug                        0       // Temporary startup/map diagnostic breadcrumbs.
SmokeOcclusion               1       // Enable smoke checks.
VisibleGraceTicks            20      // Visibility hold.
BoundsPadding                28      // Wall sample padding.
CornerPrediction             1       // Bounded, wall-clipped viewer input/velocity prediction.
CornerPredictionSeconds      0.2     // Viewer horizon, 0..0.2 seconds.
CornerMaxDistance            64      // Maximum viewer lead, 0..64 units.
Setting Value What it does
Enabled 1 Turns visibility filtering on or off.
SmokeOcclusion 1 Smoke filtering.
VisibleGraceTicks 20 How long an enemy stays available after a clear check.
BoundsPadding 28 Helping reveal corner peeks earlier. Measured in game units.
CornerPrediction 1 Bounded, wall-clipped viewer input/velocity prediction.
CornerPredictionSeconds 0.2 Viewer horizon, 0..0.2 seconds.
CornerMaxDistance 64 Maximum viewer lead, 0..64 units.

Build

python -m pip install git+https://github.com/alliedmodders/ambuild
python native/setup.py
mkdir native\obj
cd native\obj
python ../configure.py --sdks=cs2 --targets=x86_64 --enable-optimize --mms_path=../deps/metamod-source --hl2sdk-root=../deps --hl2sdk-manifests=../deps/metamod-source/hl2sdk-manifests
ambuild

Adjusting corner pop-in

Larger BoundsPadding and CornerPrediction values can make enemies available earlier. A longer VisibleGraceTicks period delays hiding them again. These settings trade stricter hiding for smoother appearances and prediction is an estimate not a guarantee.

Performance

Open paths can finish after one ray, fully blocked enemies can need all 12 sample rays, plus another 12 for predicted positions when players move.

The plugin reuses visibility decisions within the same tick. If the shared trace budget runs out, it leaves affected enemies available instead of hiding them without a completed check. A smaller budget can reduce trace work but also reduce filtering coverage.

ACD (AntiCheat Defense)

FAQ

Does this stop every wallhack?

No. It limits transmission of hidden enemies and their equipment. It does not filter sound, radar messages or all other information a cheat might use.

Does smoke hide enemies from transmission?

Yes. Smoke is part of the plugin's visibility checks.

Discord

About

CS2 AntiWallHack is Metamod plugin (server-side visibility filtering)

Topics

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages