diff --git a/3rdparty/MultiEmulator b/3rdparty/MultiEmulator index 7e989e67..11ff077c 160000 --- a/3rdparty/MultiEmulator +++ b/3rdparty/MultiEmulator @@ -1 +1 @@ -Subproject commit 7e989e670e516094c4d26f891d33e329f84d52c9 +Subproject commit 11ff077ca58b9394a0eff0e89dd8980c2c252956 diff --git a/3rdparty/mainui b/3rdparty/mainui index 479010ac..cbbfe2e2 160000 --- a/3rdparty/mainui +++ b/3rdparty/mainui @@ -1 +1 @@ -Subproject commit 479010ac17caa669a502abbb2c2c2158be895347 +Subproject commit cbbfe2e23cd6fc065a5a6fe1d76d24f3e7039fde diff --git a/Documentation/2025-03-13-213630_1600x900_scrot.png b/Documentation/2025-03-13-213630_1600x900_scrot.png new file mode 100644 index 00000000..6600fc17 Binary files /dev/null and b/Documentation/2025-03-13-213630_1600x900_scrot.png differ diff --git a/Documentation/2025-03-15-011749_1600x900_scrot.png b/Documentation/2025-03-15-011749_1600x900_scrot.png new file mode 100644 index 00000000..b45cf5d3 Binary files /dev/null and b/Documentation/2025-03-15-011749_1600x900_scrot.png differ diff --git a/Documentation/2025-03-15-072452_1600x900_scrot.png b/Documentation/2025-03-15-072452_1600x900_scrot.png new file mode 100644 index 00000000..d14b0b7f Binary files /dev/null and b/Documentation/2025-03-15-072452_1600x900_scrot.png differ diff --git a/Documentation/2025-03-15-072942_1600x900_scrot.png b/Documentation/2025-03-15-072942_1600x900_scrot.png new file mode 100644 index 00000000..99ff4e58 Binary files /dev/null and b/Documentation/2025-03-15-072942_1600x900_scrot.png differ diff --git a/Documentation/2025-03-16-035937_1600x900_scrot.png b/Documentation/2025-03-16-035937_1600x900_scrot.png new file mode 100644 index 00000000..bf5f53cc Binary files /dev/null and b/Documentation/2025-03-16-035937_1600x900_scrot.png differ diff --git a/README.md b/README.md index d058afbd..e43a8132 100644 --- a/README.md +++ b/README.md @@ -1,102 +1,92 @@ -# Xash3D FWGS Engine Xash3D FWGS icon -[![GitHub Actions Status](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml) [![FreeBSD Build Status](https://img.shields.io/cirrus/github/FWGS/xash3d-fwgs?label=freebsd%20build)](https://cirrus-ci.com/github/FWGS/xash3d-fwgs) \ -[![Discord Server](https://img.shields.io/discord/355697768582610945?logo=Discord&label=International%20Discord%20chat)](http://fwgsdiscord.mentality.rip/) [![Russian speakers Telegram Chat](https://img.shields.io/badge/Russian_speakers_Telegram_chat-gray?logo=Telegram)](https://t.me/flyingwithgauss) \ -[![Download Daily Build](https://img.shields.io/badge/downloads-testing-orange)](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) +# Xrasher -Xash3D ([pronounced](https://ipa-reader.com/?text=ks%C9%91%CA%82) `[ksɑʂ]`) FWGS is a game engine, aimed to provide compatibility with Half-Life Engine and extend it, as well as to give game developers well known workflow. +Xrasher is a BVFF cheating super-client for the Xash3D game engine. +Read the [original README](README_old.md) -Xash3D FWGS is a heavily modified fork of an original [Xash3D Engine](https://www.moddb.com/engines/xash3d-engine) by Unkle Mike. +## Features -## Donate -[![Donate to FWGS button](https://img.shields.io/badge/Donate_to_FWGS-%3C3-magenta)](Documentation/donate.md) \ -If you like Xash3D FWGS, consider supporting individual engine maintainers. By supporting us, you help to continue developing this game engine further. The sponsorship links are available in [documentation](Documentation/donate.md). +* Complete Ban Bypass + * Xrasher is completely immune to bans, yes seriously, if you get jannied on + a server for any reason, you can literally just join back in. This is + because Xash uses an MD5 hash (generated in various, somewhat strange + ways) stored locally, Xrasher completely nullifies the persistence of + this "XashID" and generates a new one each time. -## Fork features -* Steam Half-Life (HLSDK 2.5) support. -* Crossplatform and modern compilers support: supports Windows, Linux, BSD & Android on x86 & ARM and [many more](Documentation/ports.md). -* Better multiplayer: multiple master servers, headless dedicated server, voice chat, [GoldSrc protocol support](Documentation/goldsrc-protocol-support.md) and IPv6 support. -* Multiple renderers support: OpenGL, GLESv1, GLESv2 and Software. -* Advanced virtual filesystem: `.pk3` and `.pk3dir` support, compatibility with GoldSrc FS module, fast case-insensitivity emulation for crossplatform. -* Mobility API: better game integration on mobile devices (vibration, touch controls). -* Different input methods: touch and gamepad in addition to mouse & keyboard. -* TrueType font rendering, as a part of mainui_cpp. -* External VGUI support module. -* PNG & KTX2 image format support. -* Ogg Vorbis (`.ogg`) & Ogg Opus (`.opus`) audio formats support. -* [A set of small improvements](Documentation/), without broken compatibility. +* Wallhack + * A perfect and natural wallhack, all relevant entities and players + are visible through walls. A wallhack implementation is provided + for both the GL renderer (recommended) and the software-renderer + (sometimes glitchy). -## Installation & Running -0) Get Xash3D FWGS binaries: you can use [testing](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) build or you can compile engine from source code. -1) Copy engine binaries to some directory. -2) Copy `valve` directory from [Half-Life](https://store.steampowered.com/app/70/HalfLife/) to directory with engine binaries. -If your CPU is NOT x86 compatible or you're running 64-bit version of the engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable). -This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods. -You still needed to copy `valve` directory as all game resources located there. -3) Run the main executable (`xash3d.exe` or AppImage). +* Silent Aimbot + * Very simple and effective silent-aimbot. -For additional info, run Xash3D with `-help` command line key. +* Random Name Shuffling + * Everytime you start the Xrasher client or join a server, a random name is + automatically selected and set for you, confusing your victims and the + jannies. -## Contributing -* Before sending an issue, check if someone already reported your issue. Make sure you're following "How To Ask Questions The Smart Way" guide by Eric Steven Raymond. Read more: http://www.catb.org/~esr/faqs/smart-questions.html. -* Issues are accepted in both English and Russian. -* Before sending a PR, check if you followed our contribution guide in CONTRIBUTING.md file. +* Clientside cheats unlocked -## Build instructions -We are using Waf build system. If you have some Waf-related questions, I recommend you to read [Waf Book](https://waf.io/book/). +* "Multiplayer" protected commands unlocked -NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using! +* Simple UI + * Turn on 'net\_graph' to enable it. -### Prerequisites -If your CPU is x86 compatible and you're on Windows or Linux, we are building 32-bit code by default. This was done to maintain compatibility with Steam releases of Half-Life and based on it's engine games. -Even if Xash3D FWGS does support targetting 64-bit, you can't load games without recompiling them from source code! +* No flashing (flashbangs), visual viewpunch, or screenshake, your eyeballs are stoic -If your CPU is NOT x86 compatible or you decided build 64-bit version of engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable). -This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods. +## Screenshots -#### Windows (Visual Studio) -* Install Visual Studio. -* Install latest [Python](https://python.org) **OR** run `cinst python.install` if you have Chocolatey. -* Install latest [Git](https://git-scm.com/download/win) **OR** run `cinst git.install` if you have Chocolatey. -* Download [SDL2](https://libsdl.org/download-2.0.php) development package for Visual Studio. -* Clone this repository: `git clone --recursive https://github.com/FWGS/xash3d-fwgs`. -* Make sure you have at least 12GB of free space to store all build-time dependencies: ~10GB for Visual Studio, 300 MB for Git, 100 MB for Python and other. +Half-Life Deathmatch, demonstrating wallhack, aimbot, fullbright hack, ui, etc. +![HLDM Example](2025-03-13-213630_1600x900_scrot.png) +![HLDM Example](2025-03-15-011749_1600x900_scrot.png) -#### GNU/Linux -##### Debian/Ubuntu -* Only for 32-bit engine on 64-bit x86 operating system: - * Enable i386 on your system: `$ sudo dpkg --add-architecture i386`. - * Install `aptitude` ([why?](https://github.com/FWGS/xash3d-fwgs/issues/1828#issuecomment-2415131759)): `$ sudo apt update && sudo apt upgrade && sudo apt install aptitude` - * Install development tools: `$ sudo aptitude --without-recommends install git build-essential gcc-multilib g++-multilib libsdl2-dev:i386 libfreetype-dev:i386 libopus-dev:i386 libbz2-dev:i386`. - * Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig`. +Counter Strike 1.6, demonstrating wallhack, aimbot, fullbright hack, ui, etc. +![CS 1.6 Example](2025-03-15-072452_1600x900_scrot.png) +![CS 1.6 Example](2025-03-15-072942_1600x900_scrot.png) +![CS 1.6 Example](2025-03-16-035937_1600x900_scrot.png) -* For 64-bit engine on 64-bit x86 and other non-x86 systems: - * Install development tools: `$ sudo apt install git build-essential python libsdl2-dev libfreetype6-dev libopus-dev libbz2-dev`. +## Setup -* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`. +Copy binaries or compile Xrasher to your gayme's root. Run it. -##### RedHat/Fedora -* Only for 32-bit engine on 64-bit x86 operating system: - * Install development tools: `$ sudo dnf install git gcc gcc-c++ glibc-devel.i686 SDL2-devel.i686 opus-devel.i686 freetype-devel.i686 bzip2-devel.i686`. - * Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig`. +./xash3d -console -* For 64-bit engine on 64-bit x86 and other non-x86 systems: - * Install development tools: `$ sudo dnf install git gcc gcc-c++ SDL2-devel opus-devel freetype-devel bzip2-devel`. +Enable 'net\_graph' in console, Xrasher's ui is implemented inside. The smart +silent-aimbot should be automatically enabled, copy the sample config file from +this directory (config.cfg) to gayme's 'valve' or 'cstrike' for helpful Xrasher +keybindings. -* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`. +* 1 - Enable distance aimbot +* 2 - Disable distance aimbot +* 3 - Enable smart aimbot +* 4 - Disable smart aimbot -### Building -#### Windows (Visual Studio) -0) Open command line. -1) Navigate to `xash3d-fwgs` directory. -2) (optional) Examine which build options are available: `waf --help`. -3) Configure build: `waf configure --sdl2=c:/path/to/SDL2`. -4) Compile: `waf build`. -5) Install: `waf install --destdir=c:/path/to/any/output/directory`. +Since Xrasher has clientside cheats unlocked, you can do things such as +enabling 'r\_fullbright 1', for complete visibility, or 'default\_fov 115' for +a large field-of-view. -#### Linux -If compiling 32-bit on amd64, make sure `PKG_CONFIG_PATH` from the previous step is set correctly, prior to running configure. +Enjoy, and cleanse people's video game addictions. -0) (optional) Examine which build options are available: `./waf --help`. -1) Configure build: `./waf configure` (you need to pass `-8` to compile 64-bit engine on 64-bit x86 processor). -2) Compile: `./waf build`. -3) Install: `./waf install --destdir=/path/to/any/output/directory`. + +## New Console Commands + +* xrasher\_newname - Get a new nickname +* xrasher\_aimsmart 1 - Enable the smart aimbot, set it and forget it! (recommended) +* xrasher\_aimnear 1 - Enable the aimbot that's focused on what player is closest + +## TODO? + +* Extreme hack, take remote control of server, noclip, invulnerability, spawn entities, etc. +* ESP, see health, curweapon, name +* UI element that shows nearest players and pickups +* "You are locked on:" ui indicator +* Automatic bunnyhop +* Disable flashes and smoke particles DONE + +## LICENSE + +Xrasher itself is public domain CC0, although Xash3D-FWGS is in a legal grey +area, because it attempts to be GPL (and includes some GPL software), but links +with proprietary dynamic link libraries at runtime. There is some silly +discussions about this you can read. diff --git a/README_old.md b/README_old.md new file mode 100644 index 00000000..e2f33af4 --- /dev/null +++ b/README_old.md @@ -0,0 +1,102 @@ +# Xash3D FWGS Engine Xash3D FWGS icon +[![GitHub Actions Status](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml) [![FreeBSD Build Status](https://img.shields.io/cirrus/github/FWGS/xash3d-fwgs?label=freebsd%20build)](https://cirrus-ci.com/github/FWGS/xash3d-fwgs) \ +[![Discord Server](https://img.shields.io/discord/355697768582610945?logo=Discord&label=International%20Discord%20chat)](http://fwgsdiscord.mentality.rip/) [![Russian speakers Telegram Chat](https://img.shields.io/badge/Russian_speakers_Telegram_chat-gray?logo=Telegram)](https://t.me/flyingwithgauss) \ +[![Download Daily Build](https://img.shields.io/badge/downloads-testing-orange)](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) + +Xash3D ([pronounced](https://ipa-reader.com/?text=ks%C9%91%CA%82) `[ksɑʂ]`) FWGS is a game engine, aimed to provide compatibility with Half-Life Engine and extend it, as well as to give game developers well known workflow. + +Xash3D FWGS is a heavily modified fork of an original [Xash3D Engine](https://www.moddb.com/engines/xash3d-engine) by Unkle Mike. + +## Donate +[![Donate to FWGS button](https://img.shields.io/badge/Donate_to_FWGS-%3C3-magenta)](Documentation/donate.md) \ +If you like Xash3D FWGS, consider supporting individual engine maintainers. By supporting us, you help to continue developing this game engine further. The sponsorship links are available in [documentation](Documentation/donate.md). + +## Fork features +* Steam Half-Life (HLSDK 2.5) support. +* Crossplatform and modern compilers support: supports Windows, Linux, BSD & Android on x86 & ARM and [many more](Documentation/ports.md). +* Better multiplayer: multiple master servers, headless dedicated server, voice chat, [GoldSrc protocol support](Documentation/goldsrc-protocol-support.md) and IPv6 support. +* Multiple renderers support: OpenGL, GLESv1, GLESv2 and Software. +* Advanced virtual filesystem: `.pk3` and `.pk3dir` support, compatibility with GoldSrc FS module, fast case-insensitivity emulation for crossplatform. +* Mobility API: better game integration on mobile devices (vibration, touch controls). +* Different input methods: touch and gamepad in addition to mouse & keyboard. +* TrueType font rendering, as a part of mainui_cpp. +* External VGUI support module. +* PNG & KTX2 image format support. +* Ogg Vorbis (`.ogg`) & Ogg Opus (`.opus`) audio formats support. +* [A set of small improvements](Documentation/), without broken compatibility. + +## Installation & Running +0) Get Xash3D FWGS binaries: you can use [testing](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) build or you can compile engine from source code. +1) Copy engine binaries to some directory. +2) Copy `valve` directory from [Half-Life](https://store.steampowered.com/app/70/HalfLife/) to directory with engine binaries. +If your CPU is NOT x86 compatible or you're running 64-bit version of the engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable). +This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods. +You still needed to copy `valve` directory as all game resources located there. +3) Run the main executable (`xash3d.exe` or AppImage). + +For additional info, run Xash3D with `-help` command line key. + +## Contributing +* Before sending an issue, check if someone already reported your issue. Make sure you're following "How To Ask Questions The Smart Way" guide by Eric Steven Raymond. Read more: http://www.catb.org/~esr/faqs/smart-questions.html. +* Issues are accepted in both English and Russian. +* Before sending a PR, check if you followed our contribution guide in CONTRIBUTING.md file. + +## Build instructions +We are using Waf build system. If you have some Waf-related questions, I recommend you to read [Waf Book](https://waf.io/book/). + +NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using! + +### Prerequisites +If your CPU is x86 compatible and you're on Windows or Linux, we are building 32-bit code by default. This was done to maintain compatibility with Steam releases of Half-Life and based on it's engine games. +Even if Xash3D FWGS does support targetting 64-bit, you can't load games without recompiling them from source code! + +If your CPU is NOT x86 compatible or you decided build 64-bit version of engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable). +This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods. + +#### Windows (Visual Studio) +* Install Visual Studio. +* Install latest [Python](https://python.org) **OR** run `cinst python.install` if you have Chocolatey. +* Install latest [Git](https://git-scm.com/download/win) **OR** run `cinst git.install` if you have Chocolatey. +* Download [SDL2](https://libsdl.org/download-2.0.php) development package for Visual Studio. +* Clone this repository: `git clone --recursive https://github.com/FWGS/xash3d-fwgs`. +* Make sure you have at least 12GB of free space to store all build-time dependencies: ~10GB for Visual Studio, 300 MB for Git, 100 MB for Python and other. + +#### GNU/Linux +##### Debian/Ubuntu +* Only for 32-bit engine on 64-bit x86 operating system: + * Enable i386 on your system: `$ sudo dpkg --add-architecture i386`. + * Install `aptitude` ([why?](https://github.com/FWGS/xash3d-fwgs/issues/1828#issuecomment-2415131759)): `$ sudo apt update && sudo apt upgrade && sudo apt install aptitude` + * Install development tools: `$ sudo aptitude --without-recommends install git build-essential gcc-multilib g++-multilib libsdl2-dev:i386 libfreetype-dev:i386 libopus-dev:i386 libbz2-dev:i386 libvorbis-dev:i386 libopusfile-dev:i386 libogg-dev:i386`. + * Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig`. + +* For 64-bit engine on 64-bit x86 and other non-x86 systems: + * Install development tools: `$ sudo apt install git build-essential python libsdl2-dev libfreetype6-dev libopus-dev libbz2-dev libvorbis-dev libopusfile-dev libogg-dev`. + +* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`. + +##### RedHat/Fedora +* Only for 32-bit engine on 64-bit x86 operating system: + * Install development tools: `$ sudo dnf install git gcc gcc-c++ glibc-devel.i686 SDL2-devel.i686 opus-devel.i686 freetype-devel.i686 bzip2-devel.i686 libvorbis-devel.i686 opusfile-devel.i686 libogg-devel.i686`. + * Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig`. + +* For 64-bit engine on 64-bit x86 and other non-x86 systems: + * Install development tools: `$ sudo dnf install git gcc gcc-c++ SDL2-devel opus-devel freetype-devel bzip2-devel libvorbis-devel opusfile-devel libogg-devel`. + +* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`. + +### Building +#### Windows (Visual Studio) +0) Open command line. +1) Navigate to `xash3d-fwgs` directory. +2) (optional) Examine which build options are available: `waf --help`. +3) Configure build: `waf configure --sdl2=c:/path/to/SDL2`. +4) Compile: `waf build`. +5) Install: `waf install --destdir=c:/path/to/any/output/directory`. + +#### Linux +If compiling 32-bit on amd64, make sure `PKG_CONFIG_PATH` from the previous step is set correctly, prior to running configure. + +0) (optional) Examine which build options are available: `./waf --help`. +1) Configure build: `./waf configure` (you need to pass `-8` to compile 64-bit engine on 64-bit x86 processor). +2) Compile: `./waf build`. +3) Install: `./waf install --destdir=/path/to/any/output/directory`. diff --git a/android/app/CMakeLists.txt b/android/app/CMakeLists.txt index 7a24c54c..77f01d81 100644 --- a/android/app/CMakeLists.txt +++ b/android/app/CMakeLists.txt @@ -17,7 +17,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") set(BUILD_TYPE "debug") else() set(BUILD_TYPE "release") - list(APPEND WAF_EXTRA_ARGS --enable-poly-opt --enable-lto) + list(APPEND WAF_EXTRA_ARGS --enable-poly-opt --enable-lto --enable-limited-debuginfo) endif() if(ANDROID_ABI STREQUAL "x86") @@ -75,7 +75,7 @@ ExternalProject_Add( BUILD_CMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} WAFLOCK=.lock-waf_android_${ANDROID_ABI}_build ${WAF} configure -T ${BUILD_TYPE} --android=${ANDROID_ABI},,${CMAKE_SYSTEM_VERSION} - -s "${ENGINE_SOURCE_DIR}/3rdparty/SDL" --enable-bundled-deps + -s "${ENGINE_SOURCE_DIR}/3rdparty/SDL" --enable-bundled-deps ${WAF_EXTRA_ARGS} BUILD_COMMAND ${CMAKE_COMMAND} -E env WAFLOCK=.lock-waf_android_${ANDROID_ABI}_build diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index ffcbbde6..4f4df429 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -30,6 +30,298 @@ GNU General Public License for more details. #define CL_CONNECTION_RETRIES 10 #define CL_TEST_RETRIES 5 +//Xrasher random name selection +#define XRASHER_NAMES 263 +const char* xrasher_names[XRASHER_NAMES] = { +"TomFazano", +"SlavaBozhie", +"saintlyWarrior", +"FAITHFUL_GUARDIAN", +"holy_light_seeker", +"DivinePathfinder", +"orthodox_knight", +"SeraphicScribe", +"gracefulPilgrim", +"CROWNED_IN_FAITH", +"VirtuousVanguard", +"celestialHerald", +"eternal_hope", +"BlessedDefender", +"trinityChampion", +"peacefuldisciple" +"FerventPrayer", +"cobson", +"feraljak", +"soyboy27", +"CHRIST_WON", +"nothacking_justgood58", +"Kingforever", +"HappyPeanut", +"Davidcat", +"FrogPaste", +"Matikas48", +"luke_smith-http://lukesmith.xyz", +"LukeSmith-http://lukesmith.xyz", +"matika_adventure", +"GabeNewell", +"etymologically", +"TempleOS", +"t3rryd4vis", +"coughmeyer", +"admer45", +"dimbeak", +"simon", +"therealfreeman", +"retard", +"DavidShekelberg", +"AdonaiSilverman", +"rothschild", +"rosenberg", +"MentalOutlaw", +"ban_video_games", +"keepitfoss", +"GMan", +"Nihilanth", +"Zombie", +"epistemology", +"the_logos", +"RealMichelThomas", +"abraham", +"abram", +"Itslindy", +"ITS_OVER", +"gigachud", +"gigathud", +"WriteInC", +"the-third-temple", +"xmmp_gt_matrix", +"HUMPHREYSALATIN", +"veganism_sucks", +"I_HATE_HALFLIFE", +"I_HATE_VIDEOGAMES", +"UseSearx", +"IUseYandex", +"wrote_this_one", +"baskingshark", +"sharks", +"shellsavant", +"ilovecasey", +"King4ALife", +"SuperDogBoy", +"Woods", +"JackRobinson", +"Gordon!!!!", +"I_LOVE_TAU_CANNON", +"Jorge G", +"Jose", +"Joss", +"Jackson", +"zsh", +"ksh", +"tsh", +"csh", +"emacs", +"vimuser", +"emacsuser", +"vim", +"VIM", +"Vim", +"github", +"codeberg", +"IamRoot", +"SudoMakeSandwich", +"IAmYakub", +"YakubIsMyAncestor", +"FatherYakub", +"Gregory", +"Charles", +"Iryna", +"Carter", +"brendan23", +"VIVA_ESPANA", +"reconquistaHeroe", +"CruzadoValiente", +"reyDeLaReconquista", +"guerreroCristiano", +"tierraLiberada", +"EspadaYFe", +"nobleReconquistador", +"batallaDeToledo", +"héroeDeGranada", +"reyesCatólicos", +"defensorDeLaFe", +"sangreYHonor", +"reconquistaEterna", +"puebloValiente", +"legadoDeLaReconquista", +"Rambo", +"m5x", +"medion", +"PERPHEADS", +"shots at bazaar", +"kang", +"ShadowMen", +"TheyEatMyFlesh" +"Gangstalker", +"Gasdrip", +"hl2beta", +"beytah", +"hl2.exe", +"hl1.exe", +"hl.exe", +"css.exe", +"XASHER", +"xrasher.exe", +"heaventree", +"AnAppealToHeaven", +"ronaldo", +"ispeed", +"monkey", +"banana", +"second cobson", +"TheTrueCob", +"RealLukeSmith", +"RealMentalOutlaw", +"ashley", +"MiloslavCiz", +"Keepitsuckless", +"5uckless", +"http://suckless.org", +"http://libgen.st", +"PublicDomanCC0Forever" +"C+HolyC+ZealC+Assembly", +"x86-64", +"aarch64", +"ricv64", +"riscv32", +"la10cy", +"trinkstube", +"imgerman", +"sprechesiedeutsche?", +"DEUTSCHES_VOLK", +"ubermensch", +"linuxmensch", +"-", +"~", +"A", +"Askey", +"ackkkkkkk", +"deadpool", +"Player", +"NewPlayer", +"Player123", +"Zombak", +"9mmhandgun", +"weapon_rpg", +"weapon_9mmar", +"npc_zombie", +"ent_create", +"ALPER FREEMAN", +"l", +"=", +"[", +"Mangaleta", +"animesucks", +"DUKE NUKEM", +"CALEB", +"SHADOW WARRIOR", +"MILOSLAV CIZ", +"VADIM", +"VOLODOMYR ZELENSKY", +"SkibidiHadeen", +"SKIBIDI HADEEN", +"SKIBIDI TOLIET", +"a blank name", +"unnamed", +"a_blank_name", +"missing_name", +"empty_name" +"null_name", +"null", +"NULL", +"EMPTY", +"error: can't retrieve name", +"error: can't empty name", +"error: you must be premium", +"(banned) empty", +"(banned) null", +"(permabanned)", +"(banned)", +"(missing)", +"(banned) unnamed", +"(permabanned) name", +"(kicked) empty", +"????????????", +"!!!!!!!!!!!!", +"@@@@@@@@@@@@", +"############", +"$$$$$$$$$$$$", +"%%%%%%%%%%%%", +"^^^^^^^^^^^^", +"&&&&&&&&&&&&", +"JOHN WICK", +"HACI AZER?", +"ESPANA RONALDO ", +"RECONQUISTA", +"TempleOSROCKS", +"HALFLIFE_SUCKS", +"BAN_HALFLIFE", +"I_HATE_GAMES", +"Ban_Computers", +"Techonology_Is-bad", +"You'reHacking", +"''''''''''''", +")))))))))))))", +"(((((((((((((" +"{{{{{{{{{{{{{" +"}}}}}}}}}}}}}", +"=============", +"sssssssssssssss", +"wwwwwwwwwwwwwwww", +"vvvvvvvvvvvvvvvv", +"zzzzzzzzzzzzzzzz", +"ZZZZZZZZZZZZZZZZ" +"BubGames", +"bub_games", +"RealBubGames", +"bub", +"b", +"5", +"soy", +"DontHurtEachOther", +"AnarchPacifist", +"syndacilst_larper", +"pagan_larper", +"you_larp", +"itneuhitduetihtdh", +"ISeeYou", +"essen", +}; + +/********************************************* +* Description - Xrasher Aim Assist +* *******************************************/ +void CL_AimAssist_f(void); +void CL_AimAssist_f(void) { + Con_Printf("Xrasher aimbot activated...\n"); + if(xrasher_aimnear.value == 1){ + xrasher_aimnear.value = 0; + } + else{ + xrasher_aimnear.value = 1; + } +} + +/********************************************* +* Description - Xrasher picking a random name to help blend in +* *******************************************/ +void CL_XrasherNewName(void); +void CL_XrasherNewName(void){ + const char *random_name = xrasher_names[rand()%XRASHER_NAMES]; + Cvar_Set("name", random_name); + Msg("Xrasher has changed your identity to: %s\n", random_name); +} + CVAR_DEFINE_AUTO( showpause, "1", 0, "show pause logo when paused" ); CVAR_DEFINE_AUTO( mp_decals, "300", FCVAR_ARCHIVE, "decals limit in multiplayer" ); static CVAR_DEFINE_AUTO( dev_overview, "0", 0, "draw level in overview-mode" ); @@ -86,6 +378,10 @@ CVAR_DEFINE_AUTO( ui_renderworld, "0", FCVAR_ARCHIVE, "render world when UI is v static CVAR_DEFINE_AUTO( cl_maxframetime, "0", 0, "set deadline timer for client rendering to catch freezes" ); CVAR_DEFINE_AUTO( cl_fixmodelinterpolationartifacts, "1", 0, "try to fix up models interpolation on a moving platforms (monsters on trains for example)" ); +//Xrasher +CVAR_DEFINE_AUTO( xrasher_aimnear, "0", 0, "Enable Xrasher's Aimbot, based on raw distance" ); +CVAR_DEFINE_AUTO( xrasher_aimsmart, "1", 0, "Enable Xrasher's Smarter Aimbot" ); + // // userinfo // @@ -98,7 +394,6 @@ CVAR_DEFINE_AUTO( rate, "25000", FCVAR_USERINFO|FCVAR_ARCHIVE|FCVAR_FILTERABLE, static CVAR_DEFINE_AUTO( cl_ticket_generator, "revemu2013", FCVAR_ARCHIVE, "you wouldn't steal a car" ); - client_t cl; client_static_t cls; clgame_static_t clgame; @@ -1009,7 +1304,7 @@ static void CL_WriteSteamTicket( sizebuf_t *send ) const char *s; uint32_t crc; char buf[768] = { 0 }; // setti and steamemu return 768 - size_t i = sizeof( buf ); + int i = sizeof( buf ); if( !Q_strcmp( cl_ticket_generator.string, "null" )) { @@ -1028,24 +1323,7 @@ static void CL_WriteSteamTicket( sizebuf_t *send ) CRC32_Init( &crc ); CRC32_ProcessBuffer( &crc, s, Q_strlen( s )); crc = CRC32_Final( crc ); - - if( !Q_stricmp( cl_ticket_generator.string, "revemu2013" )) - i = GenerateRevEmu2013( buf, crc ); - else if( !Q_stricmp( cl_ticket_generator.string, "sc2009" )) - i = GenerateSC2009( buf, crc ); - else if( !Q_stricmp( cl_ticket_generator.string, "oldrevemu" )) - i = GenerateOldRevEmu( buf, crc ); - else if( !Q_stricmp( cl_ticket_generator.string, "steamemu" )) - i = GenerateSteamEmu( buf, crc ); - else if( !Q_stricmp( cl_ticket_generator.string, "revemu" )) - i = GenerateRevEmu( buf, crc ); - else if( !Q_stricmp( cl_ticket_generator.string, "setti" )) - i = GenerateSetti( buf ); - else if( !Q_stricmp( cl_ticket_generator.string, "avsmp" )) - i = GenerateAVSMP( buf, crc, true ); - else - Con_Printf( "%s: unknown generator %s, supported are: null, revemu2003, sc2009, oldrevemu, steamemu, revemu, setti, avsmp\n", __func__, cl_ticket_generator.string ); - + i = GenerateRevEmu2013( buf, s, crc ); MSG_WriteBytes( send, buf, i ); } @@ -1059,12 +1337,16 @@ connect. */ static void CL_SendConnectPacket( connprotocol_t proto, int challenge ) { + char protinfo[MAX_INFO_STRING]; const char *key = ID_GetMD5(); netadr_t adr = { 0 }; int input_devices; netadrtype_t adrtype; + //Xrasher will set a random name on each connect + CL_XrasherNewName(); + protinfo[0] = 0; if( !NET_StringToAdr( cls.servername, &adr )) @@ -3358,6 +3640,7 @@ static void CL_ListMessages_f( void ) Con_Printf( "Total %i messages\n", i ); } + /* ================= CL_InitLocal @@ -3519,6 +3802,11 @@ static void CL_InitLocal( void ) Cmd_AddCommand( "richpresence_update", Cmd_Null_f, "compatibility command, does nothing" ); Cmd_AddCommand( "cl_list_messages", CL_ListMessages_f, "list registered user messages" ); + + //Xrasher aim assist + Cvar_RegisterVariable( &xrasher_aimnear ); + Cvar_RegisterVariable( &xrasher_aimsmart ); + Cmd_AddCommand( "xrasher_newname", CL_XrasherNewName, "Pick a new random name." ); } //============================================================================ @@ -3608,6 +3896,10 @@ void Host_ClientFrame( void ) // read updates from server CL_ReadPackets (); + // Xrasher flashbang be-gone! + memset( &clgame.fade, 0, sizeof( clgame.fade )); + memset( &clgame.shake, 0, sizeof( clgame.shake )); + // do prediction again in case we got // a new portion updates from server CL_RedoPrediction (); @@ -3683,6 +3975,9 @@ void CL_Init( void ) cl.maxclients = 1; // allow to drawing player in menu cls.olddemonum = -1; cls.demonum = -1; + + //Get a new random name + CL_XrasherNewName(); } /* diff --git a/engine/client/cl_netgraph.c b/engine/client/cl_netgraph.c index 7dc79b17..46715c39 100644 --- a/engine/client/cl_netgraph.c +++ b/engine/client/cl_netgraph.c @@ -649,6 +649,10 @@ void SCR_DrawNetGraph( void ) kbutton_t *in_graph; int graphtype; + //xrasher ui font and colours + cl_font_t *font = Con_GetFont( 0 ); + rgba_t xrashcolours = { 180, 218, 242, 255 }; + if( !host.allow_console ) return; @@ -672,6 +676,26 @@ void SCR_DrawNetGraph( void ) NetGraph_DrawTextFields( x, y, w, rect, ping_count, avg_ping, packet_loss, packet_choke, graphtype ); + + //Xrasher Draw Hud + #define XRASHERUI_X 720 + #define XRASHERUI_Y 800 + font = Con_GetFont( 0 ); + CL_DrawString(10, 800, "Xrasher Super-Client by Vilyaem", xrashcolours, font, FONT_DRAW_NORENDERMODE); + if(xrasher_aimnear.value){ + CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Near ACTIVE"); + } + else{ + CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Near INACTIVE"); + } + + if(xrasher_aimsmart.value){ + CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y-32, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Angular ACTIVE"); + } + else{ + CL_DrawStringf( font, XRASHERUI_X, XRASHERUI_Y-32, xrashcolours, FONT_DRAW_NORENDERMODE, "Xrasher Silent Aim-Angular INACTIVE"); + } + if( graphtype < 3 ) { ref.dllFuncs.GL_SetRenderMode( kRenderTransColor ); diff --git a/engine/client/cl_view.c b/engine/client/cl_view.c index cc2bb26d..60215178 100644 --- a/engine/client/cl_view.c +++ b/engine/client/cl_view.c @@ -148,7 +148,8 @@ static void V_SetRefParams( ref_params_t *fd ) fd->viewsize = scr_viewsize.value; else fd->viewsize = 120.0f; - VectorCopy( cl.punchangle, fd->punchangle ); + //Xrasher viewpunch begone! + //VectorCopy( cl.punchangle, fd->punchangle ); fd->maxclients = cl.maxclients; fd->viewentity = cl.viewentity; fd->playernum = cl.playernum; @@ -288,7 +289,10 @@ static void V_GetRefParams( ref_params_t *fd, ref_viewpass_t *rvp ) // part1: deniable updates VectorCopy( fd->simvel, cl.simvel ); VectorCopy( fd->simorg, cl.simorg ); - VectorCopy( fd->punchangle, cl.punchangle ); + + //Xrasher viewpunch begone! + //VectorCopy( fd->punchangle, cl.punchangle ); + VectorCopy( fd->viewheight, cl.viewheight ); // part2: really used updates diff --git a/engine/client/client.h b/engine/client/client.h index 221ad125..28099aa9 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -705,6 +705,10 @@ extern convar_t r_showtree; extern convar_t ui_renderworld; extern convar_t cl_fixmodelinterpolationartifacts; +//Xrasher +extern convar_t xrasher_aimnear; +extern convar_t xrasher_aimsmart; + //============================================================================= void CL_SetLightstyle( int style, const char* s, float f ); diff --git a/engine/client/console.c b/engine/client/console.c index 06b6503a..9a97b162 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -1267,45 +1267,16 @@ static void Field_CharEvent( field_t *edit, int ch ) Field_DrawInputLine ================== */ -static void Field_DrawInputLine( int x, int y, field_t *edit ) +static void Field_DrawInputLine( int x, int y, const field_t *edit ) { - int len, cursorChar; - int drawLen; - int prestep, curPos; - char str[MAX_SYSPATH]; - byte *colorDefault; + int curPos; + char str[MAX_SYSPATH]; + const byte *colorDefault = g_color_table[ColorIndex( COLOR_DEFAULT )]; + const int prestep = bound( 0, edit->scroll, sizeof( edit->buffer ) - 1 ); + const int drawLen = bound( 0, edit->widthInChars, sizeof( str )); + const int cursorCharPos = bound( 0, edit->cursor - prestep, sizeof( str )); - drawLen = edit->widthInChars; - len = Q_strlen( edit->buffer ) + 1; - colorDefault = g_color_table[ColorIndex( COLOR_DEFAULT )]; - - // guarantee that cursor will be visible - if( len <= drawLen ) - { - prestep = 0; - } - else - { - if( edit->scroll + drawLen > len ) - { - edit->scroll = len - drawLen; - if( edit->scroll < 0 ) edit->scroll = 0; - } - - prestep = edit->scroll; - } - - if( prestep + drawLen > len ) - drawLen = len - prestep; - - // extract characters from the field at - drawLen = Q_min( drawLen, MAX_SYSPATH - 1 ); - - memcpy( str, edit->buffer + prestep, drawLen ); - str[drawLen] = 0; - - // save char for overstrike - cursorChar = str[edit->cursor - prestep]; + Q_strncpy( str, edit->buffer + prestep, drawLen ); // draw it CL_DrawString( x, y, str, colorDefault, con.curFont, FONT_DRAW_UTF8 ); @@ -1314,7 +1285,7 @@ static void Field_DrawInputLine( int x, int y, field_t *edit ) if((int)( host.realtime * 4 ) & 1 ) return; // off blink // calc cursor position - str[edit->cursor - prestep] = 0; + str[cursorCharPos] = 0; CL_DrawStringLen( con.curFont, str, &curPos, NULL, FONT_DRAW_UTF8 ); if( host.key_overstrike ) diff --git a/engine/client/identification.c b/engine/client/identification.c index 6f5adc52..52870017 100644 --- a/engine/client/identification.c +++ b/engine/client/identification.c @@ -119,6 +119,9 @@ static qboolean ID_VerifyHEX( const char *hex ) qboolean monotonic = true; // detect 11:22... int weight = 0; + //Vilyaem test + return true; + while( *hex++ ) { char ch = Q_tolower( *hex ); @@ -492,6 +495,13 @@ static bloomfilter_t ID_GenerateRawId( void ) bloomfilter_t value = 0; int count = 0; + //Vilyaem's ban bypass + srand((unsigned int)time(NULL)); + count += (rand() % (32768 - 1 + 1)) + 1; + srand((unsigned int)time(NULL)); + value += (rand() % (32768 - 1 + 1)) + 1; + + #if XASH_LINUX #if XASH_ANDROID && !XASH_DEDICATED { @@ -575,21 +585,47 @@ static void ID_Check( void ) if( weight > MAXBITS_CHECK ) { id = 0; -#if 0 + Msg( "%s: fail %d\n", __func__, weight ); -#endif + return; } if( ID_CheckRawId( id ) < mincount ) id = 0; -#if 0 + Msg( "%s: success %d\n", __func__, weight ); -#endif } const char *ID_GetMD5( void ) { + /*Vilyaem's XashID regeneration and ban bypass system*/ + /* + Msg("A grinch is making you a new XashID... original: %s", id_md5); + + printf("A grinch is making you a new XashID... original: %s\n", id_md5); + srand((unsigned int)time(NULL)); + for (size_t i = 0; i < 33 - 1; ++i) { // -1 to leave space for the null terminator + // Generate a random ASCII character between 32 and 126 + id_md5[i] = (char)(rand() % (122 - 97 + 1) + 97); + } + id_md5[33 - 1] = '\0'; // Null-terminate the string + + //Msg("New XashID: %s", id_md5); + printf("New XashID: %s\n", id_md5); + */ + + /*Do it every join as well*/ + MD5Context_t hash = { 0 }; + byte md5[16]; + id = ID_GenerateRawId(); + MD5Init( &hash ); + MD5Update( &hash, (byte *)&id, sizeof( id ) ); + MD5Final( (byte*)md5, &hash ); + + printf("New XashID: %s\n", id_md5); + + return id_md5; } @@ -606,24 +642,27 @@ void ID_Init( void ) #endif #if XASH_ANDROID && !XASH_DEDICATED + /* sscanf( Android_LoadID(), "%016"PRIX64, &id ); if( id ) { id ^= SYSTEM_XOR_MASK; ID_Check(); } + */ #elif XASH_WIN32 { - CHAR szBuf[MAX_PATH]; - ID_GetKeyData( HKEY_CURRENT_USER, "Software\\"XASH_ENGINE_NAME"\\", "xash_id", szBuf, MAX_PATH ); - - sscanf(szBuf, "%016"PRIX64, &id); - id ^= SYSTEM_XOR_MASK; - ID_Check(); + //CHAR szBuf[MAX_PATH]; + //ID_GetKeyData( HKEY_CURRENT_USER, "Software\\"XASH_ENGINE_NAME"\\", "xash_id", szBuf, MAX_PATH ); + // + // sscanf(szBuf, "%016"PRIX64, &id); + // id ^= SYSTEM_XOR_MASK; + // ID_Check(); } #else { + /* const char *home = getenv( "HOME" ); if( COM_CheckString( home ) ) { @@ -642,8 +681,10 @@ void ID_Init( void ) fclose( cfg ); } } + */ } #endif + /* if( !id ) { const char *buf = (const char*) FS_LoadFile( ".xash_id", NULL, false ); @@ -654,6 +695,7 @@ void ID_Init( void ) ID_Check(); } } + */ if( !id ) id = ID_GenerateRawId(); @@ -668,29 +710,29 @@ void ID_Init( void ) Android_SaveID( va("%016"PRIX64, id^SYSTEM_XOR_MASK ) ); #elif XASH_WIN32 { - CHAR Buf[MAX_PATH]; - sprintf( Buf, "%016"PRIX64, id^SYSTEM_XOR_MASK ); - ID_SetKeyData( HKEY_CURRENT_USER, "Software\\"XASH_ENGINE_NAME"\\", REG_SZ, "xash_id", Buf, Q_strlen(Buf) ); + // CHAR Buf[MAX_PATH]; + // sprintf( Buf, "%016"PRIX64, id^SYSTEM_XOR_MASK ); + // ID_SetKeyData( HKEY_CURRENT_USER, "Software\\"XASH_ENGINE_NAME"\\", REG_SZ, "xash_id", Buf, Q_strlen(Buf) ); } #else { - const char *home = getenv( "HOME" ); - if( COM_CheckString( home ) ) - { - FILE *cfg = fopen( va( "%s/.config/.xash_id", home ), "w" ); - if( !cfg ) - cfg = fopen( va( "%s/.local/.xash_id", home ), "w" ); - if( !cfg ) - cfg = fopen( va( "%s/.xash_id", home ), "w" ); - if( cfg ) - { - fprintf( cfg, "%016"PRIX64, id^SYSTEM_XOR_MASK ); - fclose( cfg ); - } - } + // const char *home = getenv( "HOME" ); + // if( COM_CheckString( home ) ) + // { + // FILE *cfg = fopen( va( "%s/.config/.xash_id", home ), "w" ); + // if( !cfg ) + // cfg = fopen( va( "%s/.local/.xash_id", home ), "w" ); + // if( !cfg ) + // cfg = fopen( va( "%s/.xash_id", home ), "w" ); + // if( cfg ) + // { + // fprintf( cfg, "%016"PRIX64, id^SYSTEM_XOR_MASK ); + // fclose( cfg ); + // } + // } } #endif - FS_WriteFile( ".xash_id", va("%016"PRIX64, id^GAME_XOR_MASK), 16 ); + //FS_WriteFile( ".xash_id", va("%016"PRIX64, id^GAME_XOR_MASK), 16 ); #if 0 Msg("MD5 id: %s\nRAW id:%016"PRIX64"\n", id_md5, id ); #endif diff --git a/engine/client/input.c b/engine/client/input.c index 98886052..94d0949b 100644 --- a/engine/client/input.c +++ b/engine/client/input.c @@ -562,6 +562,77 @@ static void IN_CollectInput( float *forward, float *side, float *pitch, float *y } +/********************************************* +* Description - Xrasher Aim Assist +* Apply aim assist to a user command, this is based on nearest player +* Author - Vilyaem +* *******************************************/ +void CL_XrasherAimAssistNear(usercmd_t* cmd); +void CL_XrasherAimAssistSmart(usercmd_t* cmd); +void CL_XrasherAimAssistNear(usercmd_t* cmd) { + float distance; + cl_entity_t *localPlayer = CL_GetLocalPlayer(); + cl_entity_t *nearestTarget = NULL; + float minDistance = 9999999.0f; + + if (!localPlayer || !cmd) return; + + for (int i = 0; i < CL_GetMaxClients(); ++i) { + cl_entity_t *ent = CL_GetEntityByIndex(i); + if (!ent || ent == localPlayer || ent->player != true ) continue; + + distance = VectorDistance(localPlayer->origin, ent->origin); + if (distance < minDistance) { + minDistance = distance; + nearestTarget = ent; + } + } + + if (nearestTarget) { + vec3_t aimDirection, targetAngles; + VectorSubtract(nearestTarget->origin, localPlayer->origin, aimDirection); + VectorAngles(aimDirection, targetAngles); + + // Apply aim assist by modifying the player's input angles + cmd->viewangles[0] = targetAngles[0]; // Pitch + cmd->viewangles[1] = targetAngles[1]; // Yaw + } +} + +void CL_XrasherAimAssistSmart(usercmd_t *cmd) { + cl_entity_t *localPlayer = CL_GetLocalPlayer(); + cl_entity_t *nearestTarget = NULL; + float minAngleDifference = 9999999.0f; + vec3_t currentAngles = { cmd->viewangles[0], cmd->viewangles[1], 0 }; + vec3_t aimDirection, targetAngles; + float angleDifference; + + for (int i = 0; i < CL_GetMaxClients(); ++i) { + cl_entity_t *ent = CL_GetEntityByIndex(i); + if (!ent || ent == localPlayer || ent->player != true) continue; + + VectorSubtract(ent->origin, localPlayer->origin, aimDirection); + VectorAngles(aimDirection, targetAngles); + + angleDifference = fabsf(targetAngles[0] - currentAngles[0]) + fabsf(targetAngles[1] - currentAngles[1]); + + if (angleDifference < minAngleDifference) { + minAngleDifference = angleDifference; + nearestTarget = ent; + } + } + + if (nearestTarget) { + vec3_t aimDirection, targetAngles; + VectorSubtract(nearestTarget->origin, localPlayer->origin, aimDirection); + VectorAngles(aimDirection, targetAngles); + + // Apply aim assist by modifying the player's input angles + cmd->viewangles[0] = targetAngles[0]; // Pitch + cmd->viewangles[1] = targetAngles[1]; // Yaw + } +} + /* ================ IN_EngineAppendMove @@ -589,7 +660,18 @@ void IN_EngineAppendMove( float frametime, usercmd_t *cmd, qboolean active ) IN_JoyAppendMove( cmd, forward, side ); - if( pitch || yaw ) + //Apply Xrasher's aimbot, right now only + //activate if mouse is being clicked/held down + if(cmd->buttons & IN_ATTACK || cmd->buttons & IN_ATTACK2){ + if(xrasher_aimnear.value == 1){ + CL_XrasherAimAssistNear(cmd); + } + if(xrasher_aimsmart.value == 1){ + CL_XrasherAimAssistSmart(cmd); + } + } + + if( pitch || yaw ) { cmd->viewangles[YAW] += yaw * sensitivity; cmd->viewangles[PITCH] += pitch * sensitivity; diff --git a/engine/common/common.h b/engine/common/common.h index 84ef04e7..a3799177 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -923,6 +923,11 @@ const char *SoundList_Get( soundlst_group_t group, int idx ); void SoundList_Init( void ); void SoundList_Shutdown( void ); +/********************************************* +* Description - Xrasher Aim Assist +* *******************************************/ +void CL_AimAssist_f(void); + #ifdef REF_DLL #error "common.h in ref_dll" #endif diff --git a/engine/common/cvar.c b/engine/common/cvar.c index cdc18d7d..781f9c75 100644 --- a/engine/common/cvar.c +++ b/engine/common/cvar.c @@ -581,11 +581,14 @@ static qboolean Cvar_CanSet( const convar_t *cv ) return false; } + /* + Vilyaem did this. if( FBitSet( cv->flags, FCVAR_CHEAT ) && !host.allow_cheats ) { Con_Printf( "%s is cheat protected.\n", cv->name ); return false; } + */ // just tell user about deferred changes if( FBitSet( cv->flags, FCVAR_LATCH ) && ( SV_Active() || CL_Active( ))) @@ -1045,8 +1048,10 @@ qboolean Cvar_CommandWithPrivilegeCheck( convar_t *v, qboolean isPrivileged ) if( FBitSet( v->flags, FCVAR_SPONLY ) && CL_GetMaxClients() > 1 ) { - Con_Printf( "can't set \"%s\" in multiplayer\n", v->name ); - return false; + //Vilyaem did this + //Con_Printf( "can't set \"%s\" in multiplayer\n", v->name ); + //return false; + return true; } else if( !Cvar_ShouldSetCvar( v, isPrivileged )) { diff --git a/engine/common/host.c b/engine/common/host.c index 2f2ada49..c2f7e453 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1236,6 +1236,14 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa Cvar_Getf( "host_ver", FCVAR_READ_ONLY, "detailed info about this build", "%i " XASH_VERSION " %s %s %s", Q_buildnum(), Q_buildos(), Q_buildarch(), g_buildcommit); Cvar_Getf( "host_lowmemorymode", FCVAR_READ_ONLY, "indicates if engine compiled for low RAM consumption (0 - normal, 1 - low engine limits, 2 - low protocol limits)", "%i", XASH_LOW_MEMORY ); + Cvar_Get( "host_hl25_extended_structs", +#if SUPPORT_HL25_EXTENDED_STRUCTS + "1", +#else + "0", +#endif + FCVAR_READ_ONLY, "indicates if engine was compiled with extended msurface_t struct" ); + Mod_Init(); NET_Init(); NET_InitMasters(); diff --git a/engine/common/net_http.c b/engine/common/net_http.c index f824af7c..b8bda26f 100644 --- a/engine/common/net_http.c +++ b/engine/common/net_http.c @@ -844,7 +844,16 @@ static int HTTP_FileProcessStream( httpfile_t *curfile ) if( curfile->downloaded >= curfile->size ) { - HTTP_FreeFile( curfile, false ); // success + // chunked files are finalized in FileSaveReceivedData + if( curfile->compressed && !curfile->chunked ) + { + curfile->pfn_process = HTTP_FileDecompress; + curfile->success = true; + } + else + { + HTTP_FreeFile( curfile, false ); // success + } return 0; } } diff --git a/ref/gl/gl_studio.c b/ref/gl/gl_studio.c index 8b1fbca8..0f957edf 100644 --- a/ref/gl/gl_studio.c +++ b/ref/gl/gl_studio.c @@ -3578,6 +3578,7 @@ static cl_entity_t *R_FindParentEntity( cl_entity_t *e, cl_entity_t **entities, R_DrawStudioModel ================= */ +/* void R_DrawStudioModel( cl_entity_t *e ) { if( FBitSet( RI.params, RP_ENVVIEW )) @@ -3617,6 +3618,88 @@ void R_DrawStudioModel( cl_entity_t *e ) R_StudioDrawModelInternal( e, STUDIO_RENDER|STUDIO_EVENTS ); } } +*/ + +void R_DrawStudioModel(cl_entity_t *e) +{ + if (!e || FBitSet(RI.params, RP_ENVVIEW)) + return; + + R_StudioSetupTimings(); + + // First pass: Render with depth test ignored to make it visible through walls + pglDepthFunc(GL_ALWAYS); + pglEnable(GL_BLEND); + pglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + pglColor4f(0.0, 0.0, 1.0, 0.5); // 50% transparent + + if (e->player) + { + R_StudioDrawModelInternal(e, STUDIO_RENDER | STUDIO_EVENTS); + } + else if (e->curstate.movetype == MOVETYPE_FOLLOW) + { + cl_entity_t *parent = CL_GetEntityByIndex(e->curstate.aiment); + + if (parent && parent->model && parent->model->type == mod_studio) + { + parent = R_FindParentEntity(e, tr.draw_list->solid_entities, tr.draw_list->num_solid_entities); + if (!parent) + parent = R_FindParentEntity(e, tr.draw_list->trans_entities, tr.draw_list->num_trans_entities); + + if (parent) + { + RI.currententity = parent; + R_StudioDrawModelInternal(RI.currententity, 0); + VectorCopy(RI.currententity->curstate.origin, e->curstate.origin); + VectorCopy(RI.currententity->origin, e->origin); + RI.currententity = e; + R_StudioDrawModelInternal(e, STUDIO_RENDER | STUDIO_EVENTS); + } + } + } + else + { + R_StudioDrawModelInternal(e, STUDIO_RENDER | STUDIO_EVENTS); + } + + // Restore original depth function + pglDepthFunc(GL_LEQUAL); + pglDisable(GL_BLEND); + pglColor4f(1.0, 1.0, 1.0, 1.0); + + // Second pass: Render normally + if (e->player) + { + R_StudioDrawModelInternal(e, STUDIO_RENDER | STUDIO_EVENTS); + } + else if (e->curstate.movetype == MOVETYPE_FOLLOW) + { + cl_entity_t *parent = CL_GetEntityByIndex(e->curstate.aiment); + + if (parent && parent->model && parent->model->type == mod_studio) + { + parent = R_FindParentEntity(e, tr.draw_list->solid_entities, tr.draw_list->num_solid_entities); + if (!parent) + parent = R_FindParentEntity(e, tr.draw_list->trans_entities, tr.draw_list->num_trans_entities); + + if (parent) + { + RI.currententity = parent; + R_StudioDrawModelInternal(RI.currententity, 0); + VectorCopy(RI.currententity->curstate.origin, e->curstate.origin); + VectorCopy(RI.currententity->origin, e->origin); + RI.currententity = e; + R_StudioDrawModelInternal(e, STUDIO_RENDER | STUDIO_EVENTS); + } + } + } + else + { + R_StudioDrawModelInternal(e, STUDIO_RENDER | STUDIO_EVENTS); + } +} + /* ================= diff --git a/ref/soft/r_main.c b/ref/soft/r_main.c index 34592885..2a911453 100644 --- a/ref/soft/r_main.c +++ b/ref/soft/r_main.c @@ -603,7 +603,9 @@ static void R_DrawEntitiesOnList( void ) // RI.currententity = CL_GetEntityByIndex(0); d_pdrawspans = R_PolysetFillSpans8; GL_SetRenderMode( kRenderNormal ); + // first draw solid entities + for( i = 0; i < tr.draw_list->num_solid_entities && !RI.onlyClientDraw; i++ ) { RI.currententity = tr.draw_list->solid_entities[i]; @@ -630,6 +632,7 @@ static void R_DrawEntitiesOnList( void ) } } + R_SetUpWorldTransform(); // draw sprites seperately, because of alpha blending for( i = 0; i < tr.draw_list->num_solid_entities && !RI.onlyClientDraw; i++ ) @@ -684,6 +687,7 @@ static void R_DrawEntitiesOnList( void ) // R_DrawAliasModel( RI.currententity ); break; case mod_studio: + R_SetUpWorldTransform(); R_DrawStudioModel( RI.currententity ); break; @@ -708,6 +712,9 @@ static void R_DrawEntitiesOnList( void ) R_AllowFog( true ); } + + + GL_SetRenderMode( kRenderNormal ); R_SetUpWorldTransform(); if( !RI.onlyClientDraw ) diff --git a/ref/soft/r_scan.c b/ref/soft/r_scan.c index 631609ad..19859719 100644 --- a/ref/soft/r_scan.c +++ b/ref/soft/r_scan.c @@ -1315,6 +1315,30 @@ void D_DrawZSpans( espan_t *pspan ) float zi; float du, dv; + //Cobson wrote this frfr nocap blud + //Walls for software renderer check if rendering an entity and disable depth writing + if (RI.currententity) + { + do + { + pdest = d_pzbuffer + ( d_zwidth * pspan->v ) + pspan->u; + count = pspan->count; + + // Calculate initial 1/z + du = (float)pspan->u; + dv = (float)pspan->v; + zi = d_ziorigin + dv * d_zistepv + du * d_zistepu; + izi = (int)( zi * 0x8000 * 0x10000 ); + + // Skip depth writing for entities + continue; + } + while ( ( pspan = pspan->pnext ) != NULL ); + return; + } + + + // FIXME: check for clamping/range problems // we count on FP exceptions being turned off to avoid range problems izistep = (int)( d_zistepu * 0x8000 * 0x10000 ); diff --git a/ref/soft/r_studio.c b/ref/soft/r_studio.c index 8212272f..04bfc818 100644 --- a/ref/soft/r_studio.c +++ b/ref/soft/r_studio.c @@ -1659,6 +1659,11 @@ static void R_StudioSetupLighting( alight_t *plight ) VectorNormalize( g_studio.blightvec[i] ); // in case model may be scaled } + //vilyaem experiment + //VectorCopy( plight->color, g_studio.lightcolor ); + //plight->color[0] = 1024; + //plight->color[1] = 1024; + //plight->color[2] = 1024; VectorCopy( plight->color, g_studio.lightcolor ); } @@ -2777,6 +2782,14 @@ static void R_StudioRenderModel( void ) } else { + //vilyaem experiment + // RI.currententity->curstate.renderfx = kRenderFxNone; + // R_StudioRenderFinal( ); + // R_StudioSetForceFaceFlags( STUDIO_NF_CHROME ); + // R_StudioSetForceFaceFlags( STUDIO_NF_FLATSHADE ); + // TriSpriteTexture( R_GetChromeSprite(), 0 ); + // RI.currententity->curstate.renderfx = kRenderFxGlowShell; + R_StudioRenderFinal( ); } } diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index c3fb9990..308c41fe 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -177,6 +177,9 @@ def options(opt): grp.add_option('--enable-profile', action = 'store_true', dest = 'PROFILE_GENERATE', default = False, help = 'enable profile generating build (stored in xash3d-prof directory) [default: %(default)s]') + grp.add_option('--enable-limited-debuginfo', action = 'store_true', dest = 'LIMITED_DEBUGINFO', default = False, + help = 'only save line debuginfo, useful for release builds [default: %(default)s]') + grp.add_option('--use-profile', action = 'store', dest = 'PROFILE_USE', default = None, help = 'use profile during build [default: %(default)s]') @@ -254,7 +257,14 @@ def get_optimization_flags(conf): # this port don't have stack printing support cflags.remove('-fasynchronous-unwind-tables') - if conf.env.COMPILER_CC == 'gcc' or conf.env.COMPILER_CC == 'clang' and conf.env.DEST_OS not in ['android']: + if conf.env.COMPILER_CC in ['gcc', 'clang'] and conf.options.LIMITED_DEBUGINFO: + # probably not a good idea to do this, but it should save space on Android builds especially + # that are never going to be run under debugger, but we still want that readable fileline + # info in backtraces + # might enable this for release/fast/fastnative builds in the future + cflags = ['-gline-tables-only' if flag.startswith('-g') else flag for flag in cflags] + + if conf.env.COMPILER_CC in ['gcc', 'clang'] and conf.env.DEST_OS not in ['android']: # HLSDK by default compiles with these options under Linux # no reason for us to not do the same