]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Support g_vehicles_allow_flagcarry to (dis)allow flag carry in vehicles
authorJakob MG <jakob_mg@hotmail.com>
Sun, 12 Jun 2011 17:15:22 +0000 (19:15 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Sun, 12 Jun 2011 17:15:22 +0000 (19:15 +0200)
qcsrc/server/vehicles/vehicles.qc
vehicles.cfg

index 8a5e3f81b8a201d28772b3c6c0fbf6ef5e1383e8..da26423a8d335bc50b6fefa1dc64fa14a211d86d 100644 (file)
@@ -2,6 +2,7 @@ float autocvar_g_vehicles_crush_dmg;
 float autocvar_g_vehicles_crush_force;
 float autocvar_g_vehicles_delayspawn;
 float autocvar_g_vehicles_delayspawn_jitter;
+float autocvar_g_vehicles_allow_flagcarry;
 
 void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
 void vehicles_return();
@@ -500,9 +501,14 @@ void vehicles_enter()
     
     if(other.flagcarried)
     {
-        other.flagcarried.scale = 1;
-        setattachment(other.flagcarried, self, ""); 
-        setorigin(other, '0 0 96');
+        if(!autocvar_g_vehicles_allow_flagcarry)
+            DropFlag(other.flagcarried, world, world);
+        else
+        {            
+            other.flagcarried.scale = 1;
+            setattachment(other.flagcarried, self, ""); 
+            setorigin(other, '0 0 96');
+        }
     }
     
     self.vehicle_enter();
index 4d06429284928295a454d4fd2868bfa0c3ce2218..f225b69f070c2c2ca13ad8512b3ffd0a42731e4a 100644 (file)
@@ -16,3 +16,4 @@ set cl_vehicles_hudscale 0.5
 
 set g_vehicles_delayspawn 0
 set g_vehicles_delayspawn_jitter 10
+set g_vehicles_allow_flagcarry 1