Skip to content

Commit

Permalink
Half-Life 2 Update: LD_PRELOAD uncut trick, add some files
Browse files Browse the repository at this point in the history
  • Loading branch information
darealshinji committed Aug 23, 2017
1 parent 8d5b97a commit 9bb89c9
Show file tree
Hide file tree
Showing 6 changed files with 330 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Half-Life 2 Update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ AppID: `290930`

If _Half-Life 2: Update_ is censored start the game without Steam running in background.
Run `Half-Life 2 Update/hl2.exe` or `Half-Life 2 Update/hl2.sh` to start the game.

Alternatively you can put `preload.so` into the `Half-Life 2 Update` directory and set
the game's launch options to `LD_PRELOAD=./preload.so %command%`.
This will disable SteamAPI features but the game is uncut even if Steam is running.
313 changes: 313 additions & 0 deletions Half-Life 2 Update/hl2/cfg/config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
unbindall
bind "0" "vr_toggle"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "a" "+moveleft"
bind "c" "impulse 50"
bind "d" "+moveright"
bind "e" "+use"
bind "f" "impulse 100"
bind "g" "phys_swap"
bind "p" "headtrack_reset_home_pos"
bind "q" "lastinv"
bind "r" "+reload"
bind "s" "+back"
bind "w" "+forward"
bind "x" "bug_swap"
bind "z" "+zoom"
bind "`" "toggleconsole"
bind "SPACE" "+jump"
bind "NUMLOCK" "pause"
bind "ESCAPE" "cancelselect"
bind "PAUSE" "pause"
bind "SHIFT" "+speed"
bind "ALT" "+walk"
bind "CTRL" "+duck"
bind "F1" "toggleconsole"
bind "F3" "askconnect_accept"
bind "F4" "jpeg"
bind "F5" "save quick"
bind "F6" "save quick"
bind "F8" "load quick"
bind "F9" "load quick"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+attack2"
bind "MWHEELUP" "invprev"
bind "MWHEELDOWN" "invnext"
cl_thirdperson "0"
cl_showhelp "1"
voice_modenable "1"
cl_team "default"
cl_class "default"
hud_takesshots "0"
hud_freezecamhide "0"
vr_activate_default "0"
vr_moveaim_mode "3"
vr_moveaim_mode_zoom "3"
vr_moveaim_reticle_yaw_limit "10"
vr_moveaim_reticle_pitch_limit "30"
vr_moveaim_reticle_yaw_limit_zoom "0"
vr_moveaim_reticle_pitch_limit_zoom "-1"
vr_hud_max_fov "60"
vr_hud_forward "500"
vr_hud_display_ratio "0.95"
vr_hud_axis_lock_to_world "0"
vr_zoom_multiplier "2.0"
vr_force_windowed "0"
cl_first_person_uses_world_model "0"
cl_rumblescale "1.0"
cl_debugrumble "0"
cl_playerspraydisable "0"
muzzleflash_light "1"
overview_health "1"
overview_names "1"
overview_tracks "1"
overview_locked "1"
overview_alpha "1.0"
spec_scoreboard "0"
cl_spec_mode "1"
cl_disablehtmlmotd "0"
fov_desired "75"
cl_npc_speedmod_intime "0.25"
cl_npc_speedmod_outtime "1.5"
g_antlion_maxgibs "16"
hud_draw_fixed_reticle "0"
hud_quickinfo "1"
hud_showemptyweaponslots "1"
cl_chatfilters "63"
cl_chatfilter_version "1"
cc_linger_time "1.0"
cc_predisplay_time "0.25"
cc_subtitles "0"
cc_lang ""
crosshair "1"
cl_observercrosshair "1"
cl_hudhint_sound "1"
g15_update_msec "250"
cam_snapto "0"
cam_ideallag "4.0"
cam_idealdelta "4.0"
cam_idealyaw "0"
cam_idealpitch "0"
cam_idealdist "150"
cam_idealdistright "0"
cam_idealdistup "0"
cam_collision "1"
c_maxpitch "90"
c_minpitch "0"
c_maxyaw "135"
c_minyaw "-135"
c_maxdistance "200"
c_mindistance "30"
c_orthowidth "100"
c_orthoheight "100"
joy_name "joystick"
joy_advanced "1"
joy_advaxisx "4"
joy_advaxisy "2"
joy_advaxisz "0"
joy_advaxisr "1"
joy_advaxisu "3"
joy_advaxisv "0"
joy_forwardthreshold "0.15"
joy_sidethreshold "0.15"
joy_pitchthreshold "0.15"
joy_yawthreshold "0.15"
joy_forwardsensitivity "-1"
joy_sidesensitivity "1"
joy_pitchsensitivity "1"
joy_yawsensitivity "-1"
joy_response_move "1"
joy_response_look "0"
joy_lowend "1"
joy_lowmap "1"
joy_accelscale "0.6"
joy_accelmax "1.0"
joy_autoaimdampenrange "0"
joy_autoaimdampen "0"
joy_diagonalpov "0"
joy_display_input "0"
joy_wingmanwarrior_turnhack "0"
joy_inverty "0"
joy_movement_stick "0"
joy_xcontroller_cfg_loaded "0"
lookspring "0"
lookstrafe "0"
joystick "0"
m_pitch "0.022"
m_filter "0"
sensitivity "3"
m_side "0.8"
m_yaw "0.022"
m_forward "1"
m_customaccel "0"
m_customaccel_scale "0.04"
m_customaccel_max "0"
m_customaccel_exponent "1"
m_mousespeed "1"
m_mouseaccel1 "0"
m_mouseaccel2 "0"
m_rawinput "0"
cl_mouselook "1"
cl_idealpitchscale "0.8"
net_scale "5"
net_graphpos "1"
net_graphsolid "1"
net_graphtext "1"
net_graphmsecs "400"
net_graphshowlatency "1"
net_graphshowinterp "1"
net_graph "0"
net_graphheight "64"
net_graphproportionalfont "1"
mat_viewportscale "1.0"
mat_viewportupscale "1"
cl_software_cursor "0"
mat_software_aa_strength "0.000000"
mat_software_aa_quality "0"
mat_software_aa_edge_threshold "1.0"
mat_software_aa_blur_one_pixel_lines "0.5"
mat_software_aa_tap_offset "1.0"
mat_software_aa_strength_vgui "1.000000"
pyro_vignette "2"
pyro_vignette_distortion "1"
pyro_min_intensity "0.1"
pyro_max_intensity "0.35"
pyro_min_rate "0.05"
pyro_max_rate "0.2"
pyro_min_side_length "0.3"
pyro_max_side_length "0.55"
pyro_min_side_width "0.65"
pyro_max_side_width "0.95"
hud_fastswitch "0"
r_eyegloss "1"
vgui_message_dialog_modal "1"
commentary_firstrun "0"
xc_uncrouch_on_jump "1"
option_duck_method "1"
sk_autoaim_mode "1"
sv_noclipaccelerate "5"
sv_noclipspeed "5"
sv_specaccelerate "5"
sv_specspeed "3"
sv_specnoclip "1"
sv_backspeed "0.6"
sv_skyname "sky_day03_06_hdr"
scene_showfaceto "0"
ai_report_task_timings_on_limit "0"
ai_think_limit_label "0"
npc_height_adjust "1"
sv_pvsskipanimation "1"
scene_showlook "0"
scene_showmoveto "0"
scene_showunlock "0"
commentary "0"
xbox_throttlebias "100"
xbox_throttlespoof "200"
xbox_autothrottle "1"
func_break_max_pieces "15"
suitvolume "0.25"
sv_stickysprint "0"
xc_crouch_range "0.85"
xc_use_crouch_limiter "0"
g_test_new_antlion_jump "1"
g_antlion_cascade_push "1"
budget_bargraph_background_alpha "128"
budget_peaks_window "30"
budget_averages_window "30"
budget_show_peaks "1"
budget_show_averages "0"
budget_show_history "1"
budget_history_numsamplesvisible "100"
budget_history_range_ms "66.666666667"
budget_panel_bottom_of_history_fraction ".25"
budget_bargraph_range_ms "16.6666666667"
budget_background_alpha "128"
budget_panel_x "0"
budget_panel_y "50"
budget_panel_width "512"
budget_panel_height "384"
snd_legacy_surround "0"
snd_pitchquality "1"
volume "0.580000"
snd_musicvolume "0.550000"
snd_mixahead "0.1"
adsp_debug "0"
snd_ducktovolume "0.55"
snd_duckerattacktime "0.5"
snd_duckerreleasetime "2.5"
snd_duckerthreshold "0.15"
dsp_slow_cpu "0"
dsp_volume "1.0"
dsp_enhance_stereo "0"
snd_mute_losefocus "1"
voice_scale "1"
voice_enable "1"
voice_forcemicrecord "1"
cl_clanid "0"
bugreporter_uploadasync "0"
cl_timeout "30"
cl_logofile "materials/decals/spraylogo.vtf"
cl_soundfile "sound/player/jingle.wav"
cl_forcepreload "0"
cl_allowdownload "1"
cl_downloadfilter "all"
rate "30000"
cl_cmdrate "30"
cl_updaterate "20"
tv_nochat "0"
cl_showpluginmessages "1"
con_enable "1"
closecaption "0"
skill "3"
r_eyemove "1"
r_eyeshift_x "0"
r_eyeshift_y "0"
r_eyeshift_z "0"
r_eyesize "0"
r_ambientboost "1"
r_ambientmin "0.3"
r_ambientfactor "5"
r_drawmodelstatsoverlaymin "0.1"
r_drawmodelstatsoverlaymax "1.5"
mp_decals "200"
net_maxroutable "1260"
cl_allowupload "1"
sv_logsdir "logs"
sv_logfile "1"
sv_logflush "0"
sv_logecho "1"
sv_log_onefile "0"
sv_logbans "0"
sv_voiceenable "1"
sv_forcepreload "0"
engine_no_focus_sleep "50"
mat_powersavingsmode "0"
texture_budget_panel_x "0"
texture_budget_panel_y "450"
texture_budget_panel_width "512"
texture_budget_panel_height "284"
texture_budget_panel_bottom_of_history_fraction ".25"
texture_budget_background_alpha "128"
vprof_graphwidth "512"
vprof_graphheight "256"
vprof_verbose "1"
vprof_unaccounted_limit "0.3"
vprof_warningmsec "10"
mat_color_projection "0"
r_rootlod "0"
mat_monitorgamma_tv_enabled "0"
r_waterforceexpensive "1"
mat_queue_mode "-1"
mat_queue_report "0"
joy_axisbutton_threshold "0.3"
joy_axis_deadzone "0.2"
joy_gamecontroller_config ""
mat_hdr_level "2"
sv_unlockedchapters "15"
name "Gordon Freeman"
Empty file.
Empty file.
13 changes: 13 additions & 0 deletions Half-Life 2 Update/preload.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Compile on Linux: g++ -m32 -Wall -O2 -s -fPIC -shared -o preload.so preload.cpp
// Use launch options: LD_PRELOAD=./preload.so %command%

// https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/public/steam/steam_api.h

#define S_API extern "C" __attribute__ ((visibility("default")))
#define S_CALLTYPE

S_API bool S_CALLTYPE SteamAPI_IsSteamRunning()
{
return false;
}

Binary file added Half-Life 2 Update/preload.so
Binary file not shown.

0 comments on commit 9bb89c9

Please sign in to comment.