]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add checks to make sure you can't fire hook while inside a vehicle, and also remove...
authorSamual <samual@xonotic.org>
Fri, 23 Sep 2011 05:52:17 +0000 (01:52 -0400)
committerSamual <samual@xonotic.org>
Fri, 23 Sep 2011 05:52:17 +0000 (01:52 -0400)
qcsrc/server/g_hook.qc
qcsrc/server/vehicles/vehicles.qc

index 76faad923281b026a45773f292bfc91854f78789..4f655ca5738220c1dc75da1c95849f347b2cef68 100644 (file)
@@ -296,8 +296,11 @@ void FireGrapplingHook (void)
        if((arena_roundbased && time < warmup) || (time < game_starttime))
                return;
 
-    if(self.freezetag_frozen)
-        return;
+  if(self.freezetag_frozen)
+               return;
+       
+       if(self.vehicle)
+               return;
 
        makevectors(self.v_angle);
 
index d9d77b5f5211957f539c4ee41b1057beec0980a4..6006dcf92edb6f0e2acf0bf3094211e1e4756e39 100644 (file)
@@ -428,6 +428,8 @@ void vehicles_enter()
     if(self.team)
     if(self.team != other.team)
         return;
+        
+    RemoveGrapplingHook(other);
 
     self.vehicle_ammo1   = 0;
     self.vehicle_ammo2   = 0;