From 4c1d6569a9d2f362fbd67332539371d345040c04 Mon Sep 17 00:00:00 2001 From: Maxwell Date: Tue, 17 Jan 2023 18:39:18 -0500 Subject: [PATCH] Made Gauss jumping MP only. --- src/shared/w_gauss.qc | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/shared/w_gauss.qc b/src/shared/w_gauss.qc index d9f0079..de377c9 100644 --- a/src/shared/w_gauss.qc +++ b/src/shared/w_gauss.qc @@ -136,16 +136,25 @@ void w_gauss_fire(player pl, int one) sound(trace_ent, CHAN_ITEM, sprintf("weapons/electro%d.wav", random(0,3)+4), 1, ATTN_NORM); } - if (one) { - return; - } else { - int iForce = (int)rint((bound(5, pl.ammo_gauss_volume, 10) * 20)); + HLGameRules rules = (HLGameRules) g_grMode; - /* Apply force */ - if (pl.flags & FL_ONGROUND) { - pl.velocity += v_forward * (-iForce * 2); + /* You should not be able to fling yourself in single player */ + if (rules.IsMultiplayer() == true) { + if (one) { + return; } else { - pl.velocity += v_forward * (-iForce * 4); + int iForce = (int)rint((bound(5, pl.ammo_gauss_volume, 10) * 20)); + + /* Apply force */ + if (pl.flags & FL_ONGROUND) { + pl.velocity += v_forward * (-iForce * 2); + } else { + pl.velocity += v_forward * (-iForce * 4); + } + } + } else { + if (one) { + return; } }