cvar cleanup
authorRudolf Polzer <divverent@xonotic.org>
Tue, 19 Nov 2013 10:39:59 +0000 (11:39 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 19 Nov 2013 10:39:59 +0000 (11:39 +0100)
15 files changed:
balance25.cfg
balanceFruitieX.cfg
balanceXDF.cfg
balanceXPM.cfg
balanceXonotic.cfg
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/tturrets/units/unit_machinegun.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/w_common.qc
qcsrc/server/w_rifle.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_uzi.qc
vehicle_spiderbot.cfg

index 9451d37..f0cc7d7 100644 (file)
@@ -271,8 +271,7 @@ set g_balance_shotgun_primary_spread 0.07
 set g_balance_shotgun_primary_refire 0.5
 set g_balance_shotgun_primary_animtime 0.2
 set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 12000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
+set g_balance_shotgun_primary_solidpenetration 3.8
 set g_balance_shotgun_secondary 1
 set g_balance_shotgun_secondary_melee_delay 0.25 // 0.35 was too slow
 set g_balance_shotgun_secondary_melee_range 120
@@ -320,8 +319,7 @@ set g_balance_uzi_sustained_spread 0.05
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
 
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
+set g_balance_uzi_solidpenetration 13.1
 
 set g_balance_uzi_switchdelay_drop 0.15
 set g_balance_uzi_switchdelay_raise 0.15
index f985659..948d7e4 100644 (file)
@@ -271,8 +271,7 @@ set g_balance_shotgun_primary_spread 0.16 // LOG: changed from 0.18 -> 0.16 to c
 set g_balance_shotgun_primary_refire 1
 set g_balance_shotgun_primary_animtime 0.3
 set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 12000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
+set g_balance_shotgun_primary_solidpenetration 3.8
 set g_balance_shotgun_secondary 1
 set g_balance_shotgun_secondary_melee_delay 0.25 // 0.35 was too slow
 set g_balance_shotgun_secondary_melee_range 120
@@ -320,8 +319,7 @@ set g_balance_uzi_sustained_spread 0.06
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
 
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
+set g_balance_uzi_solidpenetration 13.1
 
 set g_balance_uzi_switchdelay_drop 0.15
 set g_balance_uzi_switchdelay_raise 0.15
index 4e06315..29a23ad 100644 (file)
@@ -272,7 +272,7 @@ set g_balance_shotgun_primary_refire 0.75
 set g_balance_shotgun_primary_animtime 0.2
 set g_balance_shotgun_primary_ammo 1
 set g_balance_shotgun_primary_speed 8000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
+set g_balance_shotgun_primary_solidpenetration 3.8
 set g_balance_shotgun_secondary 1
 set g_balance_shotgun_secondary_melee_delay 0.25 // 0.35 was too slow
 set g_balance_shotgun_secondary_melee_range 120
@@ -321,7 +321,7 @@ set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
 
 set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
+set g_balance_uzi_solidpenetration 13.1
 
 set g_balance_uzi_switchdelay_drop 0
 set g_balance_uzi_switchdelay_raise 0
index 8c17147..885fb94 100644 (file)
@@ -272,7 +272,7 @@ set g_balance_shotgun_primary_refire 0.75
 set g_balance_shotgun_primary_animtime 0.2
 set g_balance_shotgun_primary_ammo 1
 set g_balance_shotgun_primary_speed 8000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
+set g_balance_shotgun_primary_solidpenetration 3.8
 set g_balance_shotgun_secondary 1
 set g_balance_shotgun_secondary_melee_delay 0.25 // 0.35 was too slow
 set g_balance_shotgun_secondary_melee_range 120
@@ -321,7 +321,7 @@ set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
 
 set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
+set g_balance_uzi_solidpenetration 13.1
 
 set g_balance_uzi_switchdelay_drop 0.2
 set g_balance_uzi_switchdelay_raise 0.2
index cdf3f20..de865fa 100644 (file)
@@ -271,8 +271,7 @@ set g_balance_shotgun_primary_spread 0.12
 set g_balance_shotgun_primary_refire 0.75
 set g_balance_shotgun_primary_animtime 0.2
 set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 8000
-set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
+set g_balance_shotgun_primary_solidpenetration 3.8
 set g_balance_shotgun_secondary 1
 set g_balance_shotgun_secondary_melee_delay 0.25 // 0.35 was too slow
 set g_balance_shotgun_secondary_melee_range 120
@@ -320,8 +319,7 @@ set g_balance_uzi_sustained_spread 0.03
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
 
-set g_balance_uzi_speed 18000
-set g_balance_uzi_bulletconstant 115 // 13.1qu
+set g_balance_uzi_solidpenetration 13.1
 
 set g_balance_uzi_switchdelay_drop 0.2
 set g_balance_uzi_switchdelay_raise 0.2
index 217aab9..ca2b5a5 100644 (file)
@@ -1166,32 +1166,9 @@ set g_showweaponspawns 1 "display sprites for weapon spawns found on the map whe
 //   Quake-Joule:  1 qJ  = 1 qN * 1 qu
 //   Quake-Pascal: 1 qPa = 1 qN / 1 qu^2
 
-set g_ballistics_materialconstant 1414213562
-set g_ballistics_mindistance 16
+set g_ballistics_mindistance 2 // enable ballistics starting from 2 qu
 set g_ballistics_density_player 0.50 // players are 2x as easy to pass as walls
 set g_ballistics_density_corpse 0.10 // corpses are 10x as easy to pass as walls
-// unit: qJ / qu^3 (energy needed per volume unit of solid to push/burn away
-// parameter: bullet constant: mass / area in g/qu^2
-// = mass / (pi/4 * caliber^2)
-// with caliber in inches, mass in grams:
-// = 1.273239544735163 * mass / caliber^2
-// with caliber in inches, mass in grains:
-// = 0.082633246453312 * mass / caliber^2
-
-// bullet max travel distance inside solid:
-//   0.5 * v^2 * bulletconstant / g_ballistics_materialconstant
-
-// some bullet constants:
-//   http://hypertextbook.com/facts/2000/ShantayArmstrong.shtml
-//     second bullet: caliber .45, mass 16.2g, bullet constant 101.859163578813
-//     third bullet: caliber .338, mass 16.2g, bullet constant 180.5476053421592
-//     fourth bullet: caliber .25, mass 2.3g, bullet constant 46.85521524625399
-//   http://en.wikipedia.org/wiki/.50_BMG
-//     caliber .5, 360 grains, bullet constant 118.9918748927693
-//   AK-47:
-//     caliber .3, 62 grains, bullet constant 56.92512533450383
-//   .3 winchester magnum:
-//     caliber .3, 150 grains, bullet constant 137.7220774221867
 
 set cl_stripcolorcodes 0       "experimental feature (notes: strips ALL color codes from messages!)"
 
index 7d920fb..a10dcc1 100644 (file)
@@ -89,30 +89,26 @@ float autocvar_g_balance_armor_start;
 float autocvar_g_balance_rifle_bursttime;
 float autocvar_g_balance_rifle_primary_ammo;
 float autocvar_g_balance_rifle_primary_animtime;
-float autocvar_g_balance_rifle_primary_bulletconstant;
 float autocvar_g_balance_rifle_primary_bullethail;
 float autocvar_g_balance_rifle_primary_burstcost;
 float autocvar_g_balance_rifle_primary_damage;
 float autocvar_g_balance_rifle_primary_force;
-float autocvar_g_balance_rifle_primary_lifetime;
 float autocvar_g_balance_rifle_primary_refire;
 float autocvar_g_balance_rifle_primary_shots;
-float autocvar_g_balance_rifle_primary_speed;
+float autocvar_g_balance_rifle_primary_solidpenetration;
 float autocvar_g_balance_rifle_primary_spread;
 float autocvar_g_balance_rifle_primary_tracer;
 float autocvar_g_balance_rifle_secondary;
 float autocvar_g_balance_rifle_secondary_ammo;
 float autocvar_g_balance_rifle_secondary_animtime;
-float autocvar_g_balance_rifle_secondary_bulletconstant;
 float autocvar_g_balance_rifle_secondary_bullethail;
 float autocvar_g_balance_rifle_secondary_burstcost;
 float autocvar_g_balance_rifle_secondary_damage;
 float autocvar_g_balance_rifle_secondary_force;
-float autocvar_g_balance_rifle_secondary_lifetime;
 float autocvar_g_balance_rifle_secondary_reload;
 float autocvar_g_balance_rifle_secondary_refire;
 float autocvar_g_balance_rifle_secondary_shots;
-float autocvar_g_balance_rifle_secondary_speed;
+float autocvar_g_balance_rifle_secondary_solidpenetration;
 float autocvar_g_balance_rifle_secondary_spread;
 float autocvar_g_balance_rifle_secondary_tracer;
 float autocvar_g_balance_rifle_reload_ammo;
@@ -627,12 +623,11 @@ float autocvar_g_balance_seeker_reload_time;
 float autocvar_g_balance_selfdamagepercent;
 float autocvar_g_balance_shotgun_primary_ammo;
 float autocvar_g_balance_shotgun_primary_animtime;
-float autocvar_g_balance_shotgun_primary_bulletconstant;
 float autocvar_g_balance_shotgun_primary_bullets;
 float autocvar_g_balance_shotgun_primary_damage;
 float autocvar_g_balance_shotgun_primary_force;
 float autocvar_g_balance_shotgun_primary_refire;
-float autocvar_g_balance_shotgun_primary_speed;
+float autocvar_g_balance_shotgun_primary_solidpenetration;
 float autocvar_g_balance_shotgun_primary_spread;
 float autocvar_g_balance_shotgun_secondary;
 float autocvar_g_balance_shotgun_secondary_animtime;
@@ -660,7 +655,6 @@ float autocvar_g_balance_tuba_edgedamage;
 float autocvar_g_balance_tuba_force;
 float autocvar_g_balance_tuba_radius;
 float autocvar_g_balance_tuba_refire;
-float autocvar_g_balance_uzi_bulletconstant;
 float autocvar_g_balance_uzi_burst;
 float autocvar_g_balance_uzi_burst_ammo;
 float autocvar_g_balance_uzi_burst_animtime;
@@ -674,7 +668,7 @@ float autocvar_g_balance_uzi_first_force;
 float autocvar_g_balance_uzi_first_refire;
 float autocvar_g_balance_uzi_first_spread;
 float autocvar_g_balance_uzi_mode;
-float autocvar_g_balance_uzi_speed;
+float autocvar_g_balance_uzi_solidpenetration;
 float autocvar_g_balance_uzi_spread_add;
 float autocvar_g_balance_uzi_spread_max;
 float autocvar_g_balance_uzi_spread_min;
@@ -687,7 +681,6 @@ float autocvar_g_balance_uzi_reload_ammo;
 float autocvar_g_balance_uzi_reload_time;
 float autocvar_g_ballistics_density_corpse;
 float autocvar_g_ballistics_density_player;
-float autocvar_g_ballistics_materialconstant;
 float autocvar_g_ballistics_mindistance;
 float autocvar_g_ban_default_bantime;
 float autocvar_g_ban_default_masksize;
index 46c46d7..eccc37f 100644 (file)
@@ -5,8 +5,7 @@ void turret_machinegun_attack();
 //.float bulletcounter;
 void turret_machinegun_attack()
 {
-    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_MACHINEGUN, 0, autocvar_g_balance_uzi_bulletconstant);
-    endFireBallisticBullet();
+    fireBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, 0, self.shot_dmg, self.shot_force, DEATH_TURRET_MACHINEGUN, 0);
 
     UziFlash();
     setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
