]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/raptor.qc
Add support for pitch shifting to the QC sound sending implementation, apply pitch...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / raptor.qc
index b672d348b48e0c0064605cb601315c0e9b971153..a868eb4aa1f65b9c56d098ceeb779d68ba55038b 100644 (file)
@@ -1,5 +1,7 @@
 #include "raptor.qh"
 
+#ifdef GAMEQC
+
 #ifdef SVQC
 
 bool autocvar_g_vehicle_raptor = true;
@@ -358,7 +360,7 @@ bool raptor_frame(entity this, float dt)
 
        Weapon wep1 = WEP_RAPTOR;
        .entity weaponentity = weaponentities[0];
-       if(!forbidWeaponUse(this))
+       if(!weaponLocked(this) && !weaponUseForbidden(this))
        if(PHYS_INPUT_BUTTON_ATCK(this))
        if (wep1.wr_checkammo1(wep1, vehic, weaponentity))
        {
@@ -375,7 +377,7 @@ bool raptor_frame(entity this, float dt)
                vehicles_regen(vehic, vehic.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, dt, false);
 
        Weapon wep2a = WEP_RAPTOR_BOMB;
-       if(!forbidWeaponUse(this))
+       if(!weaponLocked(this) && !weaponUseForbidden(this))
        if(STAT(VEHICLESTAT_W2MODE, vehic) == RSM_BOMB)
        {
                if(time > vehic.lip + autocvar_g_vehicle_raptor_bombs_refire)
@@ -420,7 +422,7 @@ bool raptor_frame(entity this, float dt)
                if(incoming)
                {
                        msg_entity = this;
-                       soundto(MSG_ONE, vehic, CH_PAIN_SINGLE, SND(VEH_MISSILE_ALARM), VOL_BASE, ATTEN_NONE);
+                       soundto(MSG_ONE, vehic, CH_PAIN_SINGLE, SND(VEH_MISSILE_ALARM), VOL_BASE, ATTEN_NONE, 0);
                }
 
                vehic.bomb1.cnt = time + 1;
@@ -453,7 +455,7 @@ bool raptor_takeoff(entity this, float dt)
        // Takeoff sequense
        if(vehic.frame < 25)
        {
-               vehic.frame += 25 / (autocvar_g_vehicle_raptor_takeofftime / PHYS_INPUT_FRAMETIME);
+               vehic.frame += 25 / (autocvar_g_vehicle_raptor_takeofftime / dt);
                vehic.velocity_z = min(vehic.velocity_z * 1.5, 256);
                vehic.bomb1.gun1.avelocity_y = 90 + ((vehic.frame / 25) * 25000);
                vehic.bomb1.gun2.avelocity_y = -vehic.bomb1.gun1.avelocity_y;
@@ -831,3 +833,5 @@ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance))
 }
 
 #endif
+
+#endif