diff --git a/addons/sourcemod/plugins/fixes/l4d2_fix_rocketjump.smx b/addons/sourcemod/plugins/fixes/l4d2_fix_rocketjump.smx index adab9f931..bca771610 100644 Binary files a/addons/sourcemod/plugins/fixes/l4d2_fix_rocketjump.smx and b/addons/sourcemod/plugins/fixes/l4d2_fix_rocketjump.smx differ diff --git a/addons/sourcemod/scripting/l4d2_fix_rocketjump.sp b/addons/sourcemod/scripting/l4d2_fix_rocketjump.sp index 7ceb04735..da289edd6 100644 --- a/addons/sourcemod/scripting/l4d2_fix_rocketjump.sp +++ b/addons/sourcemod/scripting/l4d2_fix_rocketjump.sp @@ -5,7 +5,7 @@ #include #include -#define PLUGIN_VERSION "1.4" +#define PLUGIN_VERSION "1.5" #define MAXENTITY 2048 public Plugin myinfo = @@ -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; -} \ No newline at end of file +}