index 1ce59dd..2eeb08b 100644 (file)
@@ -515,8 +515,7 @@ void walker_postthink()
 void walker_attack()
 {
     sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTEN_NORM);
-    fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_WALK_GUN, 0, autocvar_g_balance_uzi_bulletconstant);
-    endFireBallisticBullet();
+    fireBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, 0, self.shot_dmg, self.shot_force, DEATH_TURRET_WALK_GUN, 0);
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 }
 
index bdbcb82..a73997f 100644 (file)
@@ -43,8 +43,7 @@ float autocvar_g_vehicle_spiderbot_minigun_ammo_max;
 float autocvar_g_vehicle_spiderbot_minigun_ammo_regen;
 float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause;
 float autocvar_g_vehicle_spiderbot_minigun_force;
-float autocvar_g_vehicle_spiderbot_minigun_speed;
-float autocvar_g_vehicle_spiderbot_minigun_bulletconstant;
+float autocvar_g_vehicle_spiderbot_minigun_solidpenetration;
 
 float autocvar_g_vehicle_spiderbot_rocket_damage;
 float autocvar_g_vehicle_spiderbot_rocket_force;
@@ -495,12 +494,8 @@ float spiderbot_frame()
             v_forward = normalize(v_forward);
             v += v_forward * 50;
 
