🔨 Reverse-engineered gamedll (CS 1.6 / CZero)
Go to file
2023-04-01 00:53:04 +07:00
.github/workflows CI: Keep the ICC build for releases only (#800) 2022-12-18 00:28:36 +03:00
dep/cppunitlite game_player_equip fixes/enhancement (#618) 2021-05-22 18:15:28 +07:00
dist Update func_vehicle for multiplayer (#792) 2022-12-07 02:11:25 +07:00
msvc Remove gradle build system & Cleanup 2021-04-12 21:51:51 +07:00
regamedll fix incorrect player 3rd cam animations on death while frozen. (#815) 2023-04-01 00:53:04 +07:00
.editorconfig Added gitattributes and updated editorconfig files 2019-09-21 18:57:14 +07:00
.gitattributes Remove gradle build system & Cleanup 2021-04-12 21:51:51 +07:00
.gitignore Remove gradle build system & Cleanup 2021-04-12 21:51:51 +07:00
.gitmodules Add workflows/build.yml (Migrate to Github CI) 2021-04-13 04:16:21 +07:00
build.sh build.sh add help [skip ci] 2021-04-13 05:38:00 +07:00
CMakeLists.txt Add workflows/build.yml (Migrate to Github CI) 2021-04-13 04:16:21 +07:00
LICENSE Create LICENSE 2016-10-11 21:56:06 +07:00
README.md Update func_vehicle for multiplayer (#792) 2022-12-07 02:11:25 +07:00
version_script.lds Added support building using cmake 2020-02-06 04:32:20 +07:00

ReGameDLL_CS Download Downloads Percentage of issues still open License: GPL v3 Counter-Strike 1.6 GameDLL

Reverse-engineered gamedll (mp.dll / Counter-Strike)

What is this?

Regamedll_CS is a result of reverse engineering of original library mod HLDS (build 6153beta) using DWARF debug info embedded into linux version of HLDS, cs.so

Goals of the project

  • Provide more stable (than official) version of Counter-Strike game with extended API for mods and plugins

How can use it?

ReGameDLL_CS is fully compatible with official mod CS 1.6 / CZero by Valve. All you have to do is to download binaries and replace original mp.dll/cs.so

Downloads

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

How can use beta?

ReGameDLL_CS also have beta version with latest changes from official version of Counter-Strike.
  • Enter -beta option at the command line HLDS.

Commands

Command Description
game version Will show GameDLL build version, date & URL.
endround Args:
T force round end with Terrorists win.
CT force round end with Counter-Terrorists win.
or terminate round draw when called without arguments.
swapteams Swap the teams and restart the game (1 sec delay to restart by default).
Args:
0 - swap teams without restart.
>0.001 - time delay in seconds to restart the round after swap.
give Give weapon command.
Args:
<weapon_name>
Usage:
give weapon_ak47
give weapon_usp

NOTE: sv_cheats 1 required.
impulse 255 Give all weapons.

NOTE: sv_cheats 1 required.

Configuration (cvars)

Click to expand
CVar Default Min Max Description
mp_freeforall 0 0 1 The style of gameplay where there aren't any teams (FFA mode)
0 disabled
1 enabled
mp_autoteambalance 1 0 2 Auto balancing of teams.
0 disabled
1 on after next round
2 on next round
mp_buytime 1.5 0.0 - Designate the desired amount of buy time for each round. (in minutes)
-1 means no time limit
0 disable buy
mp_maxmoney 16000 0 999999 The maximum allowable amount of money in the game
mp_round_infinite 0 0 1 Flags for fine grained control (choose as many as needed)
0 disabled
1 enabled

or flags
a block round time round end check
b block needed players round end check
c block VIP assassination/success round end check
d block prison escape round end check
e block bomb round end check
f block team extermination round end check
g block hostage rescue round end check
h block VIP assassination/success round time end check
i block prison escape round time end check
j block bomb round time end check
k block hostage rescue round time end check

Example setting: "ae" blocks round time and bomb round end checks
mp_roundover 0 0 3 The round by expired time will be over, if on a map it does not have the scenario of the game.
0 disabled
1 end of the round with a draw
2 round end with Terrorists win
3 round end with Counter-Terrorists win
mp_round_restart_delay 5 - - Number of seconds to delay before restarting a round after a win.
mp_hegrenade_penetration 0 0 1 Disable grenade damage through walls.
0 disabled
1 enabled
mp_nadedrops 0 0 2 Drop a grenade after player death.
0 disabled
1 drop first available grenade
2 drop all grenades
mp_roundrespawn_time 20 0 - Player cannot respawn until next round if more than N seconds has elapsed since the beginning round.
-1 means no time limit
mp_auto_reload_weapons 0 0 1 Automatically reload each weapon on player spawn.
0 disabled
1 enabled
mp_refill_bpammo_weapons 0 0 2 Refill amount of backpack ammo up to the max.
0 disabled
1 refill backpack ammo on player spawn
2 refill backpack ammo on player spawn and on the purchase of the item
mp_infinite_ammo 0 0 2 Sets the mode infinite ammo for weapons.
0 disabled
1 weapon clip infinite
2 weapon bpammo infinite (This means for reloading)
mp_infinite_grenades 0 0 1 Enable infinite grenades.
0 disabled
1 grenades infinite
mp_auto_join_team 0 0 1 Automatically joins the team.
0 disabled
1 enable (Use in conjunction with the cvar humans_join_team any/CT/T)
mp_max_teamkills 3 0 - Maximum number of allowed teamkills before autokick. Used when enabled mp_autokick.
mp_fragsleft - - - Is the number of frags left, if you have set mp_fraglimit. You just type mp_fragsleft in server console, and it tells you the number of frags left depending of mp_fraglimit.
mp_fraglimit 0 0 - If set to something other than 0, when anybodys scored reaches mp_fraglimit the server changes map.
0 means no limit
mp_timeleft - - - Is the number of time left before the map changes, if you have set mp_timelimit. You just type mp_timeleft in server console, and it tells you the number of time left depending of mp_timelimit.
mp_timelimit 0 - - Period between map rotations.
0 means no limit
mp_forcerespawn 0 0 - Players will automatically respawn when killed.
0 disabled
>0.00001 time delay to respawn
mp_hostage_hurtable 1 0 1 The hostages can take damage.
0 disabled
1 from any team
2 only from CT
3 only from T
mp_show_radioicon 1 0 1 Show radio icon.
0 disabled
1 enabled
mp_show_scenarioicon 0 0 1 Show scenario icon in HUD such as count of alive hostages or ticking bomb.
0 disabled
1 enabled
mp_old_bomb_defused_sound 1 0 1 Play "Bomb has been defused" sound instead of "Counter-Terrorists win" when bomb was defused
0 disabled
1 enabled
showtriggers 0 0 1 Debug cvar shows triggers.
sv_alltalk 0 0 5 When players can hear each other (further explanation).
0 dead don't hear alive
1 no restrictions
2 teammates hear each other
3 Same as 2, but spectators hear everybody
4 alive hear alive, dead hear dead and alive.
5 alive hear alive teammates, dead hear dead and alive.
bot_deathmatch 0 0 1 Sets the mode for the zBot.
0 disabled
1 enable mode Deathmatch and not allow to do the scenario
bot_quota_mode normal - - Determines the type of quota.
normal default behaviour
fill the server will adjust bots to keep N players in the game, where N is bot_quota
match the server will maintain a 1:N ratio of humans to bots, where N is bot_quota
bot_join_delay 0 - - Prevents bots from joining the server for this many seconds after a map change.
bot_freeze 0 0 1 Prevents bots on your server from moving.
0 disabled
1 enabled
mp_item_staytime 300 - - Time to remove item that have been dropped from the players.
mp_legacy_bombtarget_touch 1 0 1 Legacy func_bomb_target touch. New one is more strict.
0 New behavior
1 Legacy behavior
mp_respawn_immunitytime 0 0 - Specifies the players defense time after respawn. (in seconds).
0 disabled
>0.00001 time delay to remove protection
mp_respawn_immunity_effects 1 0 1 Enable effects on player spawn protection.
0 disabled
1 enable (Use in conjunction with the cvar mp_respawn_immunitytime)
mp_respawn_immunity_force_unset 1 0 2 Force unset spawn protection if the player doing any action.
0 disabled
1 when moving and attacking
2 only when attacking
mp_kill_filled_spawn 1 0 1 Kill the player in filled spawn before spawning some one else (Prevents players stucking in each other).
Only disable this if you have semiclip or other plugins that prevents stucking.
0 disabled
1 enabled
mp_allow_point_servercommand 0 0 1 Allow use of point_servercommand entities in map.
0 disallow
1 allow
NOTE: Potentially dangerous for untrusted maps.
mp_hullbounds_sets 1 0 1 Sets mins/maxs hull bounds for the player.
0 disabled
1 enabled
mp_unduck_method 0 0 1 Don't unduck if ducking isn't finished yet.
0 disabled
1 enabled
NOTE: This also prevents double duck.
mp_scoreboard_showhealth 3 -1 5 Show HP field into a scoreboard.
-1 disabled
0 don't send any update for HP field to any clients
1 show only Terrorist HP field to all clients
2 show only CT HP field to all clients
3 show HP field to teammates
4 show HP field to all clients
5 show HP field to teammates and spectators
mp_scoreboard_showmoney 3 -1 5 Show Money field into a scoreboard.
-1 disabled
0 don't send any update for Money field to any clients
1 show only Terrorist Money field to all clients
2 show only CT Money field to all clients
3 show Money field to teammates
4 show Money field to all clients
5 show Money field to teammates and spectators
mp_scoreboard_showdefkit 1 0 1 Show D. Kit field into a scoreboard for teammates.
0 disabled
1 enabled
NOTE: If you don't want to show D. Kit field for dead enemies then disable this CVar or configure mp_forcecamera
ff_damage_reduction_bullets 0.35 0.0 1.0 How much to reduce damage done to teammates when shot.
Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
ff_damage_reduction_grenade 0.25 0.0 1.0 How much to reduce damage done to teammates by a thrown grenade.
Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
ff_damage_reduction_grenade_self 1.0 0.0 1.0 How much to damage a player does to himself with his own grenade.
Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
ff_damage_reduction_other 0.35 0.0 1.0 How much to reduce damage done to teammates by things other than bullets and grenades.
Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
mp_afk_bomb_drop_time 0 5.0 - Player that have never moved sience they last move will drop the bomb after this amount of time. (in seconds).
0 disabled
>5.0 delay to drop
mp_radio_timeout 1.5 0.0 - Delay between player Radio messages. (in seconds).
0 disable delay
mp_radio_maxinround 60 - - Maximum Radio messages count for player per round.
0 disable radio messages
mp_buy_anywhere 0 0 3 When set, players can buy anywhere, not only in buyzones.
0 disabled.
1 both teams
2 only Terrorists team
3 only CT team
mp_t_default_grenades "" "" - The default grenades that the Ts will spawn with.
mp_t_give_player_knife 1 0 1 Whether Terrorist player spawn with knife.
mp_t_default_weapons_primary "" "" - The default primary (rifle) weapon that the Ts will spawn with.
mp_t_default_weapons_secondary "glock18" "" - The default secondary (pistol) weapon that the Ts will spawn with.
mp_ct_default_grenades "" "" - The default grenades that the CTs will spawn with.
mp_ct_give_player_knife 1 0 1 Whether Counter-Terrorist player spawn with knife.
mp_ct_default_weapons_primary "" "" - The default primary (rifle) weapon that the CTs will spawn with.
mp_ct_default_weapons_secondary "usp" "" - The default secondary (pistol) weapon that the CTs will spawn with.
mp_give_player_c4 1 0 1 Whether this map should spawn a C4 bomb for a player or not.
0 disabled
1 enabled
mp_weapons_allow_map_placed 1 0 1 When set, map weapons (located on the floor by map) will be shown.
0 hide all map weapons.
1 enabled
NOTE: Effect will work after round restart.
mp_free_armor 0 0 2 Give free armor on player spawn.
0 disabled
1 Give Kevlar
2 Give Kevlar + Helmet
mp_fadetoblack 0 0 2 Observer's screen will fade to black on kill event or permanent.
0 No fade.
1 Fade to black and won't be able to watch anybody.
2 fade to black only on kill moment.
mp_falldamage 1 0 1 Damage from falling.
0 disabled
1 enabled
sv_allchat 1 0 1 Players can receive all other players text chat, team restrictions apply
0 disabled
1 enabled
sv_autobunnyhopping 0 0 1 Players automatically re-jump while holding jump button.
0 disabled
1 enabled
sv_enablebunnyhopping 0 0 1 Allow player speed to exceed maximum running speed.
0 disabled
1 enabled
mp_plant_c4_anywhere 0 0 1 When set, players can plant anywhere, not only in bombsites.
0 disabled
1 enabled
mp_give_c4_frags 3 - - How many bonuses (frags) will get the player who defused or exploded the bomb.
mp_hostages_rescued_ratio 1.0 0.0 1.0 Ratio of hostages rescued to win the round.
mp_legacy_vehicle_block 1 0 1 Legacy func_vehicle behavior when blocked by another entity.
0 New behavior
1 Legacy behavior

How to install zBot for CS 1.6?

  • Extract all the files from an archive
  • Enter -bots option at the command line HLDS

How to install CSCZ hostage AI for CS 1.6?

  • Extract all the files from an archive
  • Enter -host-improv option at the command line HLDS

Build instructions

Checking requirements

There are several software requirements for building ReGameDLL_CS:

Windows

Visual Studio 2015 (C++14 standard) and later

Linux

git >= 1.8.5
cmake >= 3.10
GCC >= 4.9.2 (Optional)
ICC >= 15.0.1 20141023 (Optional)
LLVM (Clang) >= 6.0 (Optional)

Building

Windows

Use Visual Studio to build, open msvc/ReGameDLL.sln and just select from the solution configurations list Release or Debug

Linux

  • Optional options using build.sh --compiler=[gcc] --jobs=[N] -D[option]=[ON or OFF] (without square brackets)
-c=|--compiler=[icc|gcc|clang]  - Select preferred C/C++ compiler to build
-j=|--jobs=[N]                  - Specifies the number of jobs (commands) to run simultaneously (For faster building)

Definitions (-D)
DEBUG                           - Enables debugging mode
USE_STATIC_LIBSTDC              - Enables static linking library libstdc++
  • ICC
    ./build.sh --compiler=intel
  • LLVM (Clang)
    ./build.sh --compiler=clang
  • GCC
    ./build.sh --compiler=gcc
Checking build environment (Debian / Ubuntu)
Click to expand
  • Installing required packages
    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install -y gcc-multilib g++-multilib
    sudo apt-get install -y build-essential
    sudo apt-get install -y libc6-dev libc6-dev-i386
    
  • Select the preferred C/C++ Compiler installation
    1) sudo apt-get install -y gcc g++
    2) sudo apt-get install -y clang
    

Credits

Thanks to the project ReHLDS ( ReGameDLL_CS was created on the basis of ReHLDS )

How can I help the project?

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