]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/bumblebee.qc
Merge branch 'master' into divVerent/csad
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / bumblebee.qc
index 0f984129fe589e406439e67aa846ccd36df14318..4b0f1d13a4b5b8976eda70b150523fccebd86724 100644 (file)
@@ -242,12 +242,11 @@ void bumb_gunner_exit(float _exitflag)
        self.hud            = HUD_NORMAL;
        self.switchweapon   = self.vehicle.switchweapon;
 
-       if(self.flagcarried)
-       {
-               self.flagcarried.scale = 0.6;
-               setattachment(self.flagcarried, self, "");
-               setorigin(self.flagcarried, FLAG_CARRY_POS);
-       }
+    vh_player = self;
+    vh_vehicle = self.vehicle;
+    MUTATOR_CALLHOOK(VehicleExit);
+    self = vh_player;
+    self.vehicle = vh_vehicle;
 
        self.vehicle.vehicle_hudmodel.viewmodelforclient = self.vehicle;
 
@@ -331,17 +330,11 @@ float bumb_gunner_enter()
 
        CSQCVehicleSetup(other, other.hud);
        
-    if(other.flagcarried)
-    {
-        if(!autocvar_g_vehicles_allow_flagcarry)
-            DropFlag(other.flagcarried, world, world);
-        else
-        {
-            other.flagcarried.scale = 1;
-            setattachment(other.flagcarried, self, "");
-            setorigin(other.flagcarried, '0 0 1' * self.maxs_z);
-        }
-    }
+    vh_player = other;
+    vh_vehicle = _gun;
+    MUTATOR_CALLHOOK(VehicleEnter);
+    other = vh_player;
+    _gun = vh_vehicle;
 
        return TRUE;
 }