-//void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float bulletconstant)
-
-            fireBallisticBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_speed,
-                                5, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0, autocvar_g_vehicle_spiderbot_minigun_bulletconstant);
-
-            endFireBallisticBullet();
+            fireBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration,
+                                autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0);
 
 //            fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
 //                autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_VH_SPID_MINIGUN, 0);
index dad2055..fa119c7 100644 (file)
@@ -162,11 +162,11 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        trace_dphitq3surfaceflags = endq3surfaceflags;
 }
 
-float fireBallisticBullet_trace_callback_eff;
-void fireBallisticBullet_trace_callback(vector start, vector hit, vector end)
+float fireBullet_trace_callback_eff;
+void fireBullet_trace_callback(vector start, vector hit, vector end)
 {
        if(vlen(hit - start) > 16)
-               trailparticles(world, fireBallisticBullet_trace_callback_eff, start, hit);
+               trailparticles(world, fireBullet_trace_callback_eff, start, hit);
        WarpZone_trace_forent = world;
 }
 
@@ -184,11 +184,11 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
        float total_damage = 0;
 
        if(tracereffects & EF_RED)
-               fireBallisticBullet_trace_callback_eff = particleeffectnum("tr_rifle");
+               fireBullet_trace_callback_eff = particleeffectnum("tr_rifle");
        else if(tracereffects & EF_BLUE)
