From 9a35dd4b0c1c535c5eff555235c26d0296c2b783 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 19 Nov 2013 11:39:59 +0100 Subject: [PATCH] cvar cleanup --- balance25.cfg | 6 ++--- balanceFruitieX.cfg | 6 ++--- balanceXDF.cfg | 4 +-- balanceXPM.cfg | 4 +-- balanceXonotic.cfg | 6 ++--- defaultXonotic.cfg | 25 +------------------ qcsrc/server/autocvars.qh | 15 +++-------- .../server/tturrets/units/unit_machinegun.qc | 3 +-- qcsrc/server/tturrets/units/unit_walker.qc | 3 +-- qcsrc/server/vehicles/spiderbot.qc | 11 +++----- qcsrc/server/w_common.qc | 25 ++++++------------- qcsrc/server/w_rifle.qc | 13 +++++----- qcsrc/server/w_shotgun.qc | 9 +++---- qcsrc/server/w_uzi.qc | 12 +++------ vehicle_spiderbot.cfg | 3 +-- 15 files changed, 42 insertions(+), 103 deletions(-) diff --git a/balance25.cfg b/balance25.cfg index 9451d377d..f0cc7d73b 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -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 diff --git a/balanceFruitieX.cfg b/balanceFruitieX.cfg index f985659f9..948d7e4b9 100644 --- a/balanceFruitieX.cfg +++ b/balanceFruitieX.cfg @@ -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 diff --git a/balanceXDF.cfg b/balanceXDF.cfg index 4e0631523..29a23ad7e 100644 --- a/balanceXDF.cfg +++ b/balanceXDF.cfg @@ -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 diff --git a/balanceXPM.cfg b/balanceXPM.cfg index 8c171476a..885fb9447 100644 --- a/balanceXPM.cfg +++ b/balanceXPM.cfg @@ -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 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index cdf3f2013..de865fa68 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -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 diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 217aab90a..ca2b5a5aa 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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!)" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 7d920fb0c..a10dcc11c 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/tturrets/units/unit_machinegun.qc b/qcsrc/server/tturrets/units/unit_machinegun.qc index 46c46d7f8..eccc37f03 100644 --- a/qcsrc/server/tturrets/units/unit_machinegun.qc +++ b/qcsrc/server/tturrets/units/unit_machinegun.qc @@ -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"); diff --git a/qcsrc/server/tturrets/units/unit_walker.qc b/qcsrc/server/tturrets/units/unit_walker.qc index 1ce59dd27..2eeb08b8f 100644 --- a/qcsrc/server/tturrets/units/unit_walker.qc +++ b/qcsrc/server/tturrets/units/unit_walker.qc @@ -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); } diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index bdbcb8288..a73997fda 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -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); diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index dad205517..fa119c7b7 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -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); diff --git a/qcsrc/server/w_rifle.qc b/qcsrc/server/w_rifle.qc index 90db2ad75..0e3a5c0b0 100644 --- a/qcsrc/server/w_rifle.qc +++ b/qcsrc/server/w_rifle.qc @@ -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; diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index 2fb621401..6ac387475 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -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); diff --git a/qcsrc/server/w_uzi.qc b/qcsrc/server/w_uzi.qc index 5fd890a0b..4fb604743 100644 --- a/qcsrc/server/w_uzi.qc +++ b/qcsrc/server/w_uzi.qc @@ -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); diff --git a/vehicle_spiderbot.cfg b/vehicle_spiderbot.cfg index 88fba2714..253ed3166 100644 --- a/vehicle_spiderbot.cfg +++ b/vehicle_spiderbot.cfg @@ -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 -- 2.39.2