How velaron/cs16-client works
CS16Client is a reverse-engineered Counter-Strike 1.6 client for Xash3D, including mobile and other unsupported platforms. The player’s main loop is to provide input, drive shared player movement and weapon behavior, then see game state through rendered effects and the HUD; menus and spectator/voice interfaces support adjacent play flows. The tree and excerpts establish client entry points, input, movement, weapons, HUD, and rendering interfaces. Several connections between these subsystems are conventional but not visible in the sampled implementation, so those links are marked unverified.
Main entry points: hud.h HUD framework · counterstrikeviewport.cpp Game menus · input_sdl.cpp Input handling · pm_shared.cpp Player movement
Components 19
Platform and engine
- Android host
android/app/src/main/java/su/xash/cs16client/MainActivity.java - Xash3D engine
- Client DLL API
cl_dll/include/cl_dll.h
Gameplay simulation
- Input handling
cl_dll/input/input_sdl.cpp - Player movement
pm_shared/pm_shared.cpp - Weapon logic
cl_dll/cs_wpn/cs_weapons.cpp - Weapon events
cl_dll/events/ev_cs16.cpp
Rendering and HUD
- Particle effects
cl_dll/particleman/CBaseParticle.cpp - Model rendering
cl_dll/GameStudioModelRenderer.cpp - HUD framework
cl_dll/hud.h - Radar
cl_dll/hud/radar.cpp - Scoreboard
cl_dll/hud/scoreboard.cpp - Spectator view
cl_dll/hud_spectator.cpp - Spectator GUI
cl_dll/hud/spectator_gui.cpp
Menus and social
- Game menus
cl_dll/VGUI/counterstrikeviewport.cpp - Buy menus
cl_dll/VGUI/buymenu.cpp - Localization
cl_dll/vgui_parser.cpp - Voice HUD
game_shared/voice_status_hud.cpp
Other components
- Player
Connections 17
- Player → Input handling: provides input
cl_dll/input/input_sdl.cpp - Xash3D engine → Client DLL API: loads client
README.md - Android host → Xash3D engine: launches game
README.md - Input handling → Player movement: supplies commands
- Player movement → Weapon logic: updates gameplay
- Weapon logic → Weapon events: emits events
- Weapon events → Particle effects: creates effects
- Xash3D engine → Model rendering: provides rendering
- Xash3D engine → HUD framework: provides client state
- HUD framework → Radar: hosts HUD element
- HUD framework → Scoreboard: hosts HUD element
- HUD framework → Spectator GUI: hosts GUI
cl_dll/hud/spectator_gui.cpp - Spectator view → Spectator GUI: supports spectator view
- Player → Game menus: opens menus
- Game menus → Buy menus: opens buy menu
- Game menus → Localization: uses localized text
- Xash3D engine → Voice HUD: provides voice status
game_shared/voice_status_hud.cpp