Skip to content

Commit

Permalink
revert changes made to attempt fixing it on Windows as they're now us…
Browse files Browse the repository at this point in the history
…eless
  • Loading branch information
ldesgoui committed May 14, 2020
1 parent 4119ed8 commit dff9fb4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions scripting/tf2-comp-fixes/remove-medic-attach-speed.sp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@ static void OnConVarChange(ConVar cvar, const char[] before, const char[] after)
}

if (!DHookToggleDetour(g_detour_CTFPlayer_TeamFortress_CalculateMaxSpeed, HOOK_PRE, Detour_Pre,
cvar.BoolValue) ||
!DHookToggleDetour(g_detour_CTFPlayer_TeamFortress_CalculateMaxSpeed, HOOK_POST,
Detour_Post, cvar.BoolValue)) {
ThrowError("Failed to toggle detour on CTFPlayer::TeamFortress_CalculateMaxSpeed");
cvar.BoolValue)) {
SetFailState("Failed to toggle detour on CTFPlayer::TeamFortress_CalculateMaxSpeed");
}
}

static MRESReturn Detour_Pre(int self, Handle ret, Handle params) { return MRES_Ignored; }

static MRESReturn Detour_Post(int self, Handle ret, Handle params) {
static MRESReturn Detour_Pre(int self, Handle ret, Handle params) {
if (DHookGetParam(params, 1)) {
DHookSetReturn(ret, 0.0);
return MRES_Override;
Expand Down

0 comments on commit dff9fb4

Please sign in to comment.