set g_balance_crylink_secondary_speed 7000
set g_balance_crylink_secondary_spread 0.08
set g_balance_crylink_secondary_spreadtype 0
+set g_balance_crylink_swap_attacks 0
set g_balance_crylink_switchdelay_drop 0.2
set g_balance_crylink_switchdelay_raise 0.2
set g_balance_crylink_weaponreplace ""
set g_balance_crylink_secondary_speed 7000
set g_balance_crylink_secondary_spread 0.08
set g_balance_crylink_secondary_spreadtype 0
+set g_balance_crylink_swap_attacks 0
set g_balance_crylink_switchdelay_drop 0.15
set g_balance_crylink_switchdelay_raise 0.15
set g_balance_crylink_weaponreplace ""
set g_balance_crylink_secondary_speed 3000
set g_balance_crylink_secondary_spread 0.01
set g_balance_crylink_secondary_spreadtype 1
+set g_balance_crylink_swap_attacks 0
set g_balance_crylink_switchdelay_drop 0.2
set g_balance_crylink_switchdelay_raise 0.2
set g_balance_crylink_weaponreplace ""
set g_balance_crylink_secondary_speed 2000
set g_balance_crylink_secondary_spread 0
set g_balance_crylink_secondary_spreadtype 1
+set g_balance_crylink_swap_attacks 0
set g_balance_crylink_switchdelay_drop 0
set g_balance_crylink_switchdelay_raise 0
set g_balance_crylink_weaponreplace ""
set g_balance_crylink_secondary_speed 3000
set g_balance_crylink_secondary_spread 0.01
set g_balance_crylink_secondary_spreadtype 1
+set g_balance_crylink_swap_attacks 0
set g_balance_crylink_switchdelay_drop 0.2
set g_balance_crylink_switchdelay_raise 0.2
set g_balance_crylink_weaponreplace ""
set g_balance_crylink_secondary_speed 3000
set g_balance_crylink_secondary_spread 0.01
set g_balance_crylink_secondary_spreadtype 1
+set g_balance_crylink_swap_attacks 0
set g_balance_crylink_switchdelay_drop 0.2
set g_balance_crylink_switchdelay_raise 0.2
set g_balance_crylink_weaponreplace ""
thiswep.wr_reload(thiswep, actor, weaponentity);
}
- if(fire & 1)
+ // attack swapping is useful for emulating BFG behavior in XDF
+ int primary_fire = autocvar_g_balance_crylink_swap_attacks ? fire & 2 : fire & 1;
+ int secondary_fire = autocvar_g_balance_crylink_swap_attacks ? fire & 1 : fire & 2;
+
+ if(primary_fire)
{
if(actor.(weaponentity).crylink_waitrelease != 1)
if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(crylink, refire)))
}
}
- if((fire & 2) && autocvar_g_balance_crylink_secondary)
+ if((secondary_fire) && autocvar_g_balance_crylink_secondary)
{
if(actor.(weaponentity).crylink_waitrelease != 2)
if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(crylink, refire)))
}
}
- if((actor.(weaponentity).crylink_waitrelease == 1 && !(fire & 1)) || (actor.(weaponentity).crylink_waitrelease == 2 && !(fire & 2)))
+ if((actor.(weaponentity).crylink_waitrelease == 1 && !(primary_fire)) || (actor.(weaponentity).crylink_waitrelease == 2 && !(secondary_fire)))
{
if(!actor.(weaponentity).crylink_lastgroup || time > actor.(weaponentity).crylink_lastgroup.teleport_time)
{
P(class, prefix, speed, float, BOTH) \
P(class, prefix, spreadtype, float, SEC) \
P(class, prefix, spread, float, BOTH) \
+ P(class, prefix, swap_attacks, float, NONE) \
P(class, prefix, switchdelay_drop, float, NONE) \
P(class, prefix, switchdelay_raise, float, NONE) \
P(class, prefix, weaponreplace, string, NONE) \