g_mod_balance Xonotic
// {{{ starting gear
-set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minelayer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE
-set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE
-set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE
-set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_shotgun -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_uzi -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_grenadelauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_electro -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_crylink -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_nex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hagar -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default" // UNTIL IT CAN BE REMOVED FROM CODE
+set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_balance_health_start 100
set g_balance_armor_start 0
set g_start_ammo_shells 15
set g_balance_grenadelauncher_reload_ammo 0 //default: 12
set g_balance_grenadelauncher_reload_time 2
// }}}
-// {{{ minelayer
-set g_balance_minelayer_damage 40
-set g_balance_minelayer_edgedamage 20
-set g_balance_minelayer_force 250
-set g_balance_minelayer_radius 175
-set g_balance_minelayer_proximityradius 150
-set g_balance_minelayer_speed 1000
-set g_balance_minelayer_lifetime 10
-set g_balance_minelayer_lifetime_countdown 0.5
-set g_balance_minelayer_refire 1.5
-set g_balance_minelayer_animtime 0.4
-set g_balance_minelayer_ammo 4
-set g_balance_minelayer_health 15
-set g_balance_minelayer_limit 3 // 0 disables the limit
-set g_balance_minelayer_protection 0 // don't explode if the mine would hurt the owner or a team mate
-set g_balance_minelayer_damageforcescale 0
-set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_minelayer_time 0.5
-set g_balance_minelayer_remote_damage 45
-set g_balance_minelayer_remote_edgedamage 40
-set g_balance_minelayer_remote_radius 200
-set g_balance_minelayer_remote_force 300
-set g_balance_minelayer_reload_ammo 0 //default: 15
-set g_balance_minelayer_reload_time 2
-// }}}
// {{{ electro
set g_balance_electro_lightning 0
set g_balance_electro_primary_damage 40
set g_balance_hook_secondary_health 15
set g_balance_hook_secondary_damageforcescale 0
// }}}
-// {{{ hlac // TO BE REMOVED
-set g_balance_hlac_primary_spread_min 0.01
-set g_balance_hlac_primary_spread_max 0.25
-set g_balance_hlac_primary_spread_add 0.0045
-set g_balance_hlac_primary_spread_crouchmod 0.25
-
-set g_balance_hlac_primary_damage 18
-set g_balance_hlac_primary_edgedamage 9
-set g_balance_hlac_primary_force 90
-set g_balance_hlac_primary_radius 70
-set g_balance_hlac_primary_speed 9000
-set g_balance_hlac_primary_lifetime 5
-
-set g_balance_hlac_primary_refire 0.15
-set g_balance_hlac_primary_animtime 0.4
-set g_balance_hlac_primary_ammo 1
-
-set g_balance_hlac_secondary 1
-set g_balance_hlac_secondary_spread 0.15
-set g_balance_hlac_secondary_spread_crouchmod 0.5
-
-set g_balance_hlac_secondary_damage 15
-set g_balance_hlac_secondary_edgedamage 7.5
-set g_balance_hlac_secondary_force 90
-set g_balance_hlac_secondary_radius 70
-set g_balance_hlac_secondary_speed 9000
-set g_balance_hlac_secondary_lifetime 5
-
-set g_balance_hlac_secondary_refire 1
-set g_balance_hlac_secondary_animtime 0.3
-set g_balance_hlac_secondary_ammo 10
-set g_balance_hlac_secondary_shots 6
-
-set g_balance_hlac_reload_ammo 0 //default: 20
-set g_balance_hlac_reload_time 2
-// }}}
-// {{{ rifle
-set g_balance_rifle_bursttime 0
-set g_balance_rifle_primary_tracer 1
-set g_balance_rifle_primary_shots 1
-set g_balance_rifle_primary_damage 40
-set g_balance_rifle_primary_headshotaddeddamage 40
-set g_balance_rifle_primary_spread 0
-set g_balance_rifle_primary_force 100
-set g_balance_rifle_primary_speed 40000
-set g_balance_rifle_primary_lifetime 5
-set g_balance_rifle_primary_refire 1.2
-set g_balance_rifle_primary_animtime 0.4
-set g_balance_rifle_primary_ammo 10
-set g_balance_rifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_rifle_primary_burstcost 0
-set g_balance_rifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_rifle_secondary 1
-set g_balance_rifle_secondary_reload 0
-set g_balance_rifle_secondary_tracer 0
-set g_balance_rifle_secondary_shots 4
-set g_balance_rifle_secondary_damage 10
-set g_balance_rifle_secondary_headshotaddeddamage 20
-set g_balance_rifle_secondary_spread 0.04
-set g_balance_rifle_secondary_force 50
-set g_balance_rifle_secondary_speed 20000
-set g_balance_rifle_secondary_lifetime 5
-set g_balance_rifle_secondary_refire 0.9
-set g_balance_rifle_secondary_animtime 0.3
-set g_balance_rifle_secondary_ammo 10
-set g_balance_rifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_rifle_secondary_burstcost 0
-set g_balance_rifle_secondary_bullethail 0 // empty magazine on shot
-set g_balance_rifle_reload_ammo 80 //default: 80
-set g_balance_rifle_reload_time 2
-// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
set g_balance_tuba_animtime 0.05
set g_balance_fireball_secondary_speed_z 0
set g_balance_fireball_secondary_spread 0
// }}}
-// {{{ seeker
-set g_balance_seeker_type 1 // 0 = old seeker, 1 = new seeker. THIS IS A TEMPORARY CVAR FOR TESTING, will be removed later.
-set g_balance_seeker_flac_ammo 0.5
-set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
-set g_balance_seeker_flac_edgedamage 10
-set g_balance_seeker_flac_force 50
-set g_balance_seeker_flac_lifetime 0.1
-set g_balance_seeker_flac_lifetime_rand 0.05
-set g_balance_seeker_flac_radius 100
-set g_balance_seeker_flac_refire 0.1
-set g_balance_seeker_flac_speed 3000
-set g_balance_seeker_flac_speed_up 1000
-set g_balance_seeker_flac_speed_z 0
-set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.2
-set g_balance_seeker_tag_damageforcescale 0
-set g_balance_seeker_tag_health 0
-set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 0.75 // LOG: 0.7 -> 0.75
-set g_balance_seeker_tag_speed 5000
-set g_balance_seeker_tag_spread 0
-set g_balance_seeker_tag_tracker_lifetime 10
-set g_balance_seeker_missile_accel 1500
-set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.2
-set g_balance_seeker_missile_count 3 // LOG: 8 -> 3
-set g_balance_seeker_missile_damage 16 // LOG: 15 -> 30
-set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 6000
-set g_balance_seeker_missile_delay 0.25
-set g_balance_seeker_missile_edgedamage 8
-set g_balance_seeker_missile_force 50 // LOG: 100 -> 150
-set g_balance_seeker_missile_health 1
-set g_balance_seeker_missile_lifetime 15
-set g_balance_seeker_missile_proxy 0
-set g_balance_seeker_missile_proxy_delay 0.2
-set g_balance_seeker_missile_proxy_maxrange 45
-set g_balance_seeker_missile_radius 70
-set g_balance_seeker_missile_refire 0.25
-set g_balance_seeker_missile_smart 0
-set g_balance_seeker_missile_smart_mindist 800
-set g_balance_seeker_missile_smart_trace_max 2500
-set g_balance_seeker_missile_smart_trace_min 1000
-set g_balance_seeker_missile_speed 1500
-set g_balance_seeker_missile_speed_up 0
-set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 2000 // LOG: 1400 -> 1300
-set g_balance_seeker_missile_spread 0
-set g_balance_seeker_missile_turnrate 0.15
-set g_balance_seeker_reload_ammo 0 //default: 15
-set g_balance_seeker_reload_time 2
-// End new seeker
set g_weaponreplace_laser ""
set g_weaponreplace_shotgun ""
set g_weaponreplace_uzi ""
-set g_weaponreplace_minelayer ""
set g_weaponreplace_grenadelauncher ""
set g_weaponreplace_electro ""
set g_weaponreplace_crylink ""
set g_weaponreplace_porto ""
set g_weaponreplace_minstanex ""
set g_weaponreplace_hook ""
-set g_weaponreplace_hlac ""
-set g_weaponreplace_rifle ""
set g_weaponreplace_tuba ""
set g_weaponreplace_fireball ""
-set g_weaponreplace_seeker ""
set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping uzi and shotgun (for Q3A map compatibility in mapinfo files)"
set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
scr_loadingscreen_scale_limit 2
// other config files
+exec new_toys.cfg // run BEFORE balance to make sure balance wins
exec balanceXonotic.cfg
exec ctfscoring-ai.cfg
exec effects-normal.cfg
--- /dev/null
+set g_new_toys 0 "Mutator 'New Toys': enable extra fun guns"
+set g_new_toys_autoreplace 2 "0: never replace, 1: always auto replace guns by available new toys, 2: randomly auto replace guns by available new toys"
+
+set g_weaponreplace_hlac ""
+set g_weaponreplace_minelayer ""
+set g_weaponreplace_rifle ""
+set g_weaponreplace_seeker ""
+
+set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE
+set g_start_weapon_minelayer -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE
+set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+
+// {{{ hlac
+set g_balance_hlac_primary_spread_min 0.01
+set g_balance_hlac_primary_spread_max 0.25
+set g_balance_hlac_primary_spread_add 0.0045
+set g_balance_hlac_primary_spread_crouchmod 0.25
+
+set g_balance_hlac_primary_damage 18
+set g_balance_hlac_primary_edgedamage 9
+set g_balance_hlac_primary_force 90
+set g_balance_hlac_primary_radius 70
+set g_balance_hlac_primary_speed 9000
+set g_balance_hlac_primary_lifetime 5
+
+set g_balance_hlac_primary_refire 0.15
+set g_balance_hlac_primary_animtime 0.4
+set g_balance_hlac_primary_ammo 1
+
+set g_balance_hlac_secondary 1
+set g_balance_hlac_secondary_spread 0.15
+set g_balance_hlac_secondary_spread_crouchmod 0.5
+
+set g_balance_hlac_secondary_damage 15
+set g_balance_hlac_secondary_edgedamage 7.5
+set g_balance_hlac_secondary_force 90
+set g_balance_hlac_secondary_radius 70
+set g_balance_hlac_secondary_speed 9000
+set g_balance_hlac_secondary_lifetime 5
+
+set g_balance_hlac_secondary_refire 1
+set g_balance_hlac_secondary_animtime 0.3
+set g_balance_hlac_secondary_ammo 10
+set g_balance_hlac_secondary_shots 6
+
+set g_balance_hlac_reload_ammo 0 //default: 20
+set g_balance_hlac_reload_time 2
+// }}}
+// {{{ minelayer
+set g_balance_minelayer_damage 40
+set g_balance_minelayer_edgedamage 20
+set g_balance_minelayer_force 250
+set g_balance_minelayer_radius 175
+set g_balance_minelayer_proximityradius 150
+set g_balance_minelayer_speed 1000
+set g_balance_minelayer_lifetime 10
+set g_balance_minelayer_lifetime_countdown 0.5
+set g_balance_minelayer_refire 1.5
+set g_balance_minelayer_animtime 0.4
+set g_balance_minelayer_ammo 4
+set g_balance_minelayer_health 15
+set g_balance_minelayer_limit 3 // 0 disables the limit
+set g_balance_minelayer_protection 0 // don't explode if the mine would hurt the owner or a team mate
+set g_balance_minelayer_damageforcescale 0
+set g_balance_minelayer_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
+set g_balance_minelayer_time 0.5
+set g_balance_minelayer_remote_damage 45
+set g_balance_minelayer_remote_edgedamage 40
+set g_balance_minelayer_remote_radius 200
+set g_balance_minelayer_remote_force 300
+set g_balance_minelayer_reload_ammo 0 //default: 15
+set g_balance_minelayer_reload_time 2
+// }}}
+// {{{ rifle
+set g_balance_rifle_bursttime 0
+set g_balance_rifle_primary_tracer 1
+set g_balance_rifle_primary_shots 1
+set g_balance_rifle_primary_damage 40
+set g_balance_rifle_primary_headshotaddeddamage 40
+set g_balance_rifle_primary_spread 0
+set g_balance_rifle_primary_force 100
+set g_balance_rifle_primary_speed 40000
+set g_balance_rifle_primary_lifetime 5
+set g_balance_rifle_primary_refire 1.2
+set g_balance_rifle_primary_animtime 0.4
+set g_balance_rifle_primary_ammo 10
+set g_balance_rifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_rifle_primary_burstcost 0
+set g_balance_rifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_rifle_secondary 1
+set g_balance_rifle_secondary_reload 0
+set g_balance_rifle_secondary_tracer 0
+set g_balance_rifle_secondary_shots 4
+set g_balance_rifle_secondary_damage 10
+set g_balance_rifle_secondary_headshotaddeddamage 20
+set g_balance_rifle_secondary_spread 0.04
+set g_balance_rifle_secondary_force 50
+set g_balance_rifle_secondary_speed 20000
+set g_balance_rifle_secondary_lifetime 5
+set g_balance_rifle_secondary_refire 0.9
+set g_balance_rifle_secondary_animtime 0.3
+set g_balance_rifle_secondary_ammo 10
+set g_balance_rifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_rifle_secondary_burstcost 0
+set g_balance_rifle_secondary_bullethail 0 // empty magazine on shot
+set g_balance_rifle_reload_ammo 80 //default: 80
+set g_balance_rifle_reload_time 2
+// }}}
+// {{{ seeker
+set g_balance_seeker_type 1 // 0 = old seeker, 1 = new seeker. THIS IS A TEMPORARY CVAR FOR TESTING, will be removed later.
+set g_balance_seeker_flac_ammo 0.5
+set g_balance_seeker_flac_animtime 0.1
+set g_balance_seeker_flac_damage 15
+set g_balance_seeker_flac_edgedamage 10
+set g_balance_seeker_flac_force 50
+set g_balance_seeker_flac_lifetime 0.1
+set g_balance_seeker_flac_lifetime_rand 0.05
+set g_balance_seeker_flac_radius 100
+set g_balance_seeker_flac_refire 0.1
+set g_balance_seeker_flac_speed 3000
+set g_balance_seeker_flac_speed_up 1000
+set g_balance_seeker_flac_speed_z 0
+set g_balance_seeker_flac_spread 0.4
+set g_balance_seeker_tag_ammo 1
+set g_balance_seeker_tag_animtime 0.2
+set g_balance_seeker_tag_damageforcescale 0
+set g_balance_seeker_tag_health 0
+set g_balance_seeker_tag_lifetime 15
+set g_balance_seeker_tag_refire 0.75 // LOG: 0.7 -> 0.75
+set g_balance_seeker_tag_speed 5000
+set g_balance_seeker_tag_spread 0
+set g_balance_seeker_tag_tracker_lifetime 10
+set g_balance_seeker_missile_accel 1500
+set g_balance_seeker_missile_ammo 2
+set g_balance_seeker_missile_animtime 0.2
+set g_balance_seeker_missile_count 3 // LOG: 8 -> 3
+set g_balance_seeker_missile_damage 16 // LOG: 15 -> 30
+set g_balance_seeker_missile_damageforcescale 4
+set g_balance_seeker_missile_decel 6000
+set g_balance_seeker_missile_delay 0.25
+set g_balance_seeker_missile_edgedamage 8
+set g_balance_seeker_missile_force 50 // LOG: 100 -> 150
+set g_balance_seeker_missile_health 1
+set g_balance_seeker_missile_lifetime 15
+set g_balance_seeker_missile_proxy 0
+set g_balance_seeker_missile_proxy_delay 0.2
+set g_balance_seeker_missile_proxy_maxrange 45
+set g_balance_seeker_missile_radius 70
+set g_balance_seeker_missile_refire 0.25
+set g_balance_seeker_missile_smart 0
+set g_balance_seeker_missile_smart_mindist 800
+set g_balance_seeker_missile_smart_trace_max 2500
+set g_balance_seeker_missile_smart_trace_min 1000
+set g_balance_seeker_missile_speed 1500
+set g_balance_seeker_missile_speed_up 0
+set g_balance_seeker_missile_speed_z 0
+set g_balance_seeker_missile_speed_max 2000 // LOG: 1400 -> 1300
+set g_balance_seeker_missile_spread 0
+set g_balance_seeker_missile_turnrate 0.15
+set g_balance_seeker_reload_ammo 0 //default: 15
+set g_balance_seeker_reload_time 2
+// End new seeker
# define WEPSET_COPY_EE(e,o) ((e)._WS_weapons = (o)._WS_weapons)
# define WEPSET_EQ_EE(e,o) ((e)._WS_weapons == (o)._WS_weapons)
# define WEPSET_OR_EE(e,o) ((e)._WS_weapons |= (o)._WS_weapons)
-# define WEPSET_AND_EE(e,o) ((e)._WS_weapons &= (o)._WS_weapons)
+# define WEPSET_AND_EE(e,o) ((e)._WS_weapons = (e)._WS_weapons & (o)._WS_weapons)
# define WEPSET_ANDNOT_EE(e,o) ((e)._WS_weapons &~= (o)._WS_weapons)
# define WEPSET_CONTAINS_ANY_EE(e,o) !!((e)._WS_weapons & (o)._WS_weapons)
# define WEPSET_CONTAINS_ALL_EE(e,o) !!(((e)._WS_weapons & (o)._WS_weapons) == (e)._WS_weapons)
# define WEPSET_COPY_EA(e,a) ((e)._WS_weapons = (_WS_##a))
# define WEPSET_EQ_EA(e,a) ((e)._WS_weapons == (_WS_##a))
# define WEPSET_OR_EA(e,a) ((e)._WS_weapons |= (_WS_##a))
-# define WEPSET_AND_EA(e,a) ((e)._WS_weapons &= (_WS_##a))
+# define WEPSET_AND_EA(e,a) ((e)._WS_weapons = (e)._WS_weapons & (_WS_##a))
# define WEPSET_ANDNOT_EA(e,a) ((e)._WS_weapons &~= (_WS_##a))
# define WEPSET_CONTAINS_ANY_EA(e,a) !!((e)._WS_weapons & (_WS_##a))
# define WEPSET_CONTAINS_ALL_EA(e,a) !!(((e)._WS_weapons & (_WS_##a)) == (_WS_##a))
# define WEPSET_COPY_EW(e,w) ((e)._WS_weapons = power2of((w) - WEP_FIRST))
# define WEPSET_EQ_EW(e,w) ((e)._WS_weapons == power2of((w) - WEP_FIRST))
# define WEPSET_OR_EW(e,w) ((e)._WS_weapons |= power2of((w) - WEP_FIRST))
-# define WEPSET_AND_EW(e,w) ((e)._WS_weapons &= power2of((w) - WEP_FIRST))
+# define WEPSET_AND_EW(e,w) ((e)._WS_weapons = (e)._WS_weapons & power2of((w) - WEP_FIRST))
# define WEPSET_ANDNOT_EW(e,w) ((e)._WS_weapons &~= power2of((w) - WEP_FIRST))
# define WEPSET_CONTAINS_EW(e,w) !!((e)._WS_weapons & power2of((w) - WEP_FIRST))
# define WEPSET_COPY_AE(a,e) ((_WS_##a) = (e)._WS_weapons)
# define WEPSET_EQ_AE(a,e) ((_WS_##a) == (e)._WS_weapons)
# define WEPSET_OR_AE(a,e) ((_WS_##a) |= (e)._WS_weapons)
-# define WEPSET_AND_AE(a,e) ((_WS_##a) &= (e)._WS_weapons)
+# define WEPSET_AND_AE(a,e) ((_WS_##a) = (_WS_##a) & (e)._WS_weapons)
# define WEPSET_ANDNOT_AE(a,e) ((_WS_##a) &~= (e)._WS_weapons)
# define WEPSET_CONTAINS_ANY_AE(a,e) !!((_WS_##a) & (e)._WS_weapons)
# define WEPSET_CONTAINS_ALL_AE(a,e) !!(((_WS_##a) & (e)._WS_weapons) == (e))
# define WEPSET_COPY_AA(a,b) ((_WS_##a) = (_WS_##b))
# define WEPSET_EQ_AA(a,b) ((_WS_##a) == (_WS_##b))
# define WEPSET_OR_AA(a,b) ((_WS_##a) |= (_WS_##b))
-# define WEPSET_AND_AA(a,b) ((_WS_##a) &= (_WS_##b))
+# define WEPSET_AND_AA(a,b) ((_WS_##a) = (_WS_##a) & (_WS_##b))
# define WEPSET_ANDNOT_AA(a,b) ((_WS_##a) &~= (_WS_##b))
# define WEPSET_CONTAINS_ANY_AA(a,b) !!((_WS_##a) & (_WS_##b))
# define WEPSET_CONTAINS_ALL_AA(a,b) !!(((_WS_##a) & (_WS_##b)) == (_WS_##b))
# define WEPSET_COPY_AW(a,w) ((_WS_##a) = power2of((w) - WEP_FIRST))
# define WEPSET_EQ_AW(a,w) ((_WS_##a) == power2of((w) - WEP_FIRST))
# define WEPSET_OR_AW(a,w) ((_WS_##a) |= power2of((w) - WEP_FIRST))
-# define WEPSET_AND_AW(a,w) ((_WS_##a) &= power2of((w) - WEP_FIRST))
+# define WEPSET_AND_AW(a,w) ((_WS_##a) = (_WS_##a) & power2of((w) - WEP_FIRST))
# define WEPSET_ANDNOT_AW(a,w) ((_WS_##a) &~= power2of((w) - WEP_FIRST))
# define WEPSET_CONTAINS_AW(a,w) !!((_WS_##a) & power2of((w) - WEP_FIRST))
string W_Apply_Weaponreplace(string in)
{
- string newlist;
float n = tokenize_console(in);
string out = "";
+ float i;
for(i = 0; i < n; ++i)
{
string s = argv(i);
else if(r != "0")
out = strcat(out, " ", r);
}
- return substring(out, 1);
+ return substring(out, 1, -1);
}
if (g_lms || g_ca || allguns)
d = (weaponinfo.spawnflags & WEP_FLAG_NORMAL);
- else if(t < -1)
- d = 0;
else if (g_cts)
d = (i == WEP_SHOTGUN);
else if (g_nexball)
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- w = want_weapon("g_start_weapon_", e, FALSE);
+ float w = want_weapon("g_start_weapon_", e, FALSE);
if(w & 1)
WEPSET_OR_AW(start_weapons, i);
if(w & 2)
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
+ float w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
if(w & 1)
WEPSET_OR_AW(warmup_start_weapons, i);
if(w & 2)
// OUT
string modname; // name of the mutator/mod if it warrants showing as such in the server browser
-MUTATOR_HOOKABLE(SetDefaultWeaponreplace);
+MUTATOR_HOOKABLE(SetWeaponreplace);
// IN
entity self; // map entity
entity other; // weapon info
*/
-float autocvar_g_new_toys_autoreplace = 2; // 0 = never, 1 = always, 2 = random
+.string new_toys;
+
+float autocvar_g_new_toys_autoreplace;
+#define NT_AUTOREPLACE_NEVER 0
+#define NT_AUTOREPLACE_ALWAYS 1
+#define NT_AUTOREPLACE_RANDOM 2
MUTATOR_HOOKFUNCTION(nt_SetModname)
{
string nt_GetReplacement(string w, float m)
{
- if(m == 0)
+ if(m == NT_AUTOREPLACE_NEVER)
return w;
string s = nt_GetFullReplacement(w);
if not(s)
return w;
- if(m == 2)
+ if(m == NT_AUTOREPLACE_RANDOM)
s = strcat(w, " ", s);
return s;
}
// map defined replacement:
ret_string = self.new_toys;
}
- else if(autocvar_g_new_toys_autoreplace)
+ else
{
// auto replacement:
ret_string = nt_GetReplacement(other.netname, autocvar_g_new_toys_autoreplace);
}
- else
- {
- ret_string = other.netname;
- }
// apply regular weaponreplace
ret_string = W_Apply_Weaponreplace(ret_string);
mutators/gamemode_freezetag.qc
mutators/gamemode_keepaway.qc
mutators/mutator_invincibleproj.qc
+mutators/mutator_new_toys.qc
mutators/mutator_nix.qc
mutators/mutator_dodging.qc
mutators/mutator_rocketflying.qc
s = W_Apply_Weaponreplace(e.netname);
ret_string = s;
other = e;
- MUTATOR_CALLHOOK(SetDefaultWeaponreplace);
+ MUTATOR_CALLHOOK(SetWeaponreplace);
s = ret_string;
if(s == "")
{
void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); }
void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
-// Rail -> Rifle
-void spawnfunc_weapon_railgun() { spawnfunc_weapon_rifle(); }
-void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); }
+// Rail -> Nex
+void spawnfunc_weapon_railgun() { spawnfunc_weapon_nex(); }
+void spawnfunc_ammo_slugs() { spawnfunc_item_cells(); }
// BFG -> Crylink
void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }
self.minelayer_mines = W_Mine_Count(self);
}
-void spawnfunc_weapon_minelayer (void); // defined in t_items.qc
-
float W_PlacedMines(float detonate)
{
entity mine;