From fd92c0d7cae7d6dbda8d7a3cb91041d9a6c49431 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 2 May 2011 13:51:01 +0300 Subject: [PATCH] Size also determines the distance from which you can swallow other players now --- data/qcsrc/server/vore.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 9837a563..f389d22d 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -12,11 +12,16 @@ entity Swallow_player_check() { // check if we can swallow a player instead of firing our weapon + float swallow_range; vector vore_w_shotorg, vore_w_shotdir; + + swallow_range = cvar("g_balance_vore_swallow_range"); + if(self.scale) // we can swallow from further or closer based on our size + swallow_range *= self.scale; vore_w_shotorg = self.origin + self.view_ofs; vore_w_shotdir = v_forward; - WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, self, ANTILAG_LATENCY(self)); + WarpZone_traceline_antilag(self, vore_w_shotorg, vore_w_shotorg + vore_w_shotdir * swallow_range, FALSE, self, ANTILAG_LATENCY(self)); if(trace_fraction < 1) if(trace_ent.classname == "player") return trace_ent; -- 2.39.2