]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Colission damage
authorJakob MG <jakob_mg@hotmail.com>
Wed, 15 Aug 2012 19:26:12 +0000 (21:26 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Wed, 15 Aug 2012 19:26:12 +0000 (21:26 +0200)
qcsrc/server/vehicles/bumblebee.qc
vehicle_bumblebee.cfg

index 03e84b4f053fd71ee845c423dc460fe01b80ac2c..53d9c094df9535c0c601fba9bd6f45f8a6ce0285 100644 (file)
@@ -69,6 +69,7 @@ float autocvar_g_vehicle_bumblebee_blowup_radius;
 float autocvar_g_vehicle_bumblebee_blowup_coredamage;
 float autocvar_g_vehicle_bumblebee_blowup_edgedamage;
 float autocvar_g_vehicle_bumblebee_blowup_forceintensity;
+var vector autocvar_g_vehicle_bumblebee_bouncepain;
 
 var float autocvar_g_vehicle_bumblebee = 0;
 
@@ -718,6 +719,13 @@ void bumb_die()
        pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
 }
 
+void bumb_impact()
+{
+    if(autocvar_g_vehicle_bumblebee_bouncepain_x)
+        vehilces_impact(autocvar_g_vehicle_bumblebee_bouncepain_x, 
+                                               autocvar_g_vehicle_bumblebee_bouncepain_y, 
+                                               autocvar_g_vehicle_bumblebee_bouncepain_z);
+}
 
 void bumb_spawn(float _f)
 {
@@ -729,7 +737,6 @@ void bumb_spawn(float _f)
            dprint(" ------- ^1gettaginfo_name^2(",ftos(i),") ^3=", gettaginfo_name, "\n");
        }
        */
-
        if(!self.gun1)
        {
                // for some reason, autosizing of the shiled entity refuses to work for this one so set it up in advance.
@@ -789,6 +796,7 @@ void bumb_spawn(float _f)
        self.vehicle_shield = autocvar_g_vehicle_bumblebee_shield;
        self.solid          = SOLID_BBOX;
        self.movetype           = MOVETYPE_BOUNCEMISSILE;
+       self.vehicle_impact = bumb_impact;
        setorigin(self, self.origin + '0 0 25');
 }
 
index 844515187285b06767eb7441fce6eec77984c498..2efb4cabac2bf3f9761a1cd34bf16e42242532ef 100644 (file)
@@ -60,4 +60,5 @@ set g_vehicle_bumblebee_healgun_smax 100
 set g_vehicle_bumblebee_blowup_radius            500
 set g_vehicle_bumblebee_blowup_coredamage        500
 set g_vehicle_bumblebee_blowup_edgedamage        100
-set g_vehicle_bumblebee_blowup_forceintensity    600
\ No newline at end of file
+set g_vehicle_bumblebee_blowup_forceintensity    600
+set g_vehicle_bumblebee_bouncepain "1 100 200"
\ No newline at end of file