]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Experiment: Set MOVETYPE_TOSS on the vehicle when unmanned and taking damage
authormand1nga <mand1nga@xonotic.org>
Wed, 30 Mar 2011 02:35:42 +0000 (23:35 -0300)
committermand1nga <mand1nga@xonotic.org>
Wed, 30 Mar 2011 02:35:42 +0000 (23:35 -0300)
qcsrc/server/vehicles/vehicles.qc

index 647c6c77eb9e3aac05262deadd3d7ce4fb21195b..ba8308425d12448575ce67d7e9a0d5364d5cb99c 100644 (file)
@@ -189,7 +189,7 @@ float vehicles_crushable(entity e)
 void vehicles_enter();
 void vehicles_touch()
 {
-    // Vehicle currently
+    // Vehicle currently in use
     if(self.owner)
     {
         // Colided with world?
@@ -412,6 +412,11 @@ void vehicles_damage(entity inflictor, entity attacker, float damage, float deat
 
     self.velocity += force * (vlen(force) / self.mass);
 
+    if not(self.owner)
+    {
+               self.movetype &~= MOVETYPE_TOSS;
+    }
+
     if(self.vehicle_health <= 0)
     {
         if(self.owner)