2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00
Reverse-engineered HLDS
Go to file
2018-05-04 23:37:18 +03:00
buildSrc Add badge to README.md 2017-01-13 02:38:51 +07:00
dep Reconstruction & cleanup include files 2017-07-23 17:05:15 +07:00
flightrec GCC support (#339) 2017-02-11 01:51:22 +05:00
gradle/wrapper Link libstdc++ statically on linux 2015-06-06 23:40:49 +04:00
msvc Removed HOOK_ENGINE 2017-12-12 18:32:38 +07:00
rehlds Merge pull request #581 from dreamstalker/hltv_frag_validation 2018-05-04 23:37:18 +03:00
.editorconfig Basic editor rules. 2017-02-18 17:10:15 +05:00
.gitignore Refactoring world.cpp, sv_phys.cpp, sv_move.cpp 2017-12-09 14:12:35 +07:00
build.gradle GCC support (#339) 2017-02-11 01:51:22 +05:00
getucrtinfo.bat Temporary add support for VS2015 in old gradle. 2017-03-09 19:59:14 +05:00
gradle.properties ReHLDS API: Implemented CRehldsServerStatic::GetMaxClientsLimit 2018-01-24 17:34:06 +07:00
gradlew Link clock_gettime from librt to avoid dependency of GLIBC_1.17 2015-06-12 17:15:23 -05:00
gradlew.bat Initial commit 2015-05-04 22:25:41 +04:00
LICENSE Initial commit 2015-05-04 22:21:48 +04:00
publish.gradle Add project FileSystem_Stdio 2017-12-06 02:38:58 +07:00
README.md Removed HOOK_ENGINE 2017-12-12 18:32:38 +07:00
settings.gradle Add project FileSystem_Stdio 2017-12-06 02:38:58 +07:00
shared_gcc.gradle Add project FileSystem_Stdio 2017-12-06 02:38:58 +07:00
shared_icc.gradle ICC: Use -fp-model precise for ANSI/IEEE standards compliance 2017-12-15 02:56:20 +07:00
shared_msvc.gradle Restructuring of rehlds for HLTV project. 2017-04-24 04:25:31 +07:00
shared.gradle GCC support (#339) 2017-02-11 01:51:22 +05:00
version_script.lds Optimize size by removing unused data and functions 2017-09-28 21:10:33 +04:00

Rehlds Build Status Download

Reverse-engineered (and bugfixed) HLDS

What is this?

ReHLDS is a result of reverse engineering of original HLDS (build 6152/6153) using DWARF debug info embedded into linux version of HLDS, engine_i486.so

Along with reverse engineering, a lot of defects and (potential) bugs were found and fixed

You can try play on one of the servers that using rehlds: http://www.gametracker.com/search/?search_by=server_variable&search_by2=sv_version

Goals of the project

  • Provide more stable (than official) version of Half-Life dedicated server with extended API for mods and plugins
  • Performance optimizations (use of SSE for vector math for example) is another goal for the future

How can use it?

Rehlds is fully compatible with latest official HLDS downloaded by steamcmd. All you have to do is to download rehlds binaries and replace original swds.dll/engine_i486.so. For windows you can also copy a swds.pdb file with a debug information.
Warning! Rehlds is not compatible with an old 5xxx or below platforms downloaded by hldsupdatetool.

Compiled binaries are available here: http://nexus.rehlds.org/nexus/content/repositories/rehlds-dev/rehlds/rehlds/

Rehlds binaries require SSE, SSE2 and SSE3 instruction sets to run and can benefit from SSE4.1 and SSE4.2.

Archive's bin directory contains 2 subdirectories, 'bugfixed' and 'pure'

  • 'pure' version is designed to work exactly as official hlds engine
  • 'bugfixed' version contains some fixes and improvements

Warning! Rehlds is not binary compatible with original hlds since it's compiled with compilers other than ones used for original hlds. This means that plugins that do binary code analysis (Orpheu for example) probably will not work with rehlds.

Configuring

Bugfixed version of rehlds contains an additional cvars:

  • listipcfgfile // File for permanent ip bans. Default: listip.cfg
  • syserror_logfile // File for the system error log. Default: sys_error.log
  • sv_auto_precache_sounds_in_models <1|0> // Automatically precache sounds attached to models. Deault: 0
  • sv_delayed_spray_upload <1|0> // Upload custom sprays after entering the game instead of when connecting. It increases upload speed. Default: 0
  • sv_echo_unknown_cmd <1|0> // Echo in the console when trying execute an unknown command. Default: 0
  • sv_rcon_condebug <1|0> // Print rcon debug in the console. Default: 1
  • sv_force_ent_intersection <1|0> // In a 3-rd party plugins used to force colliding of SOLID_SLIDEBOX entities. Default: 0
  • sv_rehlds_force_dlmax <1|0> // Force a client's cl_dlmax cvar to 1024. It avoids an excessive packets fragmentation. Default: 0
  • sv_rehlds_hull_centering <1|0> // Use center of hull instead of corner. Default: 0
  • sv_rehlds_movecmdrate_max_avg // Max average level of 'move' cmds for ban. Default: 400
  • sv_rehlds_movecmdrate_avg_punish // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5
  • sv_rehlds_movecmdrate_max_burst // Max burst level of 'move' cmds for ban. Default: 2500
  • sv_rehlds_movecmdrate_burst_punish // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5
  • sv_rehlds_send_mapcycle <1|0> // Send mapcycle.txt in serverinfo message (HLDS behavior, but it is unused on the client). Default: 0
  • sv_rehlds_stringcmdrate_max_avg // Max average level of 'string' cmds for ban. Default: 80
  • sv_rehlds_stringcmdrate_avg_punish // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5
  • sv_rehlds_stringcmdrate_max_burst // Max burst level of 'string' cmds for ban. Default: 400
  • sv_rehlds_stringcmdrate_burst_punish // Time in minutes for which the player will be banned (0 - Permanent, use a negative number for a kick). Default: 5
  • sv_rehlds_userinfo_transmitted_fields // Userinfo fields only with these keys will be transmitted to clients via network. If not set then all fields will be transmitted (except prefixed with underscore). Each key must be prefixed by backslash, for example "\name\model\*sid\*hltv\bottomcolor\topcolor". Default: ""
  • sv_rehlds_attachedentities_playeranimationspeed_fix // Fixes bug with gait animation speed increase when player has some attached entities (aiments). Can cause animation lags when cl_updaterate is low. Default: 0

Commands

Bugfixed version of rehlds contains an additional commands:

  • rescount // Prints the total count of precached resources in the server console
  • reslist <sound | model | decal | generic | event> // Separately prints the details of the precached resources for sounds, models, decals, generic and events in server console. Useful for managing resources and dealing with the goldsource precache limits.

Build instructions

There are several software requirements for building rehlds:

  1. Java Development Kit (JDK) 7+ (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
  2. For Windows: Visual Studio 2013 and later
  3. For Linux: Intel C++ Compiler 13 and later or GCC 4.9.2 or later (some earlier versions might work too)

Checking requirements

JDK version

Windows

> %JAVA_HOME%\bin\javac -version
javac 1.8.0_25

Linux

$ javac -version
javac 1.7.0_65

Visual Studio

Help -> About

ICC

$ icc --version
icc (ICC) 15.0.1 20141023

GCC

$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2

Building

On Windows:

gradlew --max-workers=1 clean buildRelease
  • For faster building without unit tests use this
gradlew --max-workers=1 clean buildFixes

NOTE: You can also use Visual Studio to build, just select from the solution configurations list Release Swds or Debug Swds

On Linux (ICC):

./gradlew --max-workers=1 clean buildRelease
  • For faster building without unit tests use this
./gradlew --max-workers=1 clean buildFixes

On Linux (GCC):

./gradlew --max-workers=1 -PuseGcc clean buildRelease
  • For faster building without unit tests use this
./gradlew --max-workers=1 -PuseGcc clean buildFixes

Also there is a task buildEngine, it builds only engine, without other parts of the project.
Compiled binaries will be placed in the rehlds/build/binaries/ directory

How can I help the project?

Just install it on your game server and report problems you faced. Merge requests are also welcome :)