-               fireBallisticBullet_trace_callback_eff = particleeffectnum("tr_rifle_weak");
+               fireBullet_trace_callback_eff = particleeffectnum("tr_rifle_weak");
        else
-               fireBallisticBullet_trace_callback_eff = particleeffectnum("tr_bullet");
+               fireBullet_trace_callback_eff = particleeffectnum("tr_bullet");
 
        float lag = ANTILAG_LATENCY(self);
        if(lag < 0.001)
@@ -205,7 +205,7 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
        for (;;)
        {
                // TODO also show effect while tracing
-               WarpZone_TraceBox_ThroughZone(start, '0 0 0', '0 0 0', end, FALSE, self, world, fireBallisticBullet_trace_callback);
+               WarpZone_TraceBox_ThroughZone(start, '0 0 0', '0 0 0', end, FALSE, self, world, fireBullet_trace_callback);
                dir = WarpZone_TransformVelocity(WarpZone_trace_transform, dir);
                end = WarpZone_TransformOrigin(WarpZone_trace_transform, end);
                start = trace_endpos;
@@ -295,7 +295,7 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
                // Only show effect when going through a player (invisible otherwise)
                if (hit && (hit.solid != SOLID_BSP))
                        if(vlen(trace_endpos - start) > 4)
-                               trailparticles(self, fireBallisticBullet_trace_callback_eff, start, trace_endpos);
+                               trailparticles(self, fireBullet_trace_callback_eff, start, trace_endpos);
 
                start = trace_endpos;
 
@@ -309,15 +309,6 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
                                antilag_restore(pl);
 }
 
