]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix some draw issues with the hook
authorRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 19:21:51 +0000 (21:21 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 19:21:51 +0000 (21:21 +0200)
qcsrc/client/hook.qc
qcsrc/server/g_hook.qc

index cb2d7f356f021ea41ee703876dbd950f17c60566..a995970b45fbbc4499afc306c512e6970d619913 100644 (file)
@@ -189,8 +189,16 @@ void Draw_GrapplingHook()
        {
                default:
                case ENT_CLIENT_HOOK:
-                       setorigin(self, trace_endpos); // hook endpoint!
-                       self.angles = vectoangles(trace_endpos - atrans);
+                       if(vlen(trace_endpos - atrans) > 0.5)
+                       {
+                               setorigin(self, trace_endpos); // hook endpoint!
+                               self.angles = vectoangles(trace_endpos - atrans);
+                               self.drawmask = MASK_NORMAL;
+                       }
+                       else
+                       {
+                               self.drawmask = 0;
+                       }
                        break;
                case ENT_CLIENT_LGBEAM:
                case ENT_CLIENT_GAUNTLET:
index ce3d9b72b8fe9db1f484e27ac4bc620d90bd3b53..b5eb282dacde087bb2c8ab6eee464c23ed8bc5b3 100644 (file)
@@ -268,7 +268,7 @@ void GrapplingHookThink()
        }
 
        makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
-       myorg = WarpZone_RefSys_TransformOrigin(self, self.owner, self.origin) + v_forward * (-9);
+       myorg = WarpZone_RefSys_TransformOrigin(self, self.owner, self.origin); // + v_forward * (-9);
 
        if(myorg != self.hook_start)
        {