ExternalAutoWallCS2
This project implements an External AutoWall system for Counter‑Strike 2. It extracts up‑to‑date collision geometry and material data from Source 2 `.vpk` files, builds a BVH for fast ray‑tracing, and computes bullet penetration damage using real material modifiers.
Install / Use
/learn @Read1dno/ExternalAutoWallCS2README
ExternalAutoWallCS2
This project implements an external AutoWall system for Counter‑Strike 2. It extracts up‑to‑date collision geometry and material data from Source 2
.vpk files, builds a BVH for fast ray‑tracing, and computes bullet penetration damage using real material modifiers.
Warning:
- Not a polished release—some maps exhibit malformed geometry and inverted triangles.
- Development was time‑consuming and is currently paused. Use this as a reference or starting point.
🏗️ Features
- Physics Extraction:
‑ Parses.vphys/.physviavmdllto pull vertex, triangle, and material indices. - Parser Module:
‑ Readsm_collisionAttributes,m_meshes, andm_hullsblocks.
‑ Converts hex blobs intostd::vector<TriangleCombined>. - BVH Acceleration:
‑ Builds or loads a cached.bvhfile.
‑ Splits along the longest AABB axis until ≤ 4 triangles per node. - Ray‑Triangle Intersection:
‑ Möller–Trumbore algorithm with BVH speed‑up. - Bullet Penetration Logic:
‑ Computes damage reduction per material segment and distance falloff. - Python Binding:
‑ Exposeshandle_bullet_penetration()via pybind11. - Material Parser:
‑ Readssurfaceproperties.txtandsurfaceproperties_game.txtfor penetration modifiers.
Prerequisites
- Visual Studio 2022 (x64, Release)
- Python 3.10.6 with
pybind11
🛠️ Build (Visual Studio)
Configure project properties:
-
C/C++ → General → Additional Include Directories
C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX\include C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX\Lib\site-packages\pybind11\include -
Linker → General → Additional Library Directories
C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX\libs -
Linker → Input → Additional Dependencies
pythonXX.lib
Build configuration:
Release x64
⚠️ Replace
USERNAMEandPythonXXwith your actual Windows username and Python version.
For example:Python310,USERNAME = John.
📦 Example Usage
see example
🔹 Credits & Links
📄 License
This project is licensed under the MIT License.
See the LICENSE file for details.