-// DEPRECATED kill this adaptor once we can
-void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float bulletconstant)
-{
-       fireBullet(start, dir, spread, (0.5 * pSpeed * pSpeed * bulletconstant) / autocvar_g_ballistics_materialconstant, damage, force, dtype, tracereffects);
-}
-void endFireBallisticBullet()
-{
-}
-
 float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception)
 {
        float is_from_contents = (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA);
index 90db2ad..0e3a5c0 100644 (file)
@@ -15,7 +15,7 @@ REGISTER_WEAPON(
 
 .float rifle_accumulator;
 
-void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant, float pTracer, float pShots, string pSound)
+void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, float deathtype, float pTracer, float pShots, string pSound)
 {
        float i;
 
@@ -32,8 +32,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSpeed
        }
 
        for(i = 0; i < pShots; ++i)
-               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE), pBulletConstant);
-       endFireBallisticBullet();
+               fireBullet(w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE));
 
        if (autocvar_g_casings >= 2)
                SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
@@ -41,12 +40,12 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSpeed
 
 void W_Rifle_Attack()
 {
-       W_Rifle_FireBullet(autocvar_g_balance_rifle_primary_spread, autocvar_g_balance_rifle_primary_damage, autocvar_g_balance_rifle_primary_force, autocvar_g_balance_rifle_primary_speed, autocvar_g_balance_rifle_primary_lifetime, autocvar_g_balance_rifle_primary_ammo, WEP_RIFLE, autocvar_g_balance_rifle_primary_bulletconstant, autocvar_g_balance_rifle_primary_tracer, autocvar_g_balance_rifle_primary_shots, "weapons/campingrifle_fire.wav");
+       W_Rifle_FireBullet(autocvar_g_balance_rifle_primary_spread, autocvar_g_balance_rifle_primary_damage, autocvar_g_balance_rifle_primary_force, autocvar_g_balance_rifle_primary_solidpenetration, autocvar_g_balance_rifle_primary_ammo, WEP_RIFLE, autocvar_g_balance_rifle_primary_tracer, autocvar_g_balance_rifle_primary_shots, "weapons/campingrifle_fire.wav");
 }
 
 void W_Rifle_Attack2()
 {
-       W_Rifle_FireBullet(autocvar_g_balance_rifle_secondary_spread, autocvar_g_balance_rifle_secondary_damage, autocvar_g_balance_rifle_secondary_force, autocvar_g_balance_rifle_secondary_speed, autocvar_g_balance_rifle_secondary_lifetime, autocvar_g_balance_rifle_secondary_ammo, WEP_RIFLE | HITTYPE_SECONDARY, autocvar_g_balance_rifle_secondary_bulletconstant, autocvar_g_balance_rifle_secondary_tracer, autocvar_g_balance_rifle_secondary_shots, "weapons/campingrifle_fire2.wav");
+       W_Rifle_FireBullet(autocvar_g_balance_rifle_secondary_spread, autocvar_g_balance_rifle_secondary_damage, autocvar_g_balance_rifle_secondary_force, autocvar_g_balance_rifle_secondary_solidpenetration, autocvar_g_balance_rifle_secondary_ammo, WEP_RIFLE | HITTYPE_SECONDARY, autocvar_g_balance_rifle_secondary_tracer, autocvar_g_balance_rifle_secondary_shots, "weapons/campingrifle_fire2.wav");
 }
 
 void spawnfunc_weapon_rifle (void)
