From: Samual Lenks Date: Tue, 10 Dec 2013 21:15:14 +0000 (-0500) Subject: Fixes for Crylink X-Git-Tag: xonotic-v0.8.0~152^2~255 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=28140d14008a21314bf5dcfec5b9917a2448c187;p=xonotic%2Fxonotic-data.pk3dir.git Fixes for Crylink --- diff --git a/bal-wep-xonotic.cfg b/bal-wep-xonotic.cfg index c3874d45a..ab6608057 100644 --- a/bal-wep-xonotic.cfg +++ b/bal-wep-xonotic.cfg @@ -296,6 +296,7 @@ set g_balance_crylink_primary_speed 2000 set g_balance_crylink_primary_spread 0.08 set g_balance_crylink_reload_ammo 0 set g_balance_crylink_reload_time 2 +set g_balance_crylink_secondary 1 set g_balance_crylink_secondary_ammo 2 set g_balance_crylink_secondary_animtime 0.2 set g_balance_crylink_secondary_bouncedamagefactor 0.5 diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index df9b1f922..3f8382864 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -38,6 +38,7 @@ REGISTER_WEAPON( w_cvar(id, sn, MO_BOTH, joinexplode_radius) \ w_cvar(id, sn, MO_BOTH, joinexplode_force) \ w_cvar(id, sn, MO_SEC, spreadtype) \ + w_cvar(id, sn, MO_NONE, secondary) \ w_prop(id, sn, float, reloading_ammo, reload_ammo) \ w_prop(id, sn, float, reloading_time, reload_time) \ w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \ @@ -239,10 +240,18 @@ void W_Crylink_LinkJoinEffect_Think() if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode)) { n /= WEP_CVAR_BOTH(crylink, isprimary, shots); - RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n, - WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n, - WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n, e.realowner, world, - WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n, e.projectiledeathtype, other); + RadiusDamage( + e, + e.realowner, + WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n, + WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n, + WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n, + e.realowner, + world, + WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n, + e.projectiledeathtype, + other + ); pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n); } } @@ -332,7 +341,7 @@ void W_Crylink_Attack (void) vector forward, right, up; float maxdmg; - W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_reload_ammo); + W_DecreaseAmmo(ammo_cells, WEP_CVAR_PRI(crylink, ammo), autocvar_g_balance_crylink_reload_ammo); maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots); maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces); @@ -441,7 +450,7 @@ void W_Crylink_Attack2 (void) vector forward, right, up; float maxdmg; - W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_secondary_ammo, autocvar_g_balance_crylink_reload_ammo); + W_DecreaseAmmo(ammo_cells, WEP_CVAR_SEC(crylink, ammo), autocvar_g_balance_crylink_reload_ammo); maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots); maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces); @@ -565,7 +574,7 @@ float w_crylink(float req) } case WR_THINK: { - if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo)) // forced reload + if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) // forced reload WEP_ACTION(self.weapon, WR_RELOAD); if (self.BUTTON_ATCK) @@ -643,8 +652,8 @@ float w_crylink(float req) if(self.crylink_lastgroup && self.crylink_waitrelease) return TRUE; - ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo; - ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_primary_ammo; + ammo_amount = self.ammo_cells >= WEP_CVAR_PRI(crylink, ammo); + ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo); return ammo_amount; } case WR_CHECKAMMO2: @@ -653,8 +662,8 @@ float w_crylink(float req) if(self.crylink_lastgroup && self.crylink_waitrelease) return TRUE; - ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo; - ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_secondary_ammo; + ammo_amount = self.ammo_cells >= WEP_CVAR_SEC(crylink, ammo); + ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo); return ammo_amount; } case WR_CONFIG: @@ -664,7 +673,7 @@ float w_crylink(float req) } case WR_RELOAD: { - W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), "weapons/reload.wav"); + W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), "weapons/reload.wav"); return TRUE; } case WR_SUICIDEMESSAGE: diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 79bd59882..4b1c7d880 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -80,7 +80,6 @@ float autocvar_g_balance_armor_rot; float autocvar_g_balance_armor_rotlinear; float autocvar_g_balance_armor_rotstable; float autocvar_g_balance_armor_start; -//float autocvar_g_balance_rifle_reload_ammo; float autocvar_g_balance_cloaked_alpha; float autocvar_g_balance_contents_damagerate; float autocvar_g_balance_contents_drowndelay; @@ -88,8 +87,6 @@ float autocvar_g_balance_contents_playerdamage_drowning; float autocvar_g_balance_contents_playerdamage_lava; float autocvar_g_balance_contents_playerdamage_slime; float autocvar_g_balance_contents_projectiledamage; -float autocvar_g_balance_crylink_secondary; -//float autocvar_g_balance_crylink_reload_ammo; float autocvar_g_balance_damagepush_speedfactor; float autocvar_g_balance_falldamage_deadminspeed; float autocvar_g_balance_falldamage_factor; @@ -113,7 +110,6 @@ float autocvar_g_balance_grapplehook_speed_fly; float autocvar_g_balance_grapplehook_speed_pull; float autocvar_g_balance_grapplehook_stretch; float autocvar_g_balance_grapplehook_damagedbycontents; -//float autocvar_g_balance_hagar_reload_ammo; float autocvar_g_balance_health_limit; float autocvar_g_balance_health_regen; float autocvar_g_balance_health_regenlinear; @@ -122,7 +118,6 @@ float autocvar_g_balance_health_rot; float autocvar_g_balance_health_rotlinear; float autocvar_g_balance_health_rotstable; float autocvar_g_balance_health_start; -//float autocvar_g_balance_hlac_reload_ammo; float autocvar_g_balance_keyhunt_damageforcescale; float autocvar_g_balance_keyhunt_delay_collect; float autocvar_g_balance_keyhunt_delay_return; @@ -183,7 +178,6 @@ float autocvar_g_balance_selfdamagepercent; float autocvar_g_balance_teams; float autocvar_g_balance_teams_prevent_imbalance; float autocvar_g_balance_teams_scorefactor; -//float autocvar_g_balance_uzi_reload_ammo; float autocvar_g_ballistics_density_corpse; float autocvar_g_ballistics_density_player; float autocvar_g_ballistics_materialconstant; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a12cb9a6b..1527ba4a4 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -640,7 +640,7 @@ float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO d = FALSE; } else if (g_cts) - d = (i == WEP_SHOCKWAVE); // todo: how to handle shotgun in CTS mode? we're removing it.. so.... + d = (i == WEP_SHOCKWAVE); // WEAPONTODO: how to handle shotgun in CTS mode? we're replacing it.. so.... else if (g_nexball) d = 0; // weapon is set a few lines later else