Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified addons/sourcemod/plugins/fixes/l4d2_fix_rocketjump.smx
Binary file not shown.
17 changes: 14 additions & 3 deletions addons/sourcemod/scripting/l4d2_fix_rocketjump.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <sdktools>
#include <sdkhooks>

#define PLUGIN_VERSION "1.4"
#define PLUGIN_VERSION "1.5"
#define MAXENTITY 2048

public Plugin myinfo =
Expand Down Expand Up @@ -106,11 +106,22 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
GetEntPropVector(client, Prop_Data, "m_vecAbsVelocity", flVel);
//PrintToChatAll("%N m_vecAbsVelocity - %.2f %.2f %.2f", client, flVel[0], flVel[1], flVel[2]);

flVel[2] = 0.0; //velocity height zero
// velocity height zero - prevents getting "squished"
if (flVel[2] < 0.0)
{
flVel[2] = 0.0;
}

// normal jump velocity - prevents getting launched
if (flVel[2] > 242.29)
{
flVel[2] = 242.29;
}

TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, flVel);
}
}

g_bStepOnEntitiy[client] = false;
return Plugin_Continue;
}
}