@@ -126,7 +125,7 @@ float w_rifle(float req)
                        self.bot_secondary_riflemooth = 0;
                if(self.bot_secondary_riflemooth == 0)
                {
-                       if(bot_aim(autocvar_g_balance_rifle_primary_speed, 0, autocvar_g_balance_rifle_primary_lifetime, FALSE))
+                       if(bot_aim(1000000, 0, 0.001, FALSE))
                        {
                                self.BUTTON_ATCK = TRUE;
                                if(random() < 0.01) self.bot_secondary_riflemooth = 1;
@@ -134,7 +133,7 @@ float w_rifle(float req)
                }
                else
                {
-                       if(bot_aim(autocvar_g_balance_rifle_secondary_speed, 0, autocvar_g_balance_rifle_secondary_lifetime, FALSE))
+                       if(bot_aim(1000000, 0, 0.001, FALSE))
                        {
                                self.BUTTON_ATCK2 = TRUE;
                                if(random() < 0.03) self.bot_secondary_riflemooth = 0;
index 2fb6214..6ac3874 100644 (file)
@@ -21,8 +21,7 @@ void W_Shotgun_Attack (void)
        float   d;
        float   f;
        float   spread;
-       float   bulletspeed;
-       float   bulletconstant;
+       float   solidpenetration;
        entity flash;
 
        ammoamount = autocvar_g_balance_shotgun_primary_ammo;
@@ -30,15 +29,13 @@ void W_Shotgun_Attack (void)
        d = autocvar_g_balance_shotgun_primary_damage;
        f = autocvar_g_balance_shotgun_primary_force;
        spread = autocvar_g_balance_shotgun_primary_spread;
-       bulletspeed = autocvar_g_balance_shotgun_primary_speed;
-       bulletconstant = autocvar_g_balance_shotgun_primary_bulletconstant;
+       solidpenetration = autocvar_g_balance_shotgun_primary_solidpenetration;
 
        W_DecreaseAmmo(ammo_shells, ammoamount, autocvar_g_balance_shotgun_reload_ammo);
 
        W_SetupShot (self, TRUE, 5, "weapons/shotgun_fire.wav", CH_WEAPON_A, d * bullets);
        for (sc = 0;sc < bullets;sc = sc + 1)
-               fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, f, WEP_SHOTGUN, 0, bulletconstant);
-       endFireBallisticBullet();
+               fireBullet(w_shotorg, w_shotdir, spread, solidpenetration, d, f, WEP_SHOTGUN, 0);
 
        pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, autocvar_g_balance_shotgun_primary_ammo);
 
index 5fd890a..4fb6047 100644 (file)
@@ -62,10 +62,9 @@ void W_UZI_Attack (float deathtype)
        ATTACK_FINISHED(self) = time + autocvar_g_balance_uzi_first_refire * W_WeaponRateFactor();
 
        if (self.misc_bulletcounter == 1)
-               fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_first_damage, autocvar_g_balance_uzi_first_force, deathtype, 0, autocvar_g_balance_uzi_bulletconstant);
+               fireBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_solidpenetration, autocvar_g_balance_uzi_first_damage, autocvar_g_balance_uzi_first_force, deathtype, 0);
        else
-               fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, deathtype, 0, autocvar_g_balance_uzi_bulletconstant);
-       endFireBallisticBullet();
+               fireBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_solidpenetration, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, deathtype, 0);
 
        pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -136,8 +135,7 @@ void uzi_mode1_fire_auto()
        }
 
        uzi_spread = bound(autocvar_g_balance_uzi_spread_min, autocvar_g_balance_uzi_spread_min + (autocvar_g_balance_uzi_spread_add * self.misc_bulletcounter), autocvar_g_balance_uzi_spread_max);
-       fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, autocvar_g_balance_uzi_bulletconstant);
-       endFireBallisticBullet();
+       fireBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_solidpenetration, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0);
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
@@ -162,9 +160,7 @@ void uzi_mode1_fire_burst()
                self.punchangle_y = random () - 0.5;
        }
 
-       fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_burst_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, autocvar_g_balance_uzi_bulletconstant);
-       endFireBallisticBullet();
-
+       fireBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_burst_spread, autocvar_g_balance_uzi_solidpenetration, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0);
 
        pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
index 88fba27..253ed31 100644 (file)
@@ -30,8 +30,7 @@ set g_vehicle_spiderbot_minigun_damage          24       // 400 (x2) DPS
 set g_vehicle_spiderbot_minigun_refire          0.06
 set g_vehicle_spiderbot_minigun_force           9
 set g_vehicle_spiderbot_minigun_spread          0.015
-set g_vehicle_spiderbot_minigun_speed           45000  // ~ 32QU
-set g_vehicle_spiderbot_minigun_bulletconstant  110
+set g_vehicle_spiderbot_minigun_solidpenetration 32
 set g_vehicle_spiderbot_minigun_ammo_cost       1
 set g_vehicle_spiderbot_minigun_ammo_max        100
 set g_vehicle_spiderbot_minigun_ammo_regen      40