]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/vehicles/raptor.qc
New way of handling the jumping/impact effect, plus clean up the code a lot.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / vehicles / raptor.qc
index 7aa68061aae1f1594e16b12395fdcdad7af49210..cccc9b278d7a517f5aaae44b8ab57596f74275bf 100644 (file)
@@ -79,7 +79,7 @@ void raptor_bomblet_boom()
 {
     RadiusDamage (self, self.realowner, autocvar_g_vehicle_raptor_bomblet_damage,
                                     autocvar_g_vehicle_raptor_bomblet_edgedamage,
-                                    autocvar_g_vehicle_raptor_bomblet_radius, world,
+                                    autocvar_g_vehicle_raptor_bomblet_radius, world, world,
                                     autocvar_g_vehicle_raptor_bomblet_force, DEATH_RAPTOR_BOMB, world);
     remove(self);
 }
@@ -244,14 +244,17 @@ void raptor_exit(float eject)
            spot = vehicles_findgoodexit(spot);
            setorigin(self.owner , spot);
            self.owner.velocity = (v_up + v_forward * 0.25) * 750;
+           self.owner.oldvelocity = self.owner.velocity;
        }
        else
        {
+           self.owner.velocity = normalize(self.velocity) * autocvar_sv_maxairspeed;
+           self.owner.oldvelocity = self.owner.velocity;
            spot = self.origin - v_forward * 200 + '0 0 64';
            spot = vehicles_findgoodexit(spot);
            setorigin(self.owner , spot);
        }
-       
+       antilag_clear(self.owner);      
     self.owner = world;
 }
 
@@ -308,7 +311,7 @@ float raptor_takeoff()
 float raptor_frame()
 {
     entity player, raptor;
-    float ftmp, ftmp2;
+    float ftmp = 0, ftmp2;
     vector df;
     
        if(intermission_running)
@@ -551,7 +554,7 @@ void raptor_blowup()
 {
     self.deadflag    = DEAD_DEAD;
     self.vehicle_exit(VHEF_NORMAL);
-    RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
+    RadiusDamage (self, self, 250, 15, 250, world, world, 250, DEATH_WAKIBLOWUP, world);
 
     self.alpha          = -1;
     self.movetype       = MOVETYPE_NONE;