Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ endif()

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)

include(CPack)
include(CPack)
97 changes: 22 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,29 @@
# CS16Client [![Build Status](https://github.com/Velaron/cs16-client/actions/workflows/build.yml/badge.svg)](https://github.com/Velaron/cs16-client/actions) <img align="right" width="128" height="128" src="https://github.com/Velaron/cs16-client/raw/main/android/app/src/main/ic_launcher-playstore.png" alt="CS16Client" />
Reverse-engineered Counter Strike 1.6 client, designed for mobile platforms and other officially non-supported platforms.
# CS16Client-OpenBSD

## Donate
[![Boosty.to](https://img.shields.io/badge/Boosty-F15F2C?logo=boosty&logoColor=fff&style=for-the-badge)](https://boosty.to/velaron)
https://github.com/Velaron/cs16-client
"ported" to OpenBSD.

[Support me](https://boosty.to/velaron) on Boosty.to, if you like my work and would like to support further development goals, like reverse-engineering other great mods.
# Building & Installing

Important contributors:
* [a1batross](https://github.com/a1batross), initial project creator and maintainer.
* [jeefo](https://github.com/jeefo), the creator of [YaPB](https://github.com/yapb/yapb).
* The people behind [ReGameDLL_CS](https://github.com/rehlds/ReGameDLL_CS) project.
* [Vladislav4KZ](https://github.com/Vladislav4KZ), bug-tester and maintainer.
* [SNMetamorph](https://github.com/SNMetamorph), author of the PSVita port.
* [Alprnn357](https://github.com/Alprnn357), touch menus maintainer.
* [wh1tesh1t](https://github.com/wh1tesh1t), [pwd491](https://github.com/pwd491), [Elinsrc](https://github.com/Elinsrc), [xiaodo1337](https://github.com/xiaodo1337), [nekonomicon](https://github.com/nekonomicon), [lewa-j](https://github.com/lewa-j) and others for minor contributions.

## Download
You can download a build at the `Releases` section, or use these links for common platforms:
* [Android](https://github.com/Velaron/cs16-client/releases/download/continuous/CS16Client-Android.apk)
* [Linux](https://github.com/Velaron/cs16-client/releases/download/continuous/CS16Client-Linux-i386.tar.gz)
* [Windows](https://github.com/Velaron/cs16-client/releases/download/continuous/CS16Client-Windows-X86.zip)
* [PS Vita](https://github.com/Velaron/cs16-client/releases/download/continuous/CS16Client-PSVita.zip)
* [macOS (arm64)](https://github.com/Velaron/cs16-client/releases/download/continuous/CS16Client-macOS-arm64.zip) - not tested
* [macOS (x86_64)](https://github.com/Velaron/cs16-client/releases/download/continuous/CS16Client-macOS-x86_64.zip) - not tested

[Other platforms...](https://github.com/Velaron/cs16-client/releases/tag/continuous)

## Installation
To run CS16Client you need the [latest developer build of Xash3D FWGS](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous).
You have to own the [game on Steam](https://store.steampowered.com/app/10/CounterStrike//) and copy `valve` and `cstrike` folders into your Xash3D FWGS directory.
After that, just install the APK and run.
building is the same as the Linux build instructions of the https://github.com/Velaron/cs16-client
but here they are:
cmake -S . -B build
cmake --build build --config Release
cmake --install build --prefix <path-to-your-installation>

## Configuration (CVars)
| CVar | Default | Min | Max | Description |
|--------------------------|---------------|-----|-----|---------------------------------------------------------------------------------------------|
| hud_color | "255 160 0" | - | - | HUD color in RGB. |
| cl_quakeguns | 0 | 0 | 1 | Draw centered weapons. |
| cl_weaponlag | 0 | 0.0 | - | Enable weapon lag/sway. |
| xhair_additive | 0 | 0 | 1 | Makes the crosshair additive. |
| xhair_color | "0 255 0 255" | - | - | Crosshair's color (RGBA). |
| xhair_dot | 0 | 0 | 1 | Enables crosshair dot. |
| xhair_dynamic_move | 1 | 0 | 1 | Jumping, crouching and moving will affect the dynamic crosshair (like cl_dynamiccrosshair). |
| xhair_dynamic_scale | 0 | 0 | - | Scale of the dynamic crosshair movement. |
| xhair_gap_useweaponvalue | 0 | 0 | 1 | Makes the crosshair gap scale depend on the active weapon. |
| xhair_enable | 0 | 0 | 1 | Enables enhanced crosshair. |
| xhair_gap | 0 | 0 | 15 | Space between crosshair's lines. |
| xhair_pad | 0 | 0 | - | Border around crosshair. |
| xhair_size | 4 | 0 | - | Crosshair size. |
| xhair_t | 0 | 0 | 1 | Enables T-shaped crosshair. |
| xhair_thick | 0 | 0 | - | Crosshair thickness. |
# Status

## Building
Clone the source code:
```shell
git clone https://github.com/Velaron/cs16-client --recursive
```
- Tested on OpenBSD version 7.8
- Using AMD64 architecture
- Many multiplayer servers do not work due to steam requirements
- Takes a long time to download resources from some servers, and some simply do not work because of steam auth
- Training mode works (needs more testing)
- Bots not tested yet
- No known issues yet

### Using CMakePresets.json
```shell
cmake --preset <preset-name>
cmake --build build
cmake --install build --prefix <path-to-your-installation>
```
# TODO
- test bots
- maybe try to get added to ports tree

### Windows
```shell
cmake -A Win32 -S . -B build
cmake --build build --config Release
cmake --install build --prefix <path-to-your-installation>
```
### Linux and macOS
```shell
cmake -S . -B build
cmake --build build --config Release
cmake --install build --prefix <path-to-your-installation>
```
### Android
```shell
cd android
./gradlew assembleRelease
```
# Credits
original project: https://github.com/Velaron/cs16-client
2 changes: 1 addition & 1 deletion cl_dll/input/input_xash3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void IN_Move( float frametime, usercmd_t *cmd )
viewangles[YAW] += rel_yaw;
if( bLadder )
{
if( ( cl_laddermode->value == 1 ) )
if( cl_laddermode->value == 1 )
viewangles[YAW] -= ac_sidemove * 5;
ac_sidemove = 0;
}
Expand Down
7 changes: 5 additions & 2 deletions common/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
#if XASH_PSVITA == 1
#include <unistd.h>
#define VRTLD_LIBDL_COMPAT
#include <vrtld.h>
#include <unistd.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

#elif XASH_APPLE == 1
#include <dlfcn.h>
#include <unistd.h>
#elif XASH_OPENBSD == 1
#include <dlfcn.h>
#include <unistd.h>
#endif

#if !defined( _WIN32 )
Expand Down Expand Up @@ -273,4 +276,4 @@ CreateInterfaceFn Sys_GetFactory( const char *pModuleName )
// so lets use the old style cast.
return (CreateInterfaceFn)( Sys_GetProcAddress( pModuleName, CREATEINTERFACE_PROCNAME ) );
#endif
}
}
2 changes: 2 additions & 0 deletions dlls/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ inline edict_t *FIND_ENTITY_BY_TARGET(edict_t *entStart, const char *pszName)
typedef int EOFFSET;
typedef int BOOL;

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

#define DECLARE_GLOBAL_METHOD(MethodName) extern void DLLEXPORT MethodName(void)
#define GLOBAL_METHOD(funcname) void DLLEXPORT funcname(void)
Expand Down
7 changes: 4 additions & 3 deletions game_shared/voice_status_hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ CVoiceStatusHud::~CVoiceStatusHud()

int CVoiceStatusHud::Init( IVoiceStatusHelper *pHelper, IVoiceStatus *pStatus )
{
m_VoiceHeadModel = NULL;
m_VoiceHeadModel = 0;

m_pHelper = pHelper;
m_pStatus = pStatus;
Expand Down Expand Up @@ -385,7 +385,8 @@ void CVoiceStatusHud::UpdateSpeakerStatus( int entindex, bool bTalking )
// If we don't have a label for this guy yet, then create one.
if ( !pLabel )
{
if ( pLabel = GetFreeVoiceLabel() )
pLabel = GetFreeVoiceLabel();
if ( pLabel )
{
// Get the name from the engine.
hud_player_info_t info;
Expand Down Expand Up @@ -455,4 +456,4 @@ int CVoiceStatusHud::Draw( float flTime )
m_Labels[i]->Draw();

return 1;
}
}