]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/bumblebee.qc
Bumblebee: limit the amount of armor provided by the bumblebee in instagib to the...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / bumblebee.qc
index 7c0e61cd6e662329db5d4eea736d8a2b347ebe56..88713e77d70921dd0727b30c79286a0210cf5a01 100644 (file)
@@ -1,5 +1,9 @@
 #include "bumblebee.qh"
 
+#ifdef SVQC
+       #include <common/mutators/mutator/instagib/sv_instagib.qh>
+#endif
+
 const float BRG_SETUP = 2;
 const float BRG_START = 4;
 const float BRG_END = 8;
@@ -568,8 +572,9 @@ bool bumblebee_pilot_frame(entity this, float dt)
                                                }
                                                else if(IS_CLIENT(trace_ent))
                                                {
-                                                       if(GetResource(trace_ent, RES_ARMOR) <= autocvar_g_vehicle_bumblebee_healgun_amax && autocvar_g_vehicle_bumblebee_healgun_aps)
-                                                               GiveResourceWithLimit(trace_ent, RES_ARMOR, autocvar_g_vehicle_bumblebee_healgun_aps * dt, autocvar_g_vehicle_bumblebee_healgun_amax);
+                                                       float maxarmor = ((MUTATOR_IS_ENABLED(mutator_instagib)) ? autocvar_g_instagib_extralives : autocvar_g_vehicle_bumblebee_healgun_amax);
+                                                       if(GetResource(trace_ent, RES_ARMOR) <= maxarmor && autocvar_g_vehicle_bumblebee_healgun_aps)
+                                                               GiveResourceWithLimit(trace_ent, RES_ARMOR, autocvar_g_vehicle_bumblebee_healgun_aps * dt, maxarmor);
                                                }
                                        }
                                }