]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
prevent hooking through wall
authorRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 19:26:38 +0000 (21:26 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 19:26:38 +0000 (21:26 +0200)
qcsrc/server/g_hook.qc

index b5eb282dacde087bb2c8ab6eee464c23ed8bc5b3..48d3a03ec39002f0a25a3ea8693eecb0cf29d1d0 100644 (file)
@@ -343,6 +343,10 @@ void FireGrapplingHook (void)
        // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
        sound (self, CHAN_WEAPON2, "weapons/hook_fire.wav", VOL_BASE, ATTN_NORM);
        org = self.origin + self.view_ofs + v_forward * vs_x + v_right * -vs_y + v_up * vs_z;
+
+       WarpZone_TraceBox(self.origin + self.view_ofs, '-3 -3 -3', '3 3 3', org, MOVE_NORMAL, self);
+       org = trace_endpos;
+
        pointparticles(particleeffectnum("grapple_muzzleflash"), org, '0 0 0', 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);