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"
-set g_start_weapon_campingrifle -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_sniperrifle -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_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_balance_laser_primary_gauntlet 0
set g_balance_laser_primary_force_zscale 1
set g_balance_laser_primary_force_velocitybias 0
+set g_balance_laser_primary_force_other_scale 1
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_gauntlet 0
set g_balance_laser_secondary_force_zscale 1
set g_balance_laser_secondary_force_velocitybias 0
+set g_balance_laser_secondary_force_other_scale 1
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 6
set g_balance_uzi_spread_min 0.02
set g_balance_uzi_spread_max 0.6
set g_balance_uzi_spread_add 0.012
+
set g_balance_uzi_burst 0 // # of bullets in a burst (if set to 2 or more)
+set g_balance_uzi_burst_animtime 0.75
set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.75 // refire after burst
set g_balance_uzi_burst_spread 0.04
set g_balance_uzi_burst_damage 18
set g_balance_uzi_burst_force 50
set g_balance_uzi_burst_ammo 3
+
set g_balance_uzi_first 1
set g_balance_uzi_first_damage 30
set g_balance_uzi_first_force 50
set g_balance_uzi_first_spread 0.015
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 1
+
set g_balance_uzi_sustained_damage 15
set g_balance_uzi_sustained_force 27
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_grenadelauncher_bouncefactor 0.5
set g_balance_grenadelauncher_bouncestop 0.075
// }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
set g_balance_minelayer_damage 35
set g_balance_minelayer_edgedamage 30
set g_balance_minelayer_force 250
set g_balance_crylink_primary_animtime 0.3
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.5
+set g_balance_crylink_primary_joindelay 0
set g_balance_crylink_primary_joinspread 0
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_secondary_animtime 0.3
set g_balance_crylink_secondary_ammo 2
set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_hlac_secondary_ammo 10
set g_balance_hlac_secondary_shots 6
// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 60
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 35000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.8
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 35
-set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0.008
-set g_balance_campingrifle_secondary_force 1
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.15
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 0
+set g_balance_sniperrifle_primary_damage 60
+set g_balance_sniperrifle_primary_headshotaddeddamage 100
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 35000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.8
+set g_balance_sniperrifle_primary_animtime 0.3
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 130 // 56.3qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_reload 0
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 35
+set g_balance_sniperrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
+set g_balance_sniperrifle_secondary_spread 0.008
+set g_balance_sniperrifle_secondary_force 1
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 0.15
+set g_balance_sniperrifle_secondary_animtime 0.1
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 130 // 18.3qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
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 0 "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_campingrifle -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_sniperrifle -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_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 0 "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_balance_laser_primary_gauntlet 0
set g_balance_laser_primary_force_zscale 2 // 300 upforce
set g_balance_laser_primary_force_velocitybias 0.3
+set g_balance_laser_primary_force_other_scale 1
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 200 // dps
set g_balance_laser_secondary_edgedamage 0
set g_balance_laser_secondary_gauntlet 1
set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_force_velocitybias 0
+set g_balance_laser_secondary_force_other_scale 1
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 5
set g_balance_uzi_spread_min 0.02
set g_balance_uzi_spread_max 0.6
set g_balance_uzi_spread_add 0.012
+
set g_balance_uzi_burst 0 // # of bullets in a burst (if set to 2 or more)
+set g_balance_uzi_burst_animtime 0.75
set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.75 // refire after burst
set g_balance_uzi_burst_spread 0.04
set g_balance_uzi_burst_damage 18
set g_balance_uzi_burst_force 50
set g_balance_uzi_burst_ammo 3
+
set g_balance_uzi_first 1
set g_balance_uzi_first_damage 26
set g_balance_uzi_first_force -30
set g_balance_uzi_first_spread 0.01
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 1
+
set g_balance_uzi_sustained_damage 17
set g_balance_uzi_sustained_force 27
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 300 // 13.1qu
// }}}
-// {{{ mortar
+// {{{ mortar
set g_balance_grenadelauncher_primary_type 0
set g_balance_grenadelauncher_primary_damage 65
set g_balance_grenadelauncher_primary_edgedamage 35
set g_balance_grenadelauncher_bouncefactor 0.7
set g_balance_grenadelauncher_bouncestop 0.12
// }}}
-// {{{ minelayer
+// {{{ minelayer
set g_balance_minelayer_damage 65
set g_balance_minelayer_edgedamage 30
set g_balance_minelayer_force 250
set g_balance_minelayer_remote_radius 200
set g_balance_minelayer_remote_force 300
// }}}
-// {{{ electro
+// {{{ electro
set g_balance_electro_lightning 0
set g_balance_electro_primary_damage 55
set g_balance_electro_primary_edgedamage 5
set g_balance_crylink_primary_animtime 0.30008
set g_balance_crylink_primary_ammo 3
set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
set g_balance_crylink_primary_joinspread 0
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_secondary_animtime 0.3
set g_balance_crylink_secondary_ammo 3
set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_hagar_secondary_refire 0.15
set g_balance_hagar_secondary_ammo 2
// }}}
-// {{{ rocketlauncher
+// {{{ rocketlauncher
set g_balance_rocketlauncher_damage 65
set g_balance_rocketlauncher_edgedamage 25
set g_balance_rocketlauncher_force 360
set g_balance_hlac_secondary_ammo 11
set g_balance_hlac_secondary_shots 6
// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 75
-set g_balance_campingrifle_primary_headshotaddeddamage 90
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 35000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 40
-set g_balance_campingrifle_secondary_headshotaddeddamage 20
-set g_balance_campingrifle_secondary_spread 0.008
-set g_balance_campingrifle_secondary_force 1
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.0006
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
+set g_balance_sniperrifle_primary_tracer 0
+set g_balance_sniperrifle_primary_damage 75
+set g_balance_sniperrifle_primary_headshotaddeddamage 90
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 35000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.7
+set g_balance_sniperrifle_primary_animtime 0.3
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 130 // 56.3qu
+set g_balance_sniperrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_reload 0
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 40
+set g_balance_sniperrifle_secondary_headshotaddeddamage 20
+set g_balance_sniperrifle_secondary_spread 0.008
+set g_balance_sniperrifle_secondary_force 1
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 0.0006
+set g_balance_sniperrifle_secondary_animtime 0.1
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 130 // 18.3qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
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"
-set g_start_weapon_campingrifle -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_sniperrifle -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_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_balance_health_start 125
+set g_balance_health_start 150
set g_balance_armor_start 0
set g_start_ammo_shells 15
set g_start_ammo_nails 0
set g_pickup_ammo_anyway 1
set g_pickup_weapons_anyway 1
set g_pickup_shells 15
-set g_pickup_shells_weapon 15
-set g_pickup_shells_max 100
-set g_pickup_nails 75
-set g_pickup_nails_weapon 75
-set g_pickup_nails_max 300
+set g_pickup_shells_weapon 30
+set g_pickup_shells_max 90
+set g_pickup_nails 80
+set g_pickup_nails_weapon 160
+set g_pickup_nails_max 320
set g_pickup_rockets 40
-set g_pickup_rockets_weapon 40
+set g_pickup_rockets_weapon 80
set g_pickup_rockets_max 160
set g_pickup_cells 50
-set g_pickup_cells_weapon 50
+set g_pickup_cells_weapon 100
set g_pickup_cells_max 200
-set g_pickup_fuel 25
-set g_pickup_fuel_weapon 25
-set g_pickup_fuel_jetpack 50
+set g_pickup_fuel 50
+set g_pickup_fuel_weapon 50
+set g_pickup_fuel_jetpack 100
set g_pickup_fuel_max 100
set g_pickup_armorsmall 10
set g_pickup_armorsmall_max 200
set g_pickup_armorlarge_max 200
set g_pickup_armorlarge_anyway 1
set g_pickup_healthsmall 10
-set g_pickup_healthsmall_max 200
+set g_pickup_healthsmall_max 250
set g_pickup_healthsmall_anyway 1
set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 200
+set g_pickup_healthmedium_max 250
set g_pickup_healthmedium_anyway 1
set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 200
+set g_pickup_healthlarge_max 250
set g_pickup_healthlarge_anyway 1
set g_pickup_healthmega 100
-set g_pickup_healthmega_max 200
+set g_pickup_healthmega_max 250
set g_pickup_healthmega_anyway 1
set g_pickup_respawntime_short 15
set g_pickup_respawntime_medium 20
set g_pickup_respawntime_long 30
set g_pickup_respawntime_powerup 120
-set g_pickup_respawntime_weapon 15
-set g_pickup_respawntime_ammo 15
+set g_pickup_respawntime_weapon 10
+set g_pickup_respawntime_ammo 10
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
set g_balance_pause_health_regen 5
set g_balance_pause_health_regen_spawn 0
set g_balance_health_rot 0
-set g_balance_health_rotlinear 5
+set g_balance_health_rotlinear 4
set g_balance_pause_health_rot 3
-set g_balance_pause_health_rot_spawn 1
+set g_balance_pause_health_rot_spawn 5
set g_balance_health_regenstable 100
-set g_balance_health_rotstable 100
+set g_balance_health_rotstable 150
set g_balance_health_limit 999
set g_balance_armor_regen 0
set g_balance_armor_regenlinear 0
set g_balance_armor_rot 0
-set g_balance_armor_rotlinear 3
-set g_balance_pause_armor_rot 1
-set g_balance_pause_armor_rot_spawn 1
+set g_balance_armor_rotlinear 2
+set g_balance_pause_armor_rot 3
+set g_balance_pause_armor_rot_spawn 5
set g_balance_armor_regenstable 100
set g_balance_armor_rotstable 100
set g_balance_armor_limit 999
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
set g_projectiles_newton_style_2_minfactor 0.8
set g_projectiles_newton_style_2_maxfactor 1.5
-set g_projectiles_spread_style 0
+set g_projectiles_spread_style 7
// possible values:
// 0: forward + solid sphere (like Quake) - varies velocity
// 1: forward + flattened solid sphere
// 6: forward + circle with 1-r^2 falloff
// 7: forward + circle with (1-r)(2-r) falloff
set g_balance_falldamage_deadminspeed 150
-set g_balance_falldamage_minspeed 1400
-set g_balance_falldamage_factor 0.15
-set g_balance_falldamage_maxdamage 25
+set g_balance_falldamage_minspeed 1000
+set g_balance_falldamage_factor 0.20
+set g_balance_falldamage_maxdamage 15
// }}}
// {{{ powerups
-set g_balance_powerup_invincible_takedamage 0.2
+set g_balance_powerup_invincible_takedamage 0.25 // only 1/4th damage is taken
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 3
// {{{ weapon properties
// {{{ laser
set g_balance_laser_primary_damage 25
-set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 175
+set g_balance_laser_primary_edgedamage 12.5
+set g_balance_laser_primary_force 200
set g_balance_laser_primary_radius 70
-set g_balance_laser_primary_speed 12000
+set g_balance_laser_primary_speed 6000
set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.7
set g_balance_laser_primary_animtime 0.3
set g_balance_laser_primary_gauntlet 0
set g_balance_laser_primary_force_zscale 2 // 350 upforce
set g_balance_laser_primary_force_velocitybias 0.3
+set g_balance_laser_primary_force_other_scale 1
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
-set g_balance_laser_secondary_edgedamage 10
+set g_balance_laser_secondary_edgedamage 12.5
set g_balance_laser_secondary_force 400
set g_balance_laser_secondary_radius 70
set g_balance_laser_secondary_speed 12000
set g_balance_laser_secondary_gauntlet 0
set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_force_velocitybias 0
+set g_balance_laser_secondary_force_other_scale 1
// }}}
// {{{ shotgun
-set g_balance_shotgun_primary_bullets 10
-set g_balance_shotgun_primary_damage 6
+set g_balance_shotgun_primary_bullets 12
+set g_balance_shotgun_primary_damage 5
set g_balance_shotgun_primary_force 15
set g_balance_shotgun_primary_spread 0.11
-set g_balance_shotgun_primary_refire 0.5
+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_secondary 1
set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 60
+set g_balance_shotgun_secondary_melee_range 85
set g_balance_shotgun_secondary_melee_swing 50
set g_balance_shotgun_secondary_melee_time 0.1
set g_balance_shotgun_secondary_damage 115
set g_balance_shotgun_secondary_animtime 1
// }}}
// {{{ uzi
-set g_balance_uzi_mode 0 // Activates varible spread for sustained & burst mode secondary
+set g_balance_uzi_mode 1 // Activates varible spread for sustained & burst mode secondary
set g_balance_uzi_spread_min 0.02
-set g_balance_uzi_spread_max 0.6
+set g_balance_uzi_spread_max 0.1
set g_balance_uzi_spread_add 0.012
-set g_balance_uzi_burst 0 // # of bullets in a burst (if set to 2 or more)
-set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
+
+set g_balance_uzi_burst 3 // # of bullets in a burst (if set to 2 or more)
+set g_balance_uzi_burst_animtime 0.75
+set g_balance_uzi_burst_refire 0.075 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.75 // refire after burst
set g_balance_uzi_burst_spread 0.04
-set g_balance_uzi_burst_damage 18
-set g_balance_uzi_burst_force 50
+set g_balance_uzi_burst_damage 25
+set g_balance_uzi_burst_force 20
set g_balance_uzi_burst_ammo 3
+
set g_balance_uzi_first 1
set g_balance_uzi_first_damage 18
set g_balance_uzi_first_force 20
set g_balance_uzi_first_spread 0.03
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 10
-set g_balance_uzi_sustained_force 10
-set g_balance_uzi_sustained_spread 0.08
+
+set g_balance_uzi_sustained_damage 14
+set g_balance_uzi_sustained_force 20
+set g_balance_uzi_sustained_spread 0.04
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
// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary_type 0
set g_balance_grenadelauncher_primary_damage 50
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
+set g_balance_grenadelauncher_primary_edgedamage 25
+set g_balance_grenadelauncher_primary_force 300
set g_balance_grenadelauncher_primary_radius 140
set g_balance_grenadelauncher_primary_speed 2000
set g_balance_grenadelauncher_primary_speed_up 220
set g_balance_grenadelauncher_secondary_type 1
set g_balance_grenadelauncher_secondary_damage 60
-set g_balance_grenadelauncher_secondary_edgedamage 38
-set g_balance_grenadelauncher_secondary_force 400
+set g_balance_grenadelauncher_secondary_edgedamage 30
+set g_balance_grenadelauncher_secondary_force 300
set g_balance_grenadelauncher_secondary_radius 140
set g_balance_grenadelauncher_secondary_speed 1400
set g_balance_grenadelauncher_secondary_speed_up 150
set g_balance_grenadelauncher_bouncefactor 0.5
set g_balance_grenadelauncher_bouncestop 0.075
// }}}
-// {{{ minelayer // TODO
-set g_balance_minelayer_damage 35
-set g_balance_minelayer_edgedamage 30
+// {{{ 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_remote_radius 200
set g_balance_minelayer_remote_force 300
// }}}
-// {{{ electro // TODO
-set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 90
-set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 425
-set g_balance_electro_primary_force_up 125
-set g_balance_electro_primary_radius 850
-set g_balance_electro_primary_comboradius 75
-set g_balance_electro_primary_speed 0
+// {{{ electro
+set g_balance_electro_lightning 0
+set g_balance_electro_primary_damage 55
+set g_balance_electro_primary_edgedamage 27.5
+set g_balance_electro_primary_force 200
+set g_balance_electro_primary_force_up 0
+set g_balance_electro_primary_radius 100
+set g_balance_electro_primary_comboradius 150
+set g_balance_electro_primary_speed 2500
set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 0
+set g_balance_electro_primary_lifetime 30
set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.03
-set g_balance_electro_primary_ammo 7
-set g_balance_electro_primary_range 800
+set g_balance_electro_primary_animtime 0.1
+set g_balance_electro_primary_ammo 4
+set g_balance_electro_primary_range 0
set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
set g_balance_electro_primary_falloff_maxdist 850
set g_balance_electro_primary_falloff_halflifedist 425
-set g_balance_electro_secondary_damage 25
-set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 100
-set g_balance_electro_secondary_radius 100
+set g_balance_electro_secondary_damage 45
+set g_balance_electro_secondary_edgedamage 22.5
+set g_balance_electro_secondary_force 200
+set g_balance_electro_secondary_radius 150
set g_balance_electro_secondary_speed 900
set g_balance_electro_secondary_speed_up 200
set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0.08
+set g_balance_electro_secondary_spread 0.05
set g_balance_electro_secondary_lifetime 2.5
set g_balance_electro_secondary_refire 0.2
set g_balance_electro_secondary_refire2 1
set g_balance_electro_secondary_count 3
set g_balance_electro_secondary_bouncefactor 0.5
set g_balance_electro_secondary_bouncestop 0.075
-set g_balance_electro_combo_damage 50
-set g_balance_electro_combo_edgedamage 0
+set g_balance_electro_combo_damage 40
+set g_balance_electro_combo_edgedamage 20
set g_balance_electro_combo_force 200
set g_balance_electro_combo_radius 250
set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 400
+set g_balance_electro_combo_speed 2000
// }}}
// {{{ crylink
set g_balance_crylink_primary_damage 10
-set g_balance_crylink_primary_edgedamage 0
+set g_balance_crylink_primary_edgedamage 5
set g_balance_crylink_primary_force -55
-set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 3000
-set g_balance_crylink_primary_spread 0.05
-set g_balance_crylink_primary_shots 4
+set g_balance_crylink_primary_radius 80
+set g_balance_crylink_primary_speed 1800
+set g_balance_crylink_primary_spread 0.075
+set g_balance_crylink_primary_shots 7
set g_balance_crylink_primary_bounces 1
-set g_balance_crylink_primary_refire 0.4
+set g_balance_crylink_primary_refire 0.5
set g_balance_crylink_primary_animtime 0.3
-set g_balance_crylink_primary_ammo 2
+set g_balance_crylink_primary_ammo 4
set g_balance_crylink_primary_bouncedamagefactor 0.5
-set g_balance_crylink_primary_joinspread 0
+set g_balance_crylink_primary_joindelay 0
+set g_balance_crylink_primary_joinspread 0.4
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 0
-set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_damage 50
set g_balance_crylink_primary_joinexplode_edgedamage 0
-set g_balance_crylink_primary_joinexplode_radius 0
-set g_balance_crylink_primary_joinexplode_force 0
+set g_balance_crylink_primary_joinexplode_radius 200
+set g_balance_crylink_primary_joinexplode_force 300
set g_balance_crylink_primary_linkexplode 1
set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_primary_other_fadetime 5
set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 8
-set g_balance_crylink_secondary_edgedamage 0
+set g_balance_crylink_secondary_damage 5
+set g_balance_crylink_secondary_edgedamage 2.5
set g_balance_crylink_secondary_force -40
-set g_balance_crylink_secondary_radius 10
-set g_balance_crylink_secondary_speed 9000
+set g_balance_crylink_secondary_radius 30
+set g_balance_crylink_secondary_speed 1700
set g_balance_crylink_secondary_spread 0.03
set g_balance_crylink_secondary_shots 3
set g_balance_crylink_secondary_bounces 0
set g_balance_crylink_secondary_animtime 0.2
set g_balance_crylink_secondary_ammo 2
set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_nex_charge 1
set g_balance_nex_charge_mindmg 40
set g_balance_nex_charge_start 0
-set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_rate 0.2
set g_balance_nex_charge_limit 0.5
set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
set g_balance_nex_charge_shot_multiplier 0.25
-set g_balance_nex_charge_velocity_rate 0.2
+set g_balance_nex_charge_velocity_rate 0.3
set g_balance_nex_charge_minspeed 400
-set g_balance_nex_charge_maxspeed 1000
+set g_balance_nex_charge_maxspeed 800
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1
// }}}
// {{{ hagar
set g_balance_hagar_primary_damage 30
-set g_balance_hagar_primary_edgedamage 0
+set g_balance_hagar_primary_edgedamage 15
set g_balance_hagar_primary_force 50
set g_balance_hagar_primary_radius 70
set g_balance_hagar_primary_spread 0.08
set g_balance_hagar_primary_refire 0.15
set g_balance_hagar_primary_ammo 1
set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 37
-set g_balance_hagar_secondary_edgedamage 15
+set g_balance_hagar_secondary_damage 35
+set g_balance_hagar_secondary_edgedamage 17.5
set g_balance_hagar_secondary_force 100
set g_balance_hagar_secondary_radius 65
set g_balance_hagar_secondary_spread 0.015
// {{{ rocketlauncher
set g_balance_rocketlauncher_damage 80
set g_balance_rocketlauncher_edgedamage 40
-set g_balance_rocketlauncher_force 600
+set g_balance_rocketlauncher_force 400
set g_balance_rocketlauncher_radius 100
set g_balance_rocketlauncher_speed 1600
set g_balance_rocketlauncher_speedaccel 1600
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
set g_balance_rocketlauncher_remote_damage 70
-set g_balance_rocketlauncher_remote_edgedamage 30
+set g_balance_rocketlauncher_remote_edgedamage 35
set g_balance_rocketlauncher_remote_radius 100
-set g_balance_rocketlauncher_remote_force 500
+set g_balance_rocketlauncher_remote_force 400
// }}}
// {{{ porto
set g_balance_porto_primary_refire 1.5
set g_balance_hlac_primary_spread_add 0.0045
set g_balance_hlac_primary_spread_crouchmod 0.25
-set g_balance_hlac_primary_damage 23
+set g_balance_hlac_primary_damage 20
set g_balance_hlac_primary_edgedamage 10
set g_balance_hlac_primary_force 100
set g_balance_hlac_primary_radius 70
-set g_balance_hlac_primary_speed 9000
+set g_balance_hlac_primary_speed 12000
set g_balance_hlac_primary_lifetime 5
-set g_balance_hlac_primary_refire 0.1
+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_spread 0.15
set g_balance_hlac_secondary_spread_crouchmod 0.5
-set g_balance_hlac_secondary_damage 23
+set g_balance_hlac_secondary_damage 20
set g_balance_hlac_secondary_edgedamage 10
set g_balance_hlac_secondary_force 100
set g_balance_hlac_secondary_radius 70
set g_balance_hlac_secondary_ammo 10
set g_balance_hlac_secondary_shots 6
// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 65
-set g_balance_campingrifle_primary_headshotaddeddamage 75
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.75
-set g_balance_campingrifle_primary_animtime 0.3
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0
-set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.1
-set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8 // make it pretty much useless in close combat
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 1
+set g_balance_sniperrifle_primary_damage 50
+set g_balance_sniperrifle_primary_headshotaddeddamage 70
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 100
+set g_balance_sniperrifle_primary_speed 40000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 1
+set g_balance_sniperrifle_primary_animtime 0.5
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_reload 0
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 25
+set g_balance_sniperrifle_secondary_headshotaddeddamage 35
+set g_balance_sniperrifle_secondary_spread 0.01
+set g_balance_sniperrifle_secondary_force 50
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 0.6
+set g_balance_sniperrifle_secondary_animtime 0.3
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
set g_balance_fireball_secondary_spread 0
// }}}
// {{{ seeker
-set g_balance_seeker_flac_ammo 0.5
+set g_balance_seeker_flac_ammo 1
set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
+set g_balance_seeker_flac_damage 20
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_lifetime 30
+set g_balance_seeker_flac_lifetime_rand 0
+set g_balance_seeker_flac_radius 70
+set g_balance_seeker_flac_refire 0.2
set g_balance_seeker_flac_speed 3000
-set g_balance_seeker_flac_speed_up 1000
+set g_balance_seeker_flac_speed_up 0
set g_balance_seeker_flac_speed_z 0
-set g_balance_seeker_flac_spread 0.4
+set g_balance_seeker_flac_spread 0.05
set g_balance_seeker_missile_accel 3000
set g_balance_seeker_missile_ammo 2
set g_balance_seeker_missile_animtime 0.3
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"
-set g_start_weapon_campingrifle -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_sniperrifle -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_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"
// {{{ misc
set g_balance_selfdamagepercent 0.65
-set g_balance_weaponswitchdelay 0.1
+set g_balance_weaponswitchdelay 0.15
set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
set g_weaponratefactor 1 "weapon fire rate multiplier"
set g_weapondamagefactor 1 "weapon damage multiplier"
// }}}
// {{{ powerups
-set g_balance_powerup_invincible_takedamage 0.3
+set g_balance_powerup_invincible_takedamage 0.6
set g_balance_powerup_invincible_time 30
set g_balance_powerup_strength_damage 3
set g_balance_powerup_strength_force 4
set g_balance_laser_primary_speed 5000
set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.6
-set g_balance_laser_primary_animtime 0.6
+set g_balance_laser_primary_animtime 0.4
set g_balance_laser_primary_lifetime 5
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
set g_balance_laser_primary_force_zscale 2 // 300 upforce
set g_balance_laser_primary_force_velocitybias 0.3
+set g_balance_laser_primary_force_other_scale 2.5 // force 375 when pushing others around
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 200 // dps
set g_balance_laser_secondary_edgedamage 0
set g_balance_laser_secondary_gauntlet 1
set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_force_velocitybias 0
+set g_balance_laser_secondary_force_other_scale 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 18
set g_balance_shotgun_primary_force 20
set g_balance_shotgun_primary_spread 0.18
set g_balance_shotgun_primary_refire 1
-set g_balance_shotgun_primary_animtime 0.4
+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_uzi_spread_add 0.008
set g_balance_uzi_burst 3 // # of bullets in a burst (if set to 2 or more)
+set g_balance_uzi_burst_animtime 0.45
set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.45 // refire after burst
-set g_balance_uzi_burst_spread 0.05
-set g_balance_uzi_burst_damage 20 // 100 dps, delivered in 0.15s
+set g_balance_uzi_burst_spread 0.07
+set g_balance_uzi_burst_damage 25
set g_balance_uzi_burst_force 50
set g_balance_uzi_burst_ammo 3
set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 20 // 100 dps
+set g_balance_uzi_first_damage 22
set g_balance_uzi_first_force 50
set g_balance_uzi_first_spread 0.03
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_sustained_damage 12 // 120 dps
set g_balance_uzi_sustained_force 12
-set g_balance_uzi_sustained_spread 0.08
+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_grenadelauncher_primary_lifetime 5
set g_balance_grenadelauncher_primary_lifetime2 0.65
set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.4
+set g_balance_grenadelauncher_primary_animtime 0.3
set g_balance_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 80
set g_balance_grenadelauncher_primary_damageforcescale 0
set g_balance_grenadelauncher_secondary_lifetime 3
set g_balance_grenadelauncher_secondary_lifetime2 0.65
set g_balance_grenadelauncher_secondary_refire 0.8
-set g_balance_grenadelauncher_secondary_animtime 0.4
+set g_balance_grenadelauncher_secondary_animtime 0.3
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 40
set g_balance_grenadelauncher_secondary_damageforcescale 0
set g_balance_minelayer_speed 750
set g_balance_minelayer_lifetime 60
set g_balance_minelayer_refire 1.5
-set g_balance_minelayer_animtime 0.4
+set g_balance_minelayer_animtime 0.3
set g_balance_minelayer_ammo 5
set g_balance_minelayer_health 15
set g_balance_minelayer_limit 4 // 0 disables the limit
// }}}
// {{{ electro
set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 92
+set g_balance_electro_primary_damage 100
set g_balance_electro_primary_edgedamage 0
set g_balance_electro_primary_force 425
set g_balance_electro_primary_force_up 125
set g_balance_electro_primary_radius 850
-set g_balance_electro_primary_comboradius 75
+set g_balance_electro_primary_comboradius 150
set g_balance_electro_primary_speed 0
set g_balance_electro_primary_spread 0
set g_balance_electro_primary_lifetime 0
set g_balance_electro_primary_refire 0.4
-set g_balance_electro_primary_animtime 0.03333333
+set g_balance_electro_primary_animtime 0.2
set g_balance_electro_primary_ammo 5
set g_balance_electro_primary_range 800
set g_balance_electro_primary_falloff_mindist 0
set g_balance_crylink_primary_shots 7
set g_balance_crylink_primary_bounces 2
set g_balance_crylink_primary_refire 0.8
-set g_balance_crylink_primary_animtime 0.4
+set g_balance_crylink_primary_animtime 0.3
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
set g_balance_crylink_primary_joinspread 0.2
set g_balance_crylink_primary_jointime 0.1
set g_balance_crylink_primary_joinexplode 0
set g_balance_crylink_primary_other_fadetime 0.25
set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 3
-set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -20
-set g_balance_crylink_secondary_radius 5
-set g_balance_crylink_secondary_speed 1700
-set g_balance_crylink_secondary_spread 0.03
-set g_balance_crylink_secondary_shots 3
-set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.15
-set g_balance_crylink_secondary_animtime 0.15
-set g_balance_crylink_secondary_ammo 1
-set g_balance_crylink_secondary_bouncedamagefactor 0.5
-set g_balance_crylink_secondary_joinspread 0
-set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_damage 8
+set g_balance_crylink_secondary_edgedamage 3
+set g_balance_crylink_secondary_force 20
+set g_balance_crylink_secondary_radius 20
+set g_balance_crylink_secondary_speed 1500
+set g_balance_crylink_secondary_spread 0.1
+set g_balance_crylink_secondary_shots 6
+set g_balance_crylink_secondary_bounces 2
+set g_balance_crylink_secondary_refire 0.8
+set g_balance_crylink_secondary_animtime 0.3
+set g_balance_crylink_secondary_ammo 2
+set g_balance_crylink_secondary_bouncedamagefactor 0.2
+set g_balance_crylink_secondary_joindelay 0
+set g_balance_crylink_secondary_joinspread 0.2
+set g_balance_crylink_secondary_jointime 0.1
set g_balance_crylink_secondary_joinexplode 0
set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_crylink_secondary_joinexplode_edgedamage 0
set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
set g_balance_crylink_secondary_middle_fadetime 5
set g_balance_crylink_secondary_line_lifetime 2 // range: 4000 full, fades to 8000
-set g_balance_crylink_secondary_line_fadetime 2
+set g_balance_crylink_secondary_line_fadetime 0.25
// }}}
// {{{ nex
set g_balance_nex_primary_damage 90
set g_balance_nex_primary_force 500
set g_balance_nex_primary_refire 1
-set g_balance_nex_primary_animtime 0.4
+set g_balance_nex_primary_animtime 0.3
set g_balance_nex_primary_ammo 5
set g_balance_nex_primary_damagefalloff_mindist 0
set g_balance_nex_primary_damagefalloff_maxdist 0
set g_balance_nex_secondary_charge 1
set g_balance_nex_secondary_charge_rate 0.4
set g_balance_nex_secondary_chargepool 1
-set g_balance_nex_secondary_chargepool_regen 0.15
-set g_balance_nex_secondary_chargepool_pause_regen 1
-set g_balance_nex_secondary_chargepool_pause_health_regen 1
+set g_balance_nex_secondary_chargepool_regen 0.25
+set g_balance_nex_secondary_chargepool_pause_regen 2
+set g_balance_nex_secondary_chargepool_pause_health_regen 0.5
set g_balance_nex_secondary_damage 0
set g_balance_nex_secondary_force 0
set g_balance_nex_secondary_refire 0
set g_balance_nex_secondary_animtime 0
-set g_balance_nex_secondary_ammo 0.2 // full charge pool is 1, so it depletes in 5 secs
+set g_balance_nex_secondary_ammo 0.4 // full charge pool is 1, so it depletes in 2.5 secs
set g_balance_nex_secondary_damagefalloff_mindist 0
set g_balance_nex_secondary_damagefalloff_maxdist 0
set g_balance_nex_secondary_damagefalloff_halflife 0
set g_balance_nex_charge_rate 0.5
set g_balance_nex_charge_limit 0.5
set g_balance_nex_charge_rot_rate 0.1
-set g_balance_nex_charge_rot_pause 1 // Dont rot down until this long after release of charge button
+set g_balance_nex_charge_rot_pause 0.5 // Dont rot down until this long after release of charge button
set g_balance_nex_charge_shot_multiplier 0
set g_balance_nex_charge_velocity_rate 0
set g_balance_nex_charge_minspeed 600
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.75
+set g_balance_minstanex_animtime 0.50
set g_balance_minstanex_ammo 10
// }}}
// {{{ hagar
set g_balance_hagar_primary_damage 14
set g_balance_hagar_primary_edgedamage 6
set g_balance_hagar_primary_force 70
-set g_balance_hagar_primary_radius 115
+set g_balance_hagar_primary_radius 110
set g_balance_hagar_primary_spread 0.1
set g_balance_hagar_primary_speed 1800
set g_balance_hagar_primary_lifetime 5
set g_balance_rocketlauncher_speedstart 800
set g_balance_rocketlauncher_lifetime 5
set g_balance_rocketlauncher_refire 1
-set g_balance_rocketlauncher_animtime 0.4
+set g_balance_rocketlauncher_animtime 0.3
set g_balance_rocketlauncher_ammo 3
set g_balance_rocketlauncher_health 0
set g_balance_rocketlauncher_damageforcescale 0
// }}}
// {{{ porto
set g_balance_porto_primary_refire 1.5
-set g_balance_porto_primary_animtime 0.3
+set g_balance_porto_primary_animtime 0.2
set g_balance_porto_primary_speed 2000
set g_balance_porto_primary_lifetime 5
set g_balance_portal_health 200 // these get recharged whenever the portal is used
// {{{ hook
set g_balance_hook_primary_fuel 5 // hook monkeys set 0
set g_balance_hook_primary_refire 0 // hook monkeys set 0
-set g_balance_hook_primary_animtime 0.3 // good shoot anim
+set g_balance_hook_primary_animtime 0.2 // good shoot anim
set g_balance_hook_primary_hooked_time_max 0 // infinite
set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
set g_balance_hook_secondary_speed 0 // not much throwing
set g_balance_hook_secondary_gravity 5 // fast falling
set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
-set g_balance_hook_secondary_animtime 0.3 // good shoot anim
+set g_balance_hook_secondary_animtime 0.2 // good shoot anim
set g_balance_hook_secondary_power 3 // effect behaves like a square function
set g_balance_hook_secondary_duration 1.5 // effect runs for three seconds
// }}}
set g_balance_hlac_primary_lifetime 5
set g_balance_hlac_primary_refire 0.1
-set g_balance_hlac_primary_animtime 0.3
+set g_balance_hlac_primary_animtime 0.2
set g_balance_hlac_primary_ammo 1
set g_balance_hlac_secondary 1
set g_balance_hlac_secondary_lifetime 5
set g_balance_hlac_secondary_refire 0.8
-set g_balance_hlac_secondary_animtime 0.6
+set g_balance_hlac_secondary_animtime 0.4
set g_balance_hlac_secondary_ammo 4
set g_balance_hlac_secondary_shots 6
// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 60
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 1.5
-set g_balance_campingrifle_primary_animtime 1.4
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 42
-set g_balance_campingrifle_secondary_headshotaddeddamage 70
-set g_balance_campingrifle_secondary_spread 0
-set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 1.5
-set g_balance_campingrifle_secondary_animtime 1.4
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8 // make it pretty much useless in close combat
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 1
+set g_balance_sniperrifle_primary_damage 60
+set g_balance_sniperrifle_primary_headshotaddeddamage 60
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 40000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 1.5
+set g_balance_sniperrifle_primary_animtime 1.4
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_reload 1
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 42
+set g_balance_sniperrifle_secondary_headshotaddeddamage 42
+set g_balance_sniperrifle_secondary_spread 0
+set g_balance_sniperrifle_secondary_force 2
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 1.5
+set g_balance_sniperrifle_secondary_animtime 1.4
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
// }}}
// {{{ fireball
set g_balance_fireball_primary_ammo 40
-set g_balance_fireball_primary_animtime 0.15
+set g_balance_fireball_primary_animtime 0.2
set g_balance_fireball_primary_bfgdamage 100
set g_balance_fireball_primary_bfgforce 0
set g_balance_fireball_primary_bfgradius 1000
set g_balance_fireball_primary_speed 650
set g_balance_fireball_primary_spread 0
set g_balance_fireball_secondary_ammo 5
-set g_balance_fireball_secondary_animtime 0.3
+set g_balance_fireball_secondary_animtime 0.2
set g_balance_fireball_secondary_damage 40
set g_balance_fireball_secondary_damageforcescale 4
set g_balance_fireball_secondary_damagetime 5
set g_balance_seeker_flac_spread 0.4
set g_balance_seeker_missile_accel 1400
set g_balance_seeker_missile_ammo 2
-set g_balance_seeker_missile_animtime 0.3
+set g_balance_seeker_missile_animtime 0.2
set g_balance_seeker_missile_count 8
set g_balance_seeker_missile_damage 15
set g_balance_seeker_missile_damageforcescale 4
set g_balance_seeker_missile_spread 0
set g_balance_seeker_missile_turnrate 0.65
set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.3
+set g_balance_seeker_tag_animtime 0.2
set g_balance_seeker_tag_damageforcescale 4
set g_balance_seeker_tag_health 5
set g_balance_seeker_tag_lifetime 15
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"
-set g_start_weapon_campingrifle -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_sniperrifle -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_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"
// {{{ pickup items
set g_pickup_ammo_anyway 1
set g_pickup_weapons_anyway 1
-
set g_pickup_shells 20
set g_pickup_shells_weapon 10
set g_pickup_shells_max 50
-
set g_pickup_nails 60
set g_pickup_nails_weapon 60
set g_pickup_nails_max 300
-
set g_pickup_rockets 25
set g_pickup_rockets_weapon 15
set g_pickup_rockets_max 150
-
set g_pickup_cells 30
set g_pickup_cells_weapon 20
set g_pickup_cells_max 300
-
set g_pickup_fuel 25
set g_pickup_fuel_weapon 15
set g_pickup_fuel_jetpack 50
set g_pickup_fuel_max 999
-
set g_pickup_armorsmall 5
set g_pickup_armorsmall_max 999
set g_pickup_armorsmall_anyway 0
-
set g_pickup_armormedium 25
set g_pickup_armormedium_max 100
set g_pickup_armormedium_anyway 0
-
set g_pickup_armorbig 50
set g_pickup_armorbig_max 150
set g_pickup_armorbig_anyway 0
-
set g_pickup_armorlarge 100
set g_pickup_armorlarge_max 999
set g_pickup_armorlarge_anyway 0
-
set g_pickup_healthsmall 5
set g_pickup_healthsmall_max 999
set g_pickup_healthsmall_anyway 0
-
set g_pickup_healthmedium 25
set g_pickup_healthmedium_max 100
set g_pickup_healthmedium_anyway 0
-
set g_pickup_healthlarge 50
set g_pickup_healthlarge_max 150
set g_pickup_healthlarge_anyway 0
-
set g_pickup_healthmega 100
set g_pickup_healthmega_max 999
set g_pickup_healthmega_anyway 0
-
set g_pickup_respawntime_short 15
set g_pickup_respawntime_medium 20
set g_pickup_respawntime_long 30
set g_pickup_respawntime_powerup 120
set g_pickup_respawntime_weapon 20
set g_pickup_respawntime_ammo 15
-
set g_pickup_respawntimejitter_short 0
set g_pickup_respawntimejitter_medium 0
set g_pickup_respawntimejitter_long 0
set g_balance_laser_primary_gauntlet 0
set g_balance_laser_primary_force_zscale 1.2
set g_balance_laser_primary_force_velocitybias 0
+set g_balance_laser_primary_force_other_scale 1
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_gauntlet 0
set g_balance_laser_secondary_force_zscale 1
set g_balance_laser_secondary_force_velocitybias 0
+set g_balance_laser_secondary_force_other_scale 1
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 10
set g_balance_shotgun_secondary_refire 1.1
set g_balance_shotgun_secondary_animtime 1
// }}}
-
// {{{ uzi
set g_balance_uzi_mode 1 // Activates varible spread for sustained & burst mode secondary
set g_balance_uzi_spread_min 0.02
set g_balance_uzi_spread_add 0.008
set g_balance_uzi_burst 3 // # of bullets in a burst (if set to 2 or more)
+set g_balance_uzi_burst_animtime 0.4
set g_balance_uzi_burst_refire 0.05 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.4 // refire after burst
set g_balance_uzi_burst_spread 0.03
set g_balance_grenadelauncher_bouncefactor 0.5
set g_balance_grenadelauncher_bouncestop 0.075
// }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
set g_balance_minelayer_damage 35
set g_balance_minelayer_edgedamage 30
set g_balance_minelayer_force 250
set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
set g_balance_electro_primary_falloff_maxdist 850
set g_balance_electro_primary_falloff_halflifedist 425
-
set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_edgedamage 0
set g_balance_electro_secondary_force 50
set g_balance_electro_secondary_count 3
set g_balance_electro_secondary_bouncefactor 0.5
set g_balance_electro_secondary_bouncestop 0.075
-
set g_balance_electro_combo_damage 80
set g_balance_electro_combo_edgedamage 10
set g_balance_electro_combo_force 150
set g_balance_crylink_primary_animtime 0.4
set g_balance_crylink_primary_ammo 2
set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
set g_balance_crylink_primary_joinspread 0.1
set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 1 //if != 0 do a extra damage pass when projectiles join
set g_balance_crylink_primary_joinexplode_radius 200
set g_balance_crylink_primary_joinexplode_force 400
set g_balance_crylink_primary_linkexplode 0
+
set g_balance_crylink_primary_middle_lifetime 5
set g_balance_crylink_primary_middle_fadetime 0.25
set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
set g_balance_crylink_secondary_animtime 0.15
set g_balance_crylink_secondary_ammo 1
set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
set g_balance_crylink_secondary_joinspread 0
set g_balance_crylink_secondary_jointime 0
set g_balance_crylink_secondary_joinexplode 0
set g_balance_hagar_secondary_refire 0.15
set g_balance_hagar_secondary_ammo 1
// }}}
-// {{{ rocketlauncher // TODO
+// {{{ rocketlauncher
set g_balance_rocketlauncher_damage 120
set g_balance_rocketlauncher_edgedamage 25
set g_balance_rocketlauncher_force 350
set g_balance_hlac_secondary_radius 50
set g_balance_hlac_secondary_speed 15000
set g_balance_hlac_secondary_lifetime 3
+
set g_balance_hlac_secondary_refire 1
set g_balance_hlac_secondary_animtime 0.7
set g_balance_hlac_secondary_ammo 10
set g_balance_hlac_secondary_shots 6
// }}}
-// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
-set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_on_switch 0
-set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 40
-set g_balance_campingrifle_primary_headshotaddeddamage 100
-set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 2
-set g_balance_campingrifle_primary_speed 40000
-set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.65
-set g_balance_campingrifle_primary_animtime 0.6
-set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
-set g_balance_campingrifle_primary_burstcost 0
-set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
-set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0
-set g_balance_campingrifle_secondary_force 2
-set g_balance_campingrifle_secondary_speed 20000
-set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 1.5
-set g_balance_campingrifle_secondary_animtime 0.6
-set g_balance_campingrifle_secondary_ammo 10
-set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
-set g_balance_campingrifle_secondary_burstcost 0
-set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
+// {{{ sniperrifle
+set g_balance_sniperrifle_magazinecapacity 8 // make it pretty much useless in close combat
+set g_balance_sniperrifle_reloadtime 2 // matches reload anim
+set g_balance_sniperrifle_auto_reload_on_switch 0
+set g_balance_sniperrifle_bursttime 0
+set g_balance_sniperrifle_primary_tracer 1
+set g_balance_sniperrifle_primary_damage 40
+set g_balance_sniperrifle_primary_headshotaddeddamage 100
+set g_balance_sniperrifle_primary_spread 0
+set g_balance_sniperrifle_primary_force 2
+set g_balance_sniperrifle_primary_speed 40000
+set g_balance_sniperrifle_primary_lifetime 5
+set g_balance_sniperrifle_primary_refire 0.65
+set g_balance_sniperrifle_primary_animtime 0.6
+set g_balance_sniperrifle_primary_ammo 10
+set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_sniperrifle_primary_burstcost 0
+set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
+set g_balance_sniperrifle_secondary 1
+set g_balance_sniperrifle_secondary_reload 0
+set g_balance_sniperrifle_secondary_tracer 0
+set g_balance_sniperrifle_secondary_damage 50
+set g_balance_sniperrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_sniperrifle_secondary_spread 0
+set g_balance_sniperrifle_secondary_force 2
+set g_balance_sniperrifle_secondary_speed 20000
+set g_balance_sniperrifle_secondary_lifetime 5
+set g_balance_sniperrifle_secondary_refire 1.5
+set g_balance_sniperrifle_secondary_animtime 0.6
+set g_balance_sniperrifle_secondary_ammo 10
+set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_sniperrifle_secondary_burstcost 0
+set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot
// }}}
// {{{ tuba
set g_balance_tuba_refire 0.05
set g_balance_seeker_flac_speed_up 500
set g_balance_seeker_flac_speed_z 0
set g_balance_seeker_flac_spread 0.25
-
set g_balance_seeker_missile_accel 1400
set g_balance_seeker_missile_ammo 2
set g_balance_seeker_missile_animtime 0.3
set g_balance_seeker_missile_speed_max 1400
set g_balance_seeker_missile_spread 0
set g_balance_seeker_missile_turnrate 0.65
-
set g_balance_seeker_tag_ammo 1
set g_balance_seeker_tag_animtime 0.3
set g_balance_seeker_tag_damageforcescale 4
set g_weaponreplace_minstanex ""
set g_weaponreplace_hook ""
set g_weaponreplace_hlac 0 // Maybe will be enabled later after I figure out what I want to do with it
-set g_weaponreplace_campingrifle ""
+set g_weaponreplace_sniperrifle ""
set g_weaponreplace_tuba ""
set g_weaponreplace_fireball 0 // Same with this
set g_weaponreplace_seeker 0 // Same with this
// players
sv_fbskin_green // visible playermodel forced on everyone
+set teamplay_mode 2 // friendly fire and self damage
//================
// impure changes
// match rules
set timelimit_overtimes 1 // overtimes on, draw matches are less interesting! :)
set g_forced_respawn 1 // no delaying/cheating a match by not spawning
-set g_mirrordamage 0 // hurting teammates does not hurt you...
-set g_friendlyfire 1 // ...it hurts them.
// info
set sv_fragmessage_information_stats 0 // don't reveal how much health/armor the attacker had
seta crosshair_seeker_color "1 0.35 0.35" "crosshair color to display when wielding the TAG seeker"
seta crosshair_seeker_alpha 0.9 "crosshair alpha value to display when wielding the TAG seeker"
seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
-seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
-seta crosshair_campingrifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the campingrifle"
-seta crosshair_campingrifle_alpha 1 "crosshair alpha value to display when wielding the campingrifle"
-seta crosshair_campingrifle_size 0.65 "crosshair size when wielding the campingrifle"
+seta crosshair_sniperrifle "" "crosshair to display when wielding the sniperrifle"
+seta crosshair_sniperrifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the sniperrifle"
+seta crosshair_sniperrifle_alpha 1 "crosshair alpha value to display when wielding the sniperrifle"
+seta crosshair_sniperrifle_size 0.65 "crosshair size when wielding the sniperrifle"
seta crosshair_tuba "" "crosshair to display when wielding the tuba"
seta crosshair_tuba_color "0.85 0.5 0.25" "crosshair color to display when wielding the tuba"
seta crosshair_tuba_alpha 1 "crosshair alpha value to display when wielding the tuba"
seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
seta crosshair_ring_alpha 0.2 "ring alpha"
-seta crosshair_ring_campingrifle_alpha 0.15
+seta crosshair_ring_sniperrifle_alpha 0.15
seta crosshair_ring_nex_outer_alpha 0.15
seta crosshair_ring_nex_inner_alpha 0.15
seta skill_auto 0 "when 1, \"skill\" gets adjusted to match the best player on the map"
// general bot AI cvars
set bot_ai_thinkinterval 0.05
-set bot_ai_strategyinterval 3 "How often a new objective is chosen"
-set bot_ai_enemydetectioninterval 0.5 "How often bots pick a new target"
+set bot_ai_strategyinterval 5 "How often a new objective is chosen"
+set bot_ai_enemydetectioninterval 3 "How often bots pick a new target"
set bot_ai_enemydetectionradius 10000 "How far bots can see enemies"
-set bot_ai_dodgeupdateinterval 0.1 "How often scan for items to dodge. Currently not in use."
-set bot_ai_chooseweaponinterval 0.3 "How often the best weapon according to the situation will be chosen"
-set bot_ai_dangerdetectioninterval 0.1 "How often scan for waypoints with dangers near"
+set bot_ai_dodgeupdateinterval 0.2 "How often scan for items to dodge. Currently not in use."
+set bot_ai_chooseweaponinterval 0.5 "How often the best weapon according to the situation will be chosen"
+set bot_ai_dangerdetectioninterval 0.25 "How often scan for waypoints with dangers near"
set bot_ai_dangerdetectionupdates 64 "How many waypoints will be considered for danger detection"
set bot_ai_aimskill_blendrate 2 "How much correction will be applied to the aiming angle"
set bot_ai_aimskill_fixedrate 15
-set bot_ai_aimskill_firetolerance_distdegrees 180
+set bot_ai_aimskill_firetolerance_distdegrees 100
set bot_ai_aimskill_firetolerance_mindegrees 2 "Minimum angle tolerance. Used on large distances"
set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far "minstanex nex campingrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi campingrifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro campingrifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority"
+set bot_ai_custom_weapon_priority_far "minstanex nex sniperrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi sniperrifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro sniperrifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority"
set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
-set bot_ai_weapon_combo_threshold 0.3 "Try to make a combo N seconds after the last attack"
+set bot_ai_weapon_combo_threshold 0.4 "Try to make a combo N seconds after the last attack"
set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
set bot_ai_ignoregoal_timeout 3 "Ignore goals making bots to get stuck in front of a wall for N seconds"
set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this value will perform the \"bunnyhop\" technique"
-set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance"
-set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal"
-set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"
+set bot_ai_bunnyhop_startdistance 100 "Run to goals located further than this distance"
+set bot_ai_bunnyhop_stopdistance 125 "Stop jumping after reaching this distance to the goal"
+set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
set bot_god 0 "god mode for bots"
set bot_ai_navigation_jetpack 0 "Enable bots to navigat maps using the jetpack"
set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
pausable 0
seta g_spawnshieldtime 1.000000 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
seta g_antilag 2 "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
+set g_trueaim_minrange 44 "TrueAim minimum range (TrueAim adjusts shots so they hit the crosshair point even though the gun is not at the screen center)"
set g_antilag_nudge 0 "don't touch"
set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
set g_shootfromclient 1 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed, and defaulted to, too; see also cl_gunalign"
seta g_freezetag_warmup 5 "Time players get to run around before the round starts"
seta g_freezetag_point_limit -1 "Freeze Tag point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
seta g_freezetag_point_leadlimit -1 "Freeze Tag point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_freezetag_revive_time 2.5 "Time it takes to revive a frozen teammate"
+seta g_freezetag_revive_speed 0.4 "Speed for reviving a frozen teammate"
+seta g_freezetag_revive_clearspeed 1.6 "Speed at which reviving progress gets lost when out of range"
seta g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
seta g_freezetag_frozen_force 0.6 "How much to multiply the force on a frozen player with"
set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
seta teamplay_mode 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
-seta g_mirrordamage 0.300000 "for teamplay 4: mirror damage factor"
-seta g_friendlyfire 0.100000 "for teamplay 4: fiendly fire factor"
-seta g_teamdamage_threshold 50 "for teamplay 4: threshold over which to apply mirror damage"
-seta g_teamdamage_resetspeed 30 "for teamplay 4: how fast player's teamdamage count decreases"
+seta g_mirrordamage 0.700000 "for teamplay 4: mirror damage factor"
+seta g_mirrordamage_virtual 1 "for teamplay 4: do not actually apply mirror damage, just show graphics effect for it"
+seta g_friendlyfire 0.500000 "for teamplay 4: fiendly fire factor"
+seta g_friendlyfire_virtual 1 "for teamplay 4: do not actually apply friendly fire, just show graphics effect for it"
+seta g_friendlyfire_virtual_force 1 "for teamplay 4: apply force even though damage was made virtual only"
+seta g_teamdamage_threshold 40 "for teamplay 4: threshold over which to apply mirror damage"
+seta g_teamdamage_resetspeed 20 "for teamplay 4: how fast player's teamdamage count decreases"
set deathmatch_force_teamplay 0 "Always play TDM instead of DM"
seta g_balance_teams 0 "automatically balance out players entering instead of asking them for their preferred team"
// keepaway
set g_keepaway 0 "game mode which focuses around a ball, look at g_keepaway_win_mode for further details"
-set g_keepaway_bckillscore 1 "enable scoring points (y/n) for ball carrier kills"
-set g_keepaway_pointlimit -1 "total amount of points you can get, -1 for unlimited"
-set g_keepaway_pointleadlimit -1 "mercy rule, -1 for unlimited"
-set g_keepaway_ballcarrier_alpha 0.6 "alpha when the player is the ballcarrier"
-set g_keepaway_ballcarrier_highspeed 1.5 "speed multiplier done to the person holding the ball"
-set g_keepaway_ballcarrier_damage 1.5 "damage multiplier while having powerup"
-set g_keepaway_ballcarrier_force 1.5 "force multiplier while having powerup"
-set g_keepaway_ballcarrier_selfdamage 1 "self damage multiplier while having powerup"
-set g_keepaway_ballcarrier_selfforce 1.5 "self force multiplier while having powerup"
-set g_keepaway_noncarrier_warn 0 "warn players when they kill without holding the ball"
-set g_keepaway_noncarrier_damage 0.5 "damage done to other players if both you and they don't have the ball"
-set g_keepaway_noncarrier_force 0.5 "force done to other players if both you and they don't have the ball"
+set g_keepaway_score_bckill 1 "enable scoring points (y/n) for ball carrier kills (value is how many points to award)"
+set g_keepaway_score_killac 1 "amount of points to give when you kill someone while you have the ball"
+set g_keepaway_score_timeinterval 1 "amount of time it takes between intervals for timepoints to be added to the score"
+set g_keepaway_score_timepoints 0 "points to add to score per timeinterval, 0 for no points"
+set g_keepaway_ballcarrier_effects 8 "Add together the numbers you want: EF_ADDITIVE (32) / EF_NODEPTHTEST (8192) / EF_DIMLIGHT (8)"
+set g_keepaway_ballcarrier_highspeed 1 "speed multiplier done to the person holding the ball (recommended when used with some mutators)"
+set g_keepaway_ballcarrier_damage 1 "damage multiplier while holding the ball"
+set g_keepaway_ballcarrier_force 1 "force multiplier while holding the ball"
+set g_keepaway_ballcarrier_selfdamage 1 "self damage multiplier while holding the ball"
+set g_keepaway_ballcarrier_selfforce 1 "self force multiplier while holding the ball"
+set g_keepaway_noncarrier_warn 1 "warn players when they kill without holding the ball"
+set g_keepaway_noncarrier_damage 1 "damage done to other players if both you and they don't have the ball"
+set g_keepaway_noncarrier_force 1 "force done to other players if both you and they don't have the ball"
set g_keepaway_noncarrier_selfdamage 1 "self damage if you don't have the ball"
set g_keepaway_noncarrier_selfforce 1 "self force if you don't have the ball"
+set g_keepawayball_effects 0 "Add together the numbers you want: EF_ADDITIVE (32) / EF_NODEPTHTEST (8192) / EF_DIMLIGHT (8)"
set g_keepawayball_trail_color 254 "particle trail color from player/ball"
-set g_keepawayball_damageforcescale 2 "Scale of force which is applied to the ball by weapons/explosions/etc"
-set g_keepawayball_respawntime 15 "if no one picks up the ball, how long to wait until the ball respawns"
+set g_keepawayball_damageforcescale 3 "Scale of force which is applied to the ball by weapons/explosions/etc"
+set g_keepawayball_respawntime 10 "if no one picks up the ball, how long to wait until the ball respawns"
seta g_keepaway_teams_override 0
set g_keepaway_teams 0
seta menu_skin "luminos"
set menu_slowmo 1
seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
+set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
r_textbrightness 0.2
r_textcontrast 0.8
seta hud_colorflash_alpha 0.5 "starting alpha of the color flash"
-seta hud_damage 1 "an improved version of gl_polyblend, draw an image instead when hurt"
-seta hud_damage_gentle_alpha_multiplier 0.25 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
+seta hud_damage 0.55 "an improved version of gl_polyblend, draw an image instead when hurt"
+seta hud_damage_gentle_alpha_multiplier 0.10 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version"
seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version"
seta hud_damage_color "1 0 0" "color of flash"
seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
-seta hud_damage_fade_rate 1 "how much to subtract from the alpha value each second"
-seta hud_damage_maxalpha 2 "how much to limit the alpha value to"
+seta hud_damage_fade_rate 0.75 "how much to subtract from the alpha value each second"
+seta hud_damage_maxalpha 1.5 "how much to limit the alpha value to"
seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
seta hud_fontsize 11
seta scr_centersize 12
seta hud_width 560
-// alias hud_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big ${2-}; scoreboard_columns_set"
-alias sbar_font "set _requested_sbar_font \"${*}\""
-sbar_font gfx/vera-sans 8 12 16 24 32
// these entities are not referenced by anything directly, they just represent
// teams and are found by find() when needed
alias allready "sv_cmd allready"
-seta cl_weaponpriority "minstanex rocketlauncher nex minelayer grenadelauncher fireball hlac hagar seeker crylink campingrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
+seta cl_weaponpriority "minstanex rocketlauncher nex minelayer grenadelauncher fireball hlac hagar seeker crylink sniperrifle uzi electro tuba shotgun laser hook porto" "weapon priority list"
seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)"
seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar seeker fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun. Default value: explosives"
seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser" "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun. Default value: energy"
-seta cl_weaponpriority2 "minstanex nex campingrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact"
-seta cl_weaponpriority3 "minstanex nex campingrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all"
+seta cl_weaponpriority2 "minstanex nex sniperrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact"
+seta cl_weaponpriority3 "minstanex nex sniperrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all"
seta cl_weaponpriority4 "minelayer grenadelauncher hlac hagar crylink seeker shotgun" "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun. Default value: spam weapons"
seta cl_weaponpriority5 "laser hook porto" "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun. Default value: weapons for moving"
seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun"
alias cl_hook_gamestart_nexball
alias cl_hook_gamestart_cts
alias cl_hook_gamestart_ka
+alias cl_hook_gamestart_freezetag
alias cl_hook_gameend
alias cl_hook_activeweapon
alias sv_hook_gamestart_nexball
alias sv_hook_gamestart_cts
alias sv_hook_gamestart_ka
+alias sv_hook_gamestart_freezetag
alias sv_hook_gamerestart
alias sv_hook_gameend
set g_weaponreplace_minstanex ""
set g_weaponreplace_hook ""
set g_weaponreplace_hlac ""
-set g_weaponreplace_campingrifle ""
+set g_weaponreplace_sniperrifle ""
set g_weaponreplace_tuba ""
set g_weaponreplace_fireball ""
set g_weaponreplace_seeker ""
scr_loadingscreen_background 0
scr_loadingscreen_barcolor "0 0.5 1"
-scr_loadingscreen_barheight 20
+scr_loadingscreen_barheight 12
scr_loadingscreen_count 1
scr_conforcewhiledisconnected 0
+scr_infobar_height 12
// DP cannot properly detect this, so rather turn off the detection
r_texture_dds_load_dxt1_noalpha 1
+r_texture_dds_load_swdecode 1 // SW decode to quarter res if we want to load DDS but don't support the extension for it
+r_texture_dds_load_logfailure 0 // this engine feature SUCKS
// particles optimization
r_drawparticles_nearclip_min 8
// safe font defaults
r_font_hinting 1
r_font_disable_freetype 0
-r_font_size_snapping 2
+r_font_size_snapping 4
// database management
set sv_db_saveasdump 0 "write server.db in dump format (loads slower, easier to read/parse)"
// player statistics server URI
set g_playerstats_uri ""
+set g_playerstats_debug 0 "when 1, player stats are dumped to the console too"
// create this cvar in case the engine did not
set snd_soundradius 1200
exec effects-normal.cfg
exec physicsX0.cfg
exec turrets.cfg
-exec font-nimbussansl.cfg
+exec font-xolonium.cfg
// hud cvar descriptions
exec _hud_descriptions.cfg
--- /dev/null
+#!/bin/sh
+
+main=balanceXonotic.cfg
+for X in balance*.cfg; do
+ case "$X" in
+ "$main")
+ ;;
+ *)
+ perl ../../misc/tools/cfgapply.pl "$main" "$X" > "$X.new" && mv "$X.new" "$X"
+ ;;
+ esac
+done
+git diff
seta cl_swapattacks_laser 0
seta cl_swapattacks_shotgun 0
seta cl_swapattacks_uzi 0
-seta cl_swapattacks_campingrifle 0
+seta cl_swapattacks_sniperrifle 0
seta cl_swapattacks_grenadelauncher 0
seta cl_swapattacks_electro 0
seta cl_swapattacks_hlac 0
// float coop;
// float deathmatch;
-// float dmg_take;
+float dmg_take;
// float dmg_save;
// vector dmg_origin;
string w_deathtypestring;
vector w_org, w_backoff;
-float campingrifle_scope;
+float sniperrifle_scope;
float nex_scope;
float cr_maxbullets;
#endif
float i;
- CSQC_CheckEngine();
binddb = db_create();
tempdb = db_create();
ClientProgsDB = db_load("client.db");
compressShortVector_init();
- drawfont = 0;
+ drawfont = FONT_USER+1;
menu_visible = FALSE;
menu_show = menu_show_error;
menu_action = menu_sub_null;
g_balance_electro_secondary_bouncestop = ReadCoord();
nex_scope = !ReadByte();
- campingrifle_scope = !ReadByte();
+ sniperrifle_scope = !ReadByte();
serverflags = ReadByte();
+ cr_maxbullets = ReadByte();
+
+ g_trueaim_minrange = ReadCoord();
+
if(!postinit)
PostInit();
}
Net_WeaponComplain();
bHandled = true;
break;
- case TE_CSQC_CR_MAXBULLETS:
- cr_maxbullets = ReadByte();
- bHandled = true;
- break;
default:
// No special logic for this temporary entity; return 0 so the engine can handle it
bHandled = false;
zoomspeed = 3.5;
zoomdir = button_zoom;
- if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_CAMPINGRIFLE && campingrifle_scope)) // do NOT use switchweapon here
+ if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_SNIPERRIFLE && sniperrifle_scope)) // do NOT use switchweapon here
zoomdir += button_attack2;
if(spectatee_status > 0 || isdemo())
{
case WEP_MINSTANEX:
mv = MOVE_NORMAL;
break;
- case WEP_CAMPINGRIFLE:
+ case WEP_SNIPERRIFLE:
ta = trueaim_rifle;
mv = MOVE_NORMAL;
if(zoomscript_caught)
traceline(view_origin, view_origin + view_forward * MAX_SHOT_DISTANCE, mv, ta);
trueaimpoint = trace_endpos;
+ if(vlen(trueaimpoint - view_origin) < g_trueaim_minrange)
+ trueaimpoint = view_origin + view_forward * g_trueaim_minrange;
+
if(vecs_x > 0)
vecs_y = -vecs_y;
else
// next R_RenderScene call
drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
- if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright >= 1)
+ if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright)
if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
{
// apply night vision effect
// the view to go back to normal, so reticle_type would become 0 as we fade out)
if(spectatee_status || getstati(STAT_HEALTH) <= 0)
reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators
- else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_CAMPINGRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught))
+ else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_SNIPERRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught))
reticle_type = 2; // nex zoom
else if(button_zoom || zoomscript_caught)
reticle_type = 1; // normal zoom
- else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_CAMPINGRIFLE && button_attack2)
+ else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_SNIPERRIFLE && button_attack2)
reticle_type = 2; // nex zoom
if(autocvar_cl_reticle_stretch)
// fade out
myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
// add new damage
- myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
+ myhealth_flash = bound(0, myhealth_flash + dmg_take * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
pain_threshold = autocvar_hud_damage_pain_threshold;
nex_charge_movingavg = nex_charge;
// ring around crosshair representing bullets left in camping rifle clip
- if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
+ if (activeweapon == WEP_SNIPERRIFLE && cr_maxbullets)
{
bullets = getstati(STAT_BULLETS_LOADED);
f = bound(0, bullets / cr_maxbullets, 1);
- a = autocvar_crosshair_ring_campingrifle_alpha;
+ a = autocvar_crosshair_ring_sniperrifle_alpha;
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}
else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
float autocvar_crosshair_per_weapon;
float autocvar_crosshair_pickup;
float autocvar_crosshair_pickup_speed;
-float autocvar_crosshair_ring_campingrifle_alpha;
+float autocvar_crosshair_ring_sniperrifle_alpha;
float autocvar_crosshair_ring_nex_currentcharge_movingavg_rate;
float autocvar_crosshair_ring_nex_currentcharge_scale;
float autocvar_crosshair_ring_nex_inner_alpha;
{
ts = centerprint_messages[i];
drawfontscale = sz * '1 1 0';
- drawfont = hud_bigfont;
pos_x = (vid_conwidth - stringwidth(ts, TRUE, centerprint_fontsize)) * 0.5;
if (ts != "")
{
// half height for empty lines looks better
pos_y = pos_y + sz * centerprint_fontsize_y * 0.5;
drawfontscale = '1 1 0';
- drawfont = hud_font;
}
}
case WEP_HLAC: return 3;
case WEP_MINSTANEX: return 3;
case WEP_NEX: return 3;
- case WEP_CAMPINGRIFLE: return 1;
+ case WEP_SNIPERRIFLE: return 1;
case WEP_HAGAR: return 2;
case WEP_ROCKET_LAUNCHER: return 2;
case WEP_SEEKER: return 2;
ammo_size_y = newSize;
}
- drawfont = hud_bigfont;
float i, stat_items, currently_selected;
if (autocvar_hud_panel_ammo_onlycurrent)
{
column = column + 1;
}
}
- drawfont = hud_font;
}
void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string icon, float left, vector color, float alpha)
}
}
- drawfont = hud_bigfont;
drawstring_aspect(numpos, ftos(x), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
- drawfont = hud_font;
drawpic_aspect_skin(picpos, icon, '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
}
rightexact = strength_time;
}
- drawfont = hud_bigfont;
float baralign = autocvar_hud_panel_powerups_baralign;
float barflip;
float iconalign = autocvar_hud_panel_powerups_iconalign;
}
}
}
- drawfont = hud_font;
}
// Health/armor (#3)
vector picpos;
vector numpos;
- drawfont = hud_bigfont;
float baralign = autocvar_hud_panel_healtharmor_baralign;
float iconalign = autocvar_hud_panel_healtharmor_iconalign;
float progressbar = autocvar_hud_panel_healtharmor_progressbar;
}
}
}
- drawfont = hud_font;
}
// Notification area (#4)
} else if(msg == MSG_KILL) {
w = DEATH_WEAPONOF(type);
if(WEP_VALID(w)) {
- if((w == WEP_CAMPINGRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
+ if((w == WEP_SNIPERRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT);
else
HUD_KillNotify_Push(s1, s2, 1, type);
timer = seconds_tostring(timeleft);
}
- drawfont = hud_bigfont;
drawstring_aspect(pos, timer, mySize, timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_font;
}
// Radar (#6)
// race record display
if (distribution <= 0)
HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_bigfont;
drawstring_aspect(pos, timer, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_font;
} else if (!teamplay) { // non-teamgames
// me vector := [team/connected frags id]
pl = players.sort_next;
drawstring_aspect(pos + eX * 0.75 * mySize_x, ftos(distribution), eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
if (leader)
HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_bigfont;
drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_font;
} else { // teamgames
float max_fragcount;
max_fragcount = -99;
leader = 1;
if (leader)
HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_bigfont;
drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_font;
} else {
if (max_fragcount == score)
leader = 1;
}
mySize = newSize;
- drawfont = hud_bigfont;
float a, t;
string s, forcetime;
}
}
}
-
- drawfont = hud_font;
}
// Vote window (#9)
redalive = getstati(STAT_REDALIVE);
bluealive = getstati(STAT_BLUEALIVE);
- drawfont = hud_bigfont;
vector redpos, bluepos;
if(mySize_x > mySize_y)
{
drawpic_aspect_skin(bluepos, "player_blue.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
drawstring_aspect(bluepos + eY * 0.3 * mySize_y, ftos(bluealive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
}
- drawfont = hud_font;
}
// CTF HUD modicon section
kaball_prevstatus = kaball;
}
- // todo: Fix the sizing with the expanding image
+ vector kaball_pos, kaball_size;
+
+ if(mySize_x > mySize_y) {
+ kaball_pos = pos + eX * 0.25 * mySize_x;
+ kaball_size = eX * 0.5 * mySize_x + eY * mySize_y;
+ } else {
+ kaball_pos = pos + eY * 0.25 * mySize_y;
+ kaball_size = eY * 0.5 * mySize_y + eX * mySize_x;
+ }
float kaball_statuschange_elapsedtime = time - kaball_statuschange_time;
float f = bound(0, kaball_statuschange_elapsedtime*2, 1);
if(kaball_prevstatus && f < 1)
- drawpic_aspect_skin_expanding(pos + eY * 0.25 * mySize_y, "keepawayball_carrying", eX * mySize_x + eY * mySize_y * 0.5, '1 1 1', panel_fg_alpha * kaball_alpha, DRAWFLAG_NORMAL, f);
+ drawpic_aspect_skin_expanding(kaball_pos, "keepawayball_carrying", kaball_size, '1 1 1', panel_fg_alpha * kaball_alpha, DRAWFLAG_NORMAL, f);
if(kaball)
drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
if not((scores_flags[ps_primary] & SFL_TIME) && !teamplay) // race/cts record display on HUD
return; // no records in the actual race
- drawfont = hud_bigfont;
-
// clientside personal record
string rr;
if(gametype == GAME_CTS)
strunzone(race_status_name_prev);
race_status_name_prev = string_null;
}
- drawfont = hud_font;
}
float mod_prev; // previous state of mod_active to check for a change
vector color;
color = HUD_Get_Num_Color (prevfps, 100);
- drawfont = hud_bigfont;
drawstring_aspect(pos, strcat("FPS: ", ftos_decimals(prevfps, autocvar_hud_panel_engineinfo_framecounter_decimals)), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
- drawfont = hud_font;
}
// Info messages panel (#14)
numsize_x = numsize_y = autocvar_cl_showspeed_size;
pos = (vid_conheight - numsize_y) * autocvar_cl_showspeed_position;
- drawfont = hud_bigfont;
drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
if (autocvar_cl_showspeed_z == 1) {
zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit);
drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL);
}
-
- drawfont = hud_font;
}
vector acc_prevspeed;
string hud_title[MAX_HUD_FIELDS + 1];
float hud_num_fields;
-float hud_font;
-float hud_bigfont;
-
string scores_label[MAX_SCORE];
float scores_flags[MAX_SCORE];
string teamscores_label[MAX_SCORE];
float g_balance_grenadelauncher_bouncestop;
float g_balance_electro_secondary_bouncefactor;
float g_balance_electro_secondary_bouncestop;
+float g_trueaim_minrange;
img_size_y = isize;
img_size_x = isize / 0.75; // 4:3 x can be stretched easily, height is defined in isize
- drawfont = hud_font;
pos_y = pos_y + img_size_y;
label = MapVote_FormatMapItem(id, map, count, tsize, hud_fontsize);
rgb = MapVote_RGB(id, count);
- drawfont = hud_font;
pos_y = pos_y + hud_fontsize_y;
label = MapVote_FormatMapItem(id, "Don't care", count, tsize, hud_fontsize);
if(i >= 0 || ymax < (vid_conheight*0.5))
ymax = vid_conheight - ymin;
- drawfont = hud_bigfont;
hud_fontsize = HUD_GetFontsize("hud_fontsize");
pos_y = ymin;
pos_y += 22;
pos_x = xmin;
- drawfont = hud_font;
-
// base for multi-column stuff...
ymin = pos_y;
if(mv_abstain)
return tm;
}
-void CSQC_CheckEngine()
-{
- hud_font = FONT_USER+1;
- hud_bigfont = FONT_USER+2;
-}
-
vector HUD_GetFontsize(string cvarname)
{
vector v;
{
return strcat( // fteqcc sucks
"ping pl name | ",
- "-teams,race,lms/kills -teams,lms/deaths -teams,lms,race,ka/suicides -race,dm,tdm,ka/frags ", // tdm already has this in "score"
+ "-teams,race,lms/kills +freezetag/kills -teams,lms/deaths +freezetag/deaths -teams,lms,race,ka/suicides +freezetag/suicides -race,dm,tdm,ka,freezetag/frags ", // tdm already has this in "score"
"+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns ",
"+lms/lives +lms/rank ",
"+kh/caps +kh/pushes +kh/destroyed ",
"?+race/laps ?+race/time ?+race/fastest ",
- "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills ",
+ "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills +ka/time +freezetag/revivals ",
"-lms,race,nexball/score");
}
hud_num_fields = 0;
- drawfont = hud_font;
hud_fontsize = HUD_GetFontsize("hud_fontsize");
for(i = 0; i < argc - 1; ++i)
return 1;
else if (intermission == 1)
return 1;
+ else if (intermission == 2)
+ return 0;
else if (getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard && gametype != GAME_CTS)
return 1;
- else if (spectatee_status == -1)
- return 1;
+ else if (spectatee_status == -1)
+ return 1;
else if (scoreboard_showscores_force)
return 1;
return 0;
drawfill(pos + '0 1 0' * weapon_height + '0 1 0' * height * i, '1 0 0' * sbwidth + '0 1 0' * fontsize, '1 1 1', scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
}
- drawfont = hud_bigfont;
average_accuracy = 0;
float weapons_with_stats;
weapons_with_stats = 0;
pos_y += height;
}
}
- drawfont = hud_font;
if(weapons_with_stats)
average_accuracy = floor(average_accuracy / weapons_with_stats);
pos_z = 0;
// Heading
- drawfont = hud_bigfont;
drawstring(pos, "Scoreboard", '24 24 0', '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
centerprint_start_x = vid_conwidth - 0.5 * (pos_x + stringwidth("Scoreboard", FALSE, '24 24 0'));
pos_y += 24;
- drawfont = hud_font;
-
// Draw the scoreboard
vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * autocvar_scoreboard_bg_scale;
const float TE_CSQC_TARGET_MUSIC = 111;
const float TE_CSQC_NOTIFY = 112;
const float TE_CSQC_WEAPONCOMPLAIN = 113;
-const float TE_CSQC_CAMPINGRIFLE_SCOPE = 115;
const float TE_CSQC_NEX_SCOPE = 116;
const float TE_CSQC_CR_MAXBULLETS = 117;
return -1;
fh = fopen(pFilename, FILE_READ);
if(fh < 0)
- return buf;
+ {
+ buf_del(buf);
+ return -1;
+ }
i = 0;
while((l = fgets(fh)))
{
#include "xonotic/dialog_multiplayer_create_mutators.c"
#include "xonotic/dialog_multiplayer_create_advanced.c"
#include "xonotic/dialog_multiplayer_create_mapinfo.c"
-#include "xonotic/gametypebutton.c"
+#include "xonotic/gametypelist.c"
#include "xonotic/maplist.c"
#include "xonotic/skinlist.c"
#include "xonotic/image.c"
}
void draw_CenterText(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz)
{
- //print(strcat("orig = ", vtos(theOrigin) ," tx = ", ftos(draw_TextWidth(theText, ICanHasKallerz, theSize)), "\n"));
+ //dprint(strcat("orig = ", vtos(theOrigin) ," tx = ", ftos(draw_TextWidth(theText, ICanHasKallerz, theSize)), "\n"));
draw_Text(theOrigin - eX * 0.5 * draw_TextWidth(theText, ICanHasKallerz, theSize), theText, theSize, theColor, theAlpha, ICanHasKallerz);
}
float draw_TextWidth(string theText, float ICanHasKallerz, vector SizeThxBye)
{
//return strlen(theText);
- //print("draw_TextWidth \"", theText, "\"\n");
+ //dprint("draw_TextWidth \"", theText, "\"\n");
vector v;
v = '0 0 0';
//float r;
do_cvar = curl_uri_get_cvar[i];
if(status != 0)
{
- print("error: status is ", ftos(status), "\n");
+ print(sprintf(_("error: status is %d\n"), status));
return;
}
if(do_exec)
if(argv(0) == "help" || argc == 0)
{
- print("Usage: menu_cmd theCommand..., where possible theCommands are:\n");
- print(" sync - reloads all cvars on the current menu page\n");
- print(" directmenu ITEM - select a menu item as main item\n");
+ print(_("Usage: menu_cmd theCommand..., where possible theCommands are:\n"));
+ print(_(" sync - reloads all cvars on the current menu page\n"));
+ print(_(" directmenu ITEM - select a menu item as main item\n"));
GameCommand_Generic("help");
return;
}
curl_uri_get_pos = mod(curl_uri_get_pos + 1, URI_GET_CURL_END - URI_GET_CURL + 1);
}
else
- print("error creating curl handle\n");
+ print(_("error creating curl handle\n"));
buf_del(buf);
}
#endif
- print("Invalid theCommand. For a list of supported theCommands, try menu_cmd help.\n");
+ print(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));
}
--- /dev/null
+Guideline:
+- do NOT translate strings in error() messages, or in dprint()!
+- delete obviously useless developer prints while at it
+- change obvious developer prints from print to dprint (even in comments),
+ unless in developer-only functions (e.g. *dumptree*)
+- mark translatable strings with _()
+- if a translatable string is a strcat monster, change it to sprintf
+- if code loads files with text, use language_filename()
+- test by:
+ find . -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f-
+- interesting vim macros:
+ :map # /"<return>
+ :map ' i_(<esc>2f"a)<esc>/"<return>
+
+Unresolved TODO:
+
+- translated campaigns
{
me.origin = absOrigin;
me.size = absSize;
- // me.tooltip = "The quick brown fox jumped over the lazy sleeping dog's back then sat on a tack. Franz jagt im komplett verwahrlosten Taxi quer durch Bayern.";
}
void Item_draw(entity me)
}
void BorderImage_draw(entity me)
{
- //print(vtos(me.borderVec), "\n");
-
if(me.src)
draw_BorderPicture('0 0 0', me.src, '1 1 0', me.color, 1, me.borderVec);
if(me.fontSize > 0)
else if(!me.focused && me.playedfocus)
me.playedfocus = 0;
}
-#endif
\ No newline at end of file
+#endif
void Dialog_addItemSimple(entity me, float row, float col, float rowspan, float colspan, entity e, vector v)
{
- //print(vtos(me.itemSpacing), " ", vtos(me.itemSize), "\n");
vector o, s;
o = me.itemOrigin + eX * ( col * me.itemSpacing_x) + eY * ( row * me.itemSpacing_y);
s = me.itemSize + eX * ((colspan - 1) * me.itemSpacing_x) + eY * ((rowspan - 1) * me.itemSpacing_y);
if(me.closable)
{
closebutton = me.closeButton = spawnButton();
- closebutton.configureButton(closebutton, "Close", 0, me.closeButtonImage);
+ closebutton.configureButton(closebutton, "", 0, me.closeButtonImage);
closebutton.onClick = Dialog_Close; closebutton.onClickEntity = me;
closebutton.srcMulti = 0;
me.addItem(me, closebutton, '0 0 0', '1 1 0', 1); // put it as LAST
local vector fontsize;
fontsize_x = fontsize_y = 1.0 / 30.0;
fontsize_z = 0.0;
- draw_Text( '0 0 0', "Browser not initialized!", fontsize, '1 1 1', 1.0, 0 );
+ draw_Text( '0 0 0', _("Browser not initialized!"), fontsize, '1 1 1', 1.0, 0 );
}
}
draw_Text(p, substring(me.text, i, 2), me.realFontSize, '1 1 1', theAlpha, 0);
}
}
- /*else if(ch2 == "a") // ^a found
- {
- draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
- draw_Text(p, substring(me.text, i, 2), me.realFontSize, theColor, 0.8, 0);
-
- component = str2chr(me.text, i+2);
- if (component >= '0' && component <= '9')
- component = component - '0';
- else if (component >= 'a' && component <= 'f')
- component = component - 87;
- else if (component >= 'A' && component <= 'F')
- component = component - 55;
- else
- component = -1;
-
- if (component >= 0) // ^ah found
- {
- // FIX ME: overflow here
- if (component == 20 && theVariableAlpha <= 0.97)
- theVariableAlpha = theVariableAlpha + 0.0625;
- else if (component == 30 && theVariableAlpha >= 0.03)
- theVariableAlpha = theVariableAlpha - 0.0625;
- else
- theVariableAlpha = component*0.0625;
-
- draw_Fill(p, eX * draw_TextWidth(substring(me.text, i, 3), 0, me.realFontSize) + eY * me.realFontSize_y, '0.8 0.8 0.8', 0.5);
- draw_Text(p, strcat(ch, ch2), me.realFontSize, theColor, 0.8, 0);
- }
- }*/
else
{
draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
METHOD(Label, resizeNotify, void(entity, vector, vector, vector, vector))
METHOD(Label, setText, void(entity, string))
METHOD(Label, toString, string(entity))
+ METHOD(Label, recalcPosition, void(entity))
ATTRIB(Label, text, string, string_null)
ATTRIB(Label, fontSize, float, 8)
ATTRIB(Label, align, float, 0.5)
ATTRIB(Label, textEntity, entity, NULL)
ATTRIB(Label, allowWrap, float, 0)
ATTRIB(Label, recalcPos, float, 0)
+ ATTRIB(Label, condenseFactor, float, 1)
ENDCLASS(Label)
#endif
me.text = txt;
me.recalcPos = 1;
}
+void Label_recalcPosition(entity me)
+{
+ float spaceAvail;
+ spaceAvail = 1 - me.keepspaceLeft - me.keepspaceRight;
+
+ float spaceUsed;
+ spaceUsed = draw_TextWidth(me.text, me.allowColors, me.realFontSize);
+
+ if(spaceUsed <= spaceAvail)
+ {
+ me.realOrigin_x = me.align * (spaceAvail - spaceUsed) + me.keepspaceLeft;
+ me.condenseFactor = 1;
+ }
+ else if(me.allowCut || me.allowWrap)
+ {
+ me.realOrigin_x = me.keepspaceLeft;
+ me.condenseFactor = 1;
+ }
+ else
+ {
+ me.realOrigin_x = me.keepspaceLeft;
+ me.condenseFactor = spaceAvail / spaceUsed;
+ dprint(sprintf(_("NOTE: label text %s too wide for label, condensed by factor %f\n"), me.text, me.condenseFactor));
+ }
+ me.recalcPos = 0;
+}
void Label_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
SUPER(Label).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
if(me.marginRight)
me.keepspaceRight = me.marginRight * me.realFontSize_x;
me.realOrigin_y = 0.5 * (1 - me.realFontSize_y);
- me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(me.text, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
- me.recalcPos = 0;
+
+ me.recalcPosition(me);
}
void Label_configureLabel(entity me, string txt, float sz, float algn)
{
t = me.text;
if(me.recalcPos)
- me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(t, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
- me.recalcPos = 0;
+ me.recalcPosition(me);
- //if(me.text == "Bookmark")
- // draw_Fill(me.realOrigin, '0 1 0' + '1 0 0' * draw_TextWidth(t, me.allowColors, me.realFontSize), '1 0 1', 1);
-
if(me.fontSize)
if(t)
{
+ vector dfs;
+ vector fs;
+
+ // set up variables to draw in condensed size, but use hinting for original size
+ fs = me.realFontSize;
+ fs_x *= me.condenseFactor;
+
+ dfs = draw_fontscale;
+ draw_fontscale_x *= me.condenseFactor;
+
if(me.allowCut) // FIXME allowCut incompatible with align != 0
- draw_Text(me.realOrigin, draw_TextShortenToWidth(t, (1 - me.keepspaceLeft - me.keepspaceRight), me.allowColors, me.realFontSize), me.realFontSize, me.colorL, me.alpha, me.allowColors);
+ draw_Text(me.realOrigin, draw_TextShortenToWidth(t, (1 - me.keepspaceLeft - me.keepspaceRight), me.allowColors, fs), fs, me.colorL, me.alpha, me.allowColors);
else if(me.allowWrap) // FIXME allowWrap incompatible with align != 0
{
getWrappedLine_remaining = t;
while(getWrappedLine_remaining)
{
if (me.allowColors)
- t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight), me.realFontSize, draw_TextWidth_WithColors);
+ t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight), fs, draw_TextWidth_WithColors);
else
- t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight), me.realFontSize, draw_TextWidth_WithoutColors);
- draw_Text(o, t, me.realFontSize, me.colorL, me.alpha, me.allowColors);
+ t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight), fs, draw_TextWidth_WithoutColors);
+ draw_Text(o, t, fs, me.colorL, me.alpha, me.allowColors);
o_y += me.realFontSize_y;
}
}
else
- draw_Text(me.realOrigin, t, me.realFontSize, me.colorL, me.alpha, me.allowColors);
+ draw_Text(me.realOrigin, t, fs, me.colorL, me.alpha, me.allowColors);
+
+ draw_fontscale = dfs;
}
}
#endif
oldshift = draw_shift;
oldscale = draw_scale;
absSize = boxToGlobalSize(me.size, eX * (1 - me.controlWidth) + eY * me.itemHeight);
+ draw_scale = boxToGlobalSize(eX * (1 - me.controlWidth) + eY * me.itemHeight, oldscale);
for(i = floor(me.scrollPos / me.itemHeight); i < me.nItems; ++i)
{
float y;
if(y >= 1)
break;
draw_shift = boxToGlobal(eY * y, oldshift, oldscale);
- draw_scale = boxToGlobalSize(eY * me.itemHeight + eX * (1 - me.controlWidth), oldscale);
me.drawListBoxItem(me, i, absSize, (me.selectedItem == i));
}
draw_ClearClip();
void ListBox_drawListBoxItem(entity me, float i, vector absSize, float selected)
{
- draw_Text('0 0 0', strcat("Item ", ftos(i)), eX * (8 / absSize_x) + eY * (8 / absSize_y), (selected ? '0 1 0' : '1 1 1'), 1, 0);
+ draw_Text('0 0 0', sprintf(_("Item %d"), i), eX * (8 / absSize_x) + eY * (8 / absSize_y), (selected ? '0 1 0' : '1 1 1'), 1, 0);
}
#endif
me.animationState = 0;
}
- //print(ftos(me.animationState), "\n");
-
f = min(1, frametime * 5);
switch(me.animationState)
{
}
string Slider_toString(entity me)
{
- return strcat(ftos(me.value), " (", me.valueToText(me, me.value), ")");
+ return sprintf(_("%d (%s)"), me.value, me.valueToText(me, me.value));
}
void Slider_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
string TextSlider_valueToText(entity me, float val)
{
if(val >= me.nValues)
- return "custom";
+ return _("custom");
if(val < 0)
- return "custom";
+ return _("custom");
return me.(valueStrings[val]);
}
void TextSlider_setValueFromIdentifier(entity me, string id)
//////////////////////////////////////////////////
// AK FIXME: Create perhaps a special builtin file for the common cmds
-//#define PROFILESTRZONE
-//#define FIXEDFOPEN
-
float checkextension(string ext) = #1;
// error cmds
float pow(float a, float b) = #46;
void copyentity(entity src, entity dst) = #47;
-#ifdef FIXEDFOPEN
-float _fopen( string filename, float mode ) = #48;
-#else
float fopen(string filename, float mode) = #48;
-#endif
void fclose(float fhandle) = #49;
string fgets(float fhandle) = #50;
void fputs(float fhandle, string s) = #51;
vector stov(string s) = #55;
-#ifdef PROFILESTRZONE
-string _strzone(string s) = #56;
-void _strunzone(string s) = #57;
-
-string( string s ) strzone =
-{
- return _strzone( s );
-};
-
-void( string s ) strunzone =
-{
- return _strunzone( s );
-};
-#else
string strzone(string s) = #56;
void strunzone(string s) = #57;
-#endif
float tokenize(string s) = #58;
float(string s, string separator1, ...) tokenizebyseparator = #479;
string(float uselocaltime, string format, ...) strftime = #478;
-#ifdef FIXEDFOPEN
-float fopen( string filename, float mode ) =
-{
- local float handle;
- if( mode == FILE_READ ) {
- return _fopen( filename, mode );
- }
-
- // check for data/
- filename = strzone( filename );
- if( substring( filename, 0, 5 ) != "data/" ) {
- print( "menu: fopen: all output must go into data/!\n" );
- return -1;
- }
- handle = _fopen( substring( filename, 5, 10000 ), mode );
- strunzone( filename );
- return handle;
-};
-#endif
-
float(string s) tokenize_console = #514;
float(float i) argv_start_index = #515;
float(float i) argv_end_index = #516;
check_unacceptable_compiler_bugs();
#ifdef WATERMARK
- print("^4MQC Build information: ", WATERMARK(), "\n");
+ print(sprintf(_("^4MQC Build information: %s\n"), WATERMARK()));
#endif
// list all game dirs (TEST)
s = getgamedirinfo(i, GETGAMEDIRINFO_NAME);
if not(s)
break;
- print(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
+ dprint(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
}
}
}
if(cvar_string("menu_skin") != "")
{
draw_currentSkin = strcat("gfx/menu/", cvar_string("menu_skin"));
- fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
if(fh < 0)
if(cvar_defstring("menu_skin") != "")
{
draw_currentSkin = strcat("gfx/menu/", cvar_defstring("menu_skin"));
- fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
if(fh < 0)
{
draw_currentSkin = "gfx/menu/default";
- fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+ fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
}
draw_currentSkin = strzone(draw_currentSkin);
while((s = fgets(fh)))
if(mouseButtonsPressed < 0)
{
mouseButtonsPressed = 0;
- print("Warning: released an already released button\n");
+ dprint("Warning: released an already released button\n");
}
}
if(key == K_ALT) menuShiftState -= (menuShiftState & S_ALT);
if(mouseButtonsPressed > 10)
{
mouseButtonsPressed = 10;
- print("Warning: pressed an already pressed button\n");
+ dprint("Warning: pressed an already pressed button\n");
}
}
if(key == K_ALT) menuShiftState |= S_ALT;
return FALSE;
if(tooltippos_y + menuTooltipSize_y > 1)
return FALSE;
- /*
- menuTooltipOrigin_x = rint(tooltippos_x * cvar("vid_width")) / cvar("vid_width");
- menuTooltipOrigin_y = rint(tooltippos_y * cvar("vid_height")) / cvar("vid_height");
- menuTooltipOrigin_z = 0;
- */
menuTooltipOrigin = tooltippos;
return TRUE;
}
if(!cvar("menu_video_played"))
{
localcmd("set menu_video_played 1; cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
- menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading
+ menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading FIXME
}
}
while(<DATA>)
{
chomp;
- if(/^\s*(?:SKINFLOAT|SKINVECTOR)\(([A-Z_]+), ([-'0-9. ]+)\);$/)
+ if(/^\s*(?:SKINFLOAT|SKINVECTOR)\(([A-Z_]+), ([-'0-9. ]+)\);$/) #'
{
printf "%-31s %s\n", $1, $2;
}
//#define SKINSTRING(name,def) case #name: break
#define SKINSTRING(name,def) case #name: SKIN##name = strzone(value); break
// I know this leaks memory when skin is read multiple times. Screw it.
-#define SKINEND case "": break; case "//": break; default: print("Invalid key in skin file: ", key, "\n"); } }
+#define SKINEND case "": break; case "//": break; default: dprint("Invalid key in skin file: ", key, "\n"); } }
#include "skin-customizables.inc"
#undef SKINEND
#undef SKINSTRING
if(i <= me.campaignIndex)
s = campaign_shortdesc[i]; // fteqcc sucks
else
- s = "???";
- s = draw_TextShortenToWidth(strcat("Level ", ftos(i + 1), ": ", s), me.columnNameSize, 0, me.realFontSize);
+ s = _("???");
+ s = draw_TextShortenToWidth(sprintf(_("Level %d: %s"), i+1, s), me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, theColor, theAlpha, 0);
if(i <= me.campaignIndex)
{
me.configureXonoticListBox(me);
// load the file
- me.bufferIndex = buf_load("xonotic-credits.txt");
+ me.bufferIndex = buf_load(language_filename("xonotic-credits.txt"));
+ if(me.bufferIndex < 0)
+ me.bufferIndex = buf_load("xonotic-credits.txt");
me.nItems = buf_getsize(me.bufferIndex);
}
void XonoticCreditsList_destroy(entity me)
t = cvar_type(me.cvarName);
me.cvarType = "";
if(t & CVAR_TYPEFLAG_SAVED)
- me.cvarType = strcat(me.cvarType, ", will be saved to config.cfg");
+ me.cvarType = strcat(me.cvarType, ", ", _("will be saved to config.cfg"));
else
- me.cvarType = strcat(me.cvarType, ", will not be saved");
+ me.cvarType = strcat(me.cvarType, ", ", _("will not be saved"));
if(t & CVAR_TYPEFLAG_PRIVATE)
- me.cvarType = strcat(me.cvarType, ", private");
+ me.cvarType = strcat(me.cvarType, ", ", _("private"));
if(t & CVAR_TYPEFLAG_ENGINE)
- me.cvarType = strcat(me.cvarType, ", engine setting");
+ me.cvarType = strcat(me.cvarType, ", ", _("engine setting"));
if(t & CVAR_TYPEFLAG_READONLY)
- me.cvarType = strcat(me.cvarType, ", read only");
+ me.cvarType = strcat(me.cvarType, ", ", _("read only"));
me.cvarType = strzone(substring(me.cvarType, 2, strlen(me.cvarType) - 2));
me.cvarNameBox.setText(me.cvarNameBox, me.cvarName);
// still to be customized by user
/*
ATTRIB(XonoticDialog, closable, float, 1)
- ATTRIB(XonoticDialog, title, string, "Form1") // ;)
+ ATTRIB(XonoticDialog, title, string, _("Form1")) // ;)
ATTRIB(XonoticDialog, color, vector, '1 0.5 1')
ATTRIB(XonoticDialog, intendedWidth, float, 0)
ATTRIB(XonoticDialog, rows, float, 3)
CLASS(XonoticCreditsDialog) EXTENDS(XonoticDialog)
METHOD(XonoticCreditsDialog, fill, void(entity))
METHOD(XonoticCreditsDialog, focusEnter, void(entity))
- ATTRIB(XonoticCreditsDialog, title, string, "Credits")
+ ATTRIB(XonoticCreditsDialog, title, string, _("Credits"))
ATTRIB(XonoticCreditsDialog, color, vector, SKINCOLOR_DIALOG_CREDITS)
ATTRIB(XonoticCreditsDialog, intendedWidth, float, SKINWIDTH_CREDITS)
ATTRIB(XonoticCreditsDialog, rows, float, SKINROWS_CREDITS)
me.TR(me);
me.TD(me, me.rows - 1, me.columns, me.creditsList = makeXonoticCreditsList());
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#ifdef INTERFACE
CLASS(XonoticHUDAmmoDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDAmmoDialog, fill, void(entity))
- ATTRIB(XonoticHUDAmmoDialog, title, string, "Ammo Panel")
+ ATTRIB(XonoticHUDAmmoDialog, title, string, _("Ammo Panel"))
ATTRIB(XonoticHUDAmmoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDAmmoDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDAmmoDialog, rows, float, 15)
{
entity e;
string panelname = "ammo";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_ammo", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Ammunition display:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Ammunition display:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", "Show only current ammo type"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_ammo_onlycurrent", _("Show only current ammo type")));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Align icon:"));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", "Left"));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", "Right"));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "0", _("Left")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_ammo_iconalign", "1", _("Right")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDChatDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDChatDialog, fill, void(entity))
- ATTRIB(XonoticHUDChatDialog, title, string, "Chat Panel")
+ ATTRIB(XonoticHUDChatDialog, title, string, _("Chat Panel"))
ATTRIB(XonoticHUDChatDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDChatDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDChatDialog, rows, float, 15)
{
entity e;
string panelname = "chat";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_chat", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Chat entries:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Chat entries:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Chat size:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat size:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(6, 20, 1, "con_chatsize"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Chat lifetime:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Chat lifetime:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(5, 60, 5, "con_chattime"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", "Chat beep sound"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat beep sound")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDEngineInfoDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDEngineInfoDialog, fill, void(entity))
- ATTRIB(XonoticHUDEngineInfoDialog, title, string, "Engine Info Panel")
+ ATTRIB(XonoticHUDEngineInfoDialog, title, string, _("Engine Info Panel"))
ATTRIB(XonoticHUDEngineInfoDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDEngineInfoDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDEngineInfoDialog, rows, float, 15)
{
entity e;
string panelname = "engineinfo";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Engine info:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Engine info:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", "Use an averaging algorithm for fps"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_engineinfo_framecounter_exponentialmovingaverage", _("Use an averaging algorithm for fps")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDHealthArmorDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDHealthArmorDialog, fill, void(entity))
- ATTRIB(XonoticHUDHealthArmorDialog, title, string, "Health/Armor Panel")
+ ATTRIB(XonoticHUDHealthArmorDialog, title, string, _("Health/Armor Panel"))
ATTRIB(XonoticHUDHealthArmorDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDHealthArmorDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDHealthArmorDialog, rows, float, 15)
{
entity e;
string panelname = "healtharmor";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_progressbar", "Enable status bar"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_progressbar", _("Enable status bar")));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Status bar alignment:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Status bar alignment:")));
setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "0", "Left"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "0", _("Left")));
setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "1", "Right"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "1", _("Right")));
setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "3", "Inward"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "3", _("Inward")));
setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "4", "Outward"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_healtharmor_baralign", "4", _("Outward")));
setDependent(e, "hud_panel_healtharmor_progressbar", 1, 1);
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Icon alignment:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Icon alignment:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "0", "Left"));
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "1", "Right"));
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "3", "Inward"));
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "4", "Outward"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "0", _("Left")));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "1", _("Right")));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "3", _("Inward")));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_healtharmor_iconalign", "4", _("Outward")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_flip", "Flip health and armor positions"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor_flip", _("Flip health and armor positions")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDInfoMessagesDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDInfoMessagesDialog, fill, void(entity))
- ATTRIB(XonoticHUDInfoMessagesDialog, title, string, "Info Messages Panel")
+ ATTRIB(XonoticHUDInfoMessagesDialog, title, string, _("Info Messages Panel"))
ATTRIB(XonoticHUDInfoMessagesDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDInfoMessagesDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDInfoMessagesDialog, rows, float, 15)
{
entity e;
string panelname = "infomessages";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_infomessages", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Info messages:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Info messages:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_infomessages_flip", "Flip align"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_infomessages_flip", _("Flip align")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDModIconsDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDModIconsDialog, fill, void(entity))
- ATTRIB(XonoticHUDModIconsDialog, title, string, "Mod Icons Panel")
+ ATTRIB(XonoticHUDModIconsDialog, title, string, _("Mod Icons Panel"))
ATTRIB(XonoticHUDModIconsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDModIconsDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDModIconsDialog, rows, float, 15)
{
entity e;
string panelname = "modicons";
- float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_modicons", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDNotificationDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDNotificationDialog, fill, void(entity))
- ATTRIB(XonoticHUDNotificationDialog, title, string, "Notification Panel")
+ ATTRIB(XonoticHUDNotificationDialog, title, string, _("Notification Panel"))
ATTRIB(XonoticHUDNotificationDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDNotificationDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDNotificationDialog, rows, float, 15)
{
entity e;
string panelname = "notify";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_healtharmor", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Notifications:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Notifications:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify_print", "Also print notifications to the console"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify_print", _("Also print notifications to the console")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", "Flip notify order"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_notify_flip", _("Flip notify order")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Entry lifetime:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry lifetime:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(3, 15, 1, "hud_panel_notify_time"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Entry fadetime:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Entry fadetime:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 5, 0.5, "hud_panel_notify_fadetime"));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDPowerupsDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDPowerupsDialog, fill, void(entity))
- ATTRIB(XonoticHUDPowerupsDialog, title, string, "Powerups Panel")
+ ATTRIB(XonoticHUDPowerupsDialog, title, string, _("Powerups Panel"))
ATTRIB(XonoticHUDPowerupsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDPowerupsDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDPowerupsDialog, rows, float, 15)
{
entity e;
string panelname = "powerups";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_powerups", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_powerups_progressbar", "Enable status bar"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_powerups_progressbar", _("Enable status bar")));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Status bar alignment:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Status bar alignment:")));
setDependent(e, "hud_panel_powerups_progressbar", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "0", "Left"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "0", _("Left")));
setDependent(e, "hud_panel_powerups_progressbar", 1, 1);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "1", "Right"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "1", _("Right")));
setDependent(e, "hud_panel_powerups_progressbar", 1, 1);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "3", "Inward"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "3", _("Inward")));
setDependent(e, "hud_panel_powerups_progressbar", 1, 1);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "4", "Outward"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(2, "hud_panel_powerups_baralign", "4", _("Outward")));
setDependent(e, "hud_panel_powerups_progressbar", 1, 1);
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Icon alignment:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Icon alignment:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "0", "Left"));
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "1", "Right"));
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "3", "Inward"));
- me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "4", "Outward"));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "0", _("Left")));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "1", _("Right")));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "3", _("Inward")));
+ me.TD(me, 1, 0.95, e = makeXonoticRadioButton(3, "hud_panel_powerups_iconalign", "4", _("Outward")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_powerups_flip", "Flip strength and shield positions"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_powerups_flip", _("Flip strength and shield positions")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDPressedKeysDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDPressedKeysDialog, fill, void(entity))
- ATTRIB(XonoticHUDPressedKeysDialog, title, string, "Pressed Keys Panel")
+ ATTRIB(XonoticHUDPressedKeysDialog, title, string, _("Pressed Keys Panel"))
ATTRIB(XonoticHUDPressedKeysDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDPressedKeysDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDPressedKeysDialog, rows, float, 15)
{
entity e;
string panelname = "pressedkeys";
- float i;
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_pressedkeys"));
- e.addValue(e, "Panel disabled", "0");
- e.addValue(e, "Panel enabled when spectating", "1");
- e.addValue(e, "Panel always enabled", "2");
+ e.addValue(e, _("Panel disabled"), "0");
+ e.addValue(e, _("Panel enabled when spectating"), "1");
+ e.addValue(e, _("Panel always enabled"), "2");
e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+
+ DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Forced aspect:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Forced aspect:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(0.2, 4, 0.1, "hud_panel_pressedkeys_aspect"));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDRaceTimerDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDRaceTimerDialog, fill, void(entity))
- ATTRIB(XonoticHUDRaceTimerDialog, title, string, "Race Timer Panel")
+ ATTRIB(XonoticHUDRaceTimerDialog, title, string, _("Race Timer Panel"))
ATTRIB(XonoticHUDRaceTimerDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDRaceTimerDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDRaceTimerDialog, rows, float, 15)
{
entity e;
string panelname = "racetimer";
- float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_racetimer", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDRadarDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDRadarDialog, fill, void(entity))
- ATTRIB(XonoticHUDRadarDialog, title, string, "Radar Panel")
+ ATTRIB(XonoticHUDRadarDialog, title, string, _("Radar Panel"))
ATTRIB(XonoticHUDRadarDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDRadarDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDRadarDialog, rows, float, 15)
{
entity e;
string panelname = "radar";
- float i;
me.TR(me);
me.TD(me, 1, 2, e = makeXonoticTextSlider("hud_panel_radar"));
- e.addValue(e, "Panel disabled", "0");
- e.addValue(e, "Panel enabled in teamgames", "1");
- e.addValue(e, "Panel always enabled", "2");
+ e.addValue(e, _("Panel disabled"), "0");
+ e.addValue(e, _("Panel enabled in teamgames"), "1");
+ e.addValue(e, _("Panel always enabled"), "2");
e.configureXonoticTextSliderValues(e);
+
+ DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+
me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Radar:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Radar:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_radar_foreground_alpha"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Rotation:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Rotation:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_radar_rotation"));
- e.addValue(e, "Forward", "0");
- e.addValue(e, "West", "1");
- e.addValue(e, "South", "2");
- e.addValue(e, "East", "3");
- e.addValue(e, "North", "4");
+ e.addValue(e, _("Forward"), "0");
+ e.addValue(e, _("West"), "1");
+ e.addValue(e, _("South"), "2");
+ e.addValue(e, _("East"), "3");
+ e.addValue(e, _("North"), "4");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Scale:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Scale:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(1024, 8192, 512, "hud_panel_radar_scale"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Zoom mode:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Zoom mode:")));
me.TD(me, 1, 1.6, e = makeXonoticTextSlider("hud_panel_radar_zoommode"));
- e.addValue(e, "Zoomed in", "0");
- e.addValue(e, "Zoomed out", "1");
- e.addValue(e, "Always zoomed", "2");
- e.addValue(e, "Never zoomed", "3");
+ e.addValue(e, _("Zoomed in"), "0");
+ e.addValue(e, _("Zoomed out"), "1");
+ e.addValue(e, _("Always zoomed"), "2");
+ e.addValue(e, _("Never zoomed"), "3");
e.configureXonoticTextSliderValues(e);
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDScoreDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDScoreDialog, fill, void(entity))
- ATTRIB(XonoticHUDScoreDialog, title, string, "Score Panel")
+ ATTRIB(XonoticHUDScoreDialog, title, string, _("Score Panel"))
ATTRIB(XonoticHUDScoreDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDScoreDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDScoreDialog, rows, float, 15)
{
entity e;
string panelname = "score";
- float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_score", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDTimerDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDTimerDialog, fill, void(entity))
- ATTRIB(XonoticHUDTimerDialog, title, string, "Timer Panel")
+ ATTRIB(XonoticHUDTimerDialog, title, string, _("Timer Panel"))
ATTRIB(XonoticHUDTimerDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDTimerDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDTimerDialog, rows, float, 15)
{
entity e;
string panelname = "timer";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_timer", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Timer:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Timer:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", "Show elapsed time"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_timer_increment", _("Show elapsed time")));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDVoteDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDVoteDialog, fill, void(entity))
- ATTRIB(XonoticHUDVoteDialog, title, string, "Vote Panel")
+ ATTRIB(XonoticHUDVoteDialog, title, string, _("Vote Panel"))
ATTRIB(XonoticHUDVoteDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDVoteDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDVoteDialog, rows, float, 15)
{
entity e;
string panelname = "vote";
- float i;
+
+ DIALOG_HUDPANEL_COMMON();
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_vote", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Alpha after voting:"));
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Alpha after voting:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_vote_alreadyvoted_alpha"));
}
#endif
#ifdef INTERFACE
CLASS(XonoticHUDWeaponsDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDWeaponsDialog, fill, void(entity))
- ATTRIB(XonoticHUDWeaponsDialog, title, string, "Weapons Panel")
+ ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel"))
ATTRIB(XonoticHUDWeaponsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDWeaponsDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDWeaponsDialog, rows, float, 17)
string panelname = "weapons";
float i;
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_weapons", "Enable panel"));
- me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
- me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
- me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
- setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", cvar_string("hud_panel_bg_color"), strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
- e.addValue(e, "Default", "");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team Color:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
- e.addValue(e, "Default", "");
- e.addValue(e, "Disable", "0");
- for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
- me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
- e.addValue(e, "Default", "");
- for(i = 0; i <= 10; ++i)
- e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
- e.configureXonoticTextSliderValues(e);
+ DIALOG_HUDPANEL_COMMON();
+
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Fade out after:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Fade out after:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_timeout"))));
- e.addValue(e, "Never", "0");
+ e.addValue(e, _("Never"), "0");
for(i = 1; i <= 10; ++i)
- e.addValue(e, strzone(strcat(ftos_decimals(i, 0), "s")), strzone(ftos(i)));
+ e.addValue(e, strzone(sprintf(_("%ds"), i)), strzone(ftos(i)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Fade effect:"));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "0", "None"));
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade effect:")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "0", _("None")));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "1", "Slide"));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "1", _("Slide")));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "2", "Alpha"));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "2", _("Alpha")));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Weapon icons:"));
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Weapon icons:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Show weapon ID as:"));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", "None"));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", "Number"));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", "Bind"));
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Show weapon ID as:")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", _("None")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", _("Number")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", _("Bind")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_weapons_accuracy", "Show Accuracy"));
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_weapons_ammo", "Show Ammo"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_weapons_accuracy", _("Show Accuracy")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_weapons_ammo", _("Show Ammo")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Ammo bar color:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Ammo bar color:")));
me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
setDependent(e, "hud_panel_weapons_ammo", 1, 1);
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Ammo bar alpha:"));
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Ammo bar alpha:")));
me.TD(me, 1, 2.6, e = makeXonoticSlider(0.1, 1, 0.1, "hud_panel_weapons_ammo_alpha"));
setDependent(e, "hud_panel_weapons_ammo", 1, 1);
}
#ifdef INTERFACE
CLASS(XonoticHUDExitDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDExitDialog, fill, void(entity))
- ATTRIB(XonoticHUDExitDialog, title, string, "Panel HUD Setup")
+ ATTRIB(XonoticHUDExitDialog, title, string, _("Panel HUD Setup"))
ATTRIB(XonoticHUDExitDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDExitDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticHUDExitDialog, rows, float, 18)
float i;
me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Panel background defaults:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Panel background defaults:")));
me.TR(me);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "Background:"));
me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_bg"))));
- e.addValue(e, "Disable", "0");
- e.addValue(e, "border_default", "border_default");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, "border_default", "border_default"); // this is a file name!
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color", "hud_panel_bg_color"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_border"));
- e.addValue(e, "Disable", "0");
+ e.addValue(e, _("Disable"), "0");
for(i = 1; i <= 10; ++i)
e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_alpha"));
for(i = 1; i <= 10; ++i)
e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team color:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team color:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_color_team"));
- e.addValue(e, "Disable", "0");
+ e.addValue(e, _("Disable"), "0");
for(i = 1; i <= 10; ++i)
e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Padding:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_panel_bg_padding"));
for(i = 0; i <= 10; ++i)
e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, "HUD Dock:"));
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("HUD Dock:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock"));
- e.addValue(e, "Disable", "0");
- e.addValue(e, "Small", "dock_small");
- e.addValue(e, "Medium", "dock_medium");
- e.addValue(e, "Large", "dock_large");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, _("Small"), "dock_small");
+ e.addValue(e, _("Medium"), "dock_medium");
+ e.addValue(e, _("Large"), "dock_large");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Alpha:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_alpha"));
for(i = 1; i <= 10; ++i)
e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Team color:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team color:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_color_team"));
- e.addValue(e, "Disable", "0");
+ e.addValue(e, _("Disable"), "0");
for(i = 1; i <= 10; ++i)
e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Grid settings:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Grid settings:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_grid", "Snap panels to grid"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_grid", _("Snap panels to grid")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Grid size:"));
- me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, "X:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Grid size:")));
+ me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, _("X:")));
me.TD(me, 1, 1.1, e = makeXonoticTextSlider("hud_configure_grid_xsize"));
for(i = 1; i <= 14; ++i)
e.addValue(e, strzone(ftos_decimals(i/200, 3)), strzone(ftos(i/200)));
e.configureXonoticTextSliderValues(e);
setDependent(e, "hud_configure_grid", 1, 1);
- me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, "Y:"));
+ me.TD(me, 1, 0.2, e = makeXonoticTextLabel(0, _("Y:")));
me.TD(me, 1, 1.1, e = makeXonoticTextSlider("hud_configure_grid_ysize"));
for(i = 1; i <= 14; ++i)
e.addValue(e, strzone(ftos_decimals(i/200, 3)), strzone(ftos(i/200)));
setDependent(e, "hud_configure_grid", 1, 1);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticCommandButton("Exit setup", '0 0 0', "_hud_configure 0", 1));
+ me.TD(me, 1, me.columns, e = makeXonoticCommandButton(_("Exit setup"), '0 0 0', "_hud_configure 0", 1));
}
#endif
#ifdef INTERFACE
CLASS(XonoticMultiplayerDialog) EXTENDS(XonoticDialog)
METHOD(XonoticMultiplayerDialog, fill, void(entity))
- ATTRIB(XonoticMultiplayerDialog, title, string, "Multiplayer")
+ ATTRIB(XonoticMultiplayerDialog, title, string, _("Multiplayer"))
ATTRIB(XonoticMultiplayerDialog, color, vector, SKINCOLOR_DIALOG_MULTIPLAYER)
ATTRIB(XonoticMultiplayerDialog, intendedWidth, float, 0.96)
ATTRIB(XonoticMultiplayerDialog, rows, float, 24)
entity mc, e;
mc = makeXonoticTabController(me.rows - 2);
me.TR(me);
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Servers", makeXonoticServerListTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Servers"), makeXonoticServerListTab()));
setDependentStringNotEqual(e, "_cl_name", "Player");
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Create", makeXonoticServerCreateTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Create"), makeXonoticServerCreateTab()));
setDependentStringNotEqual(e, "_cl_name", "Player");
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Demos", makeXonoticDemoBrowserTab()));
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Player Setup", makeXonoticPlayerSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Player Setup"), makeXonoticPlayerSettingsTab()));
if(cvar_string("_cl_name") == "Player")
e.onClick(e, e.onClickEntity); // lol animation
CLASS(XonoticServerCreateTab) EXTENDS(XonoticTab)
METHOD(XonoticServerCreateTab, fill, void(entity))
METHOD(XonoticServerCreateTab, gameTypeChangeNotify, void(entity))
- ATTRIB(XonoticServerCreateTab, title, string, "Create")
+ ATTRIB(XonoticServerCreateTab, title, string, _("Create"))
ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
ATTRIB(XonoticServerCreateTab, rows, float, 22)
ATTRIB(XonoticServerCreateTab, columns, float, 6.5)
float n;
me.TR(me);
- n = 6;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_dm", "DM"));
- e0 = e;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_lms", "LMS"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_arena", "Arena"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_keepaway", "Keepaway"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_race", "Race"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_cts", "Race CTS"));
- if(e.checked) e0 = NULL;
- me.TR(me);
- n = 9;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_tdm", "TDM"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_ctf", "CTF"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_ca", "CA"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_freezetag", "Freeze Tag"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_domination", "Domination"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_keyhunt", "Key Hunt"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_assault", "Assault"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_onslaught", "Onslaught"));
- if(e.checked) e0 = NULL;
- me.TD(me, 1, me.columns / n, e = makeXonoticGametypeButton(1, "g_nexball", "Nexball"));
- if(e.checked) e0 = NULL;
- if(e0)
- {
- //print("NO CHECK\n");
- e0.setChecked(e0, 1);
- }
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Game type:")));
+ me.TR(me);
+ me.TD(me, 9, 3, e = makeXonoticGametypeList());
+ me.TR(me);
me.TR(me);
me.TR(me);
- me.mapListBox = makeXonoticMapList();
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Map list:"));
- makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
me.TR(me);
- me.TD(me, me.rows - 7, 3, me.mapListBox);
- me.gotoRC(me, me.rows - 3, 0);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 1, e = makeXonoticButton("All", '0 0 0'));
- e.onClick = MapList_All;
- e.onClickEntity = me.mapListBox;
- me.TD(me, 1, 1, e = makeXonoticButton("None", '0 0 0'));
- e.onClick = MapList_None;
- e.onClickEntity = me.mapListBox;
- me.TDempty(me, 0.5);
-
- me.gotoRC(me, 3, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Match settings:"));
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Match settings:")));
me.TR(me);
me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 0.5, "timelimit_override");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, "Time limit:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, _("Time limit:")));
me.TD(me, 1, 2, me.sliderTimelimit);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, "Use map specified default"));
+ me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, _("Use map specified default")));
me.TR(me);
me.sliderFraglimit = makeXonoticSlider(1.0, 2000.0, 5, "fraglimit_override");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, "Point limit:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, _("Point limit:")));
me.checkboxFraglimit = e;
me.TD(me, 1, 2, me.sliderFraglimit);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, "Use map specified default"));
+ me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, _("Use map specified default")));
me.checkboxFraglimitMapinfo = e;
me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Player slots:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player slots:")));
me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Number of bots:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Number of bots:")));
me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Bot skill:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Bot skill:")));
setDependent(e, "bot_number", 0, -1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("skill"));
- e.addValue(e, "Botlike", "0");
- e.addValue(e, "Beginner", "1");
- e.addValue(e, "You will win", "2");
- e.addValue(e, "You can win", "3");
- e.addValue(e, "You might win", "4");
- e.addValue(e, "Advanced", "5");
- e.addValue(e, "Expert", "6");
- e.addValue(e, "Pro", "7");
- e.addValue(e, "Assassin", "8");
- e.addValue(e, "Unhuman", "9");
- e.addValue(e, "Godlike", "10");
+ e.addValue(e, _("Botlike"), "0");
+ e.addValue(e, _("Beginner"), "1");
+ e.addValue(e, _("You will win"), "2");
+ e.addValue(e, _("You can win"), "3");
+ e.addValue(e, _("You might win"), "4");
+ e.addValue(e, _("Advanced"), "5");
+ e.addValue(e, _("Expert"), "6");
+ e.addValue(e, _("Pro"), "7");
+ e.addValue(e, _("Assassin"), "8");
+ e.addValue(e, _("Unhuman"), "9");
+ e.addValue(e, _("Godlike"), "10");
e.configureXonoticTextSliderValues(e);
setDependent(e, "bot_number", 0, -1);
me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Bot names:"));
- me.TD(me, 1, 0.7, e = makeXonoticInputBox(1, "bot_prefix"));
- setDependent(e, "bot_number", 0, -1);
- me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0.5, "Shadow"));
- setDependent(e, "bot_number", 0, -1);
- me.TD(me, 1, 0.7, e = makeXonoticInputBox(1, "bot_suffix"));
- setDependent(e, "bot_number", 0, -1);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Map voting:"));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
- e.addValue(e, "No voting", "0");
- e.addValue(e, "2 choices", "2");
- e.addValue(e, "3 choices", "3");
- e.addValue(e, "4 choices", "4");
- e.addValue(e, "5 choices", "5");
- e.addValue(e, "6 choices", "6");
- e.addValue(e, "7 choices", "7");
- e.addValue(e, "8 choices", "8");
- e.addValue(e, "9 choices", "9");
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0'));
- e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.advancedDialog;
- main.advancedDialog.refilterEntity = me.mapListBox;
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton("Mutators...", '0 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Mutators..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.mutatorsDialog;
main.mutatorsDialog.refilterEntity = me.mapListBox;
me.TD(me, 1, 2, e0 = makeXonoticTextLabel(0, string_null));
e0.textEntity = main.mutatorsDialog;
e0.allowCut = 1;
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.advancedDialog;
+ main.advancedDialog.refilterEntity = me.mapListBox;
+
+ me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
+ me.mapListBox = makeXonoticMapList();
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Map list:")));
+ makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
+ me.TR(me);
+ me.TD(me, me.rows - 4, 3, me.mapListBox);
+ me.gotoRC(me, me.rows - 3, 3.5);
+ me.TDempty(me, 0.25);
+ me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select all"), '0 0 0'));
+ e.onClick = MapList_All;
+ e.onClickEntity = me.mapListBox;
+ me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select none"), '0 0 0'));
+ e.onClick = MapList_None;
+ e.onClickEntity = me.mapListBox;
+ me.TDempty(me, 0.25);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("Start Multiplayer!", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Multiplayer!"), '0 0 0'));
e.onClick = MapList_LoadMap;
e.onClickEntity = me.mapListBox;
me.mapListBox.startButton = e;
l2 = me.checkboxFraglimitMapinfo;
switch(gt)
{
- case MAPINFO_TYPE_CTF: GameType_ConfigureSliders(e, l, l2, "Capture limit:", 1, 20, 1, "capturelimit_override"); break;
- case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, "g_domination_point_limit"); break;
- case MAPINFO_TYPE_KEYHUNT: GameType_ConfigureSliders(e, l, l2, "Point limit:", 200, 1500, 50, "g_keyhunt_point_limit"); break;
- case MAPINFO_TYPE_RUNEMATCH: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, "g_runematch_point_limit"); break;
- case MAPINFO_TYPE_LMS: GameType_ConfigureSliders(e, l, l2, "Lives:", 3, 50, 1, "g_lms_lives_override"); break;
- case MAPINFO_TYPE_RACE: GameType_ConfigureSliders(e, l, l2, "Laps:", 1, 25, 1, "g_race_laps_limit"); break;
- case MAPINFO_TYPE_NEXBALL: GameType_ConfigureSliders(e, l, l2, "Goals:", 1, 50, 1, "g_nexball_goallimit"); break;
- case MAPINFO_TYPE_ASSAULT: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, ""); break;
- case MAPINFO_TYPE_ONSLAUGHT: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, ""); break;
- case MAPINFO_TYPE_CTS: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, ""); break;
- default: GameType_ConfigureSliders(e, l, l2, "Frag limit:", 5, 100, 5, "fraglimit_override"); break;
+ case MAPINFO_TYPE_CTF: GameType_ConfigureSliders(e, l, l2, _("Capture limit:"), 1, 20, 1, "capturelimit_override"); break;
+ case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, "g_domination_point_limit"); break;
+ case MAPINFO_TYPE_KEYHUNT: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 200, 1500, 50, "g_keyhunt_point_limit"); break;
+ case MAPINFO_TYPE_RUNEMATCH: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, "g_runematch_point_limit"); break;
+ case MAPINFO_TYPE_LMS: GameType_ConfigureSliders(e, l, l2, _("Lives:"), 3, 50, 1, "g_lms_lives_override"); break;
+ case MAPINFO_TYPE_RACE: GameType_ConfigureSliders(e, l, l2, _("Laps:"), 1, 25, 1, "g_race_laps_limit"); break;
+ case MAPINFO_TYPE_NEXBALL: GameType_ConfigureSliders(e, l, l2, _("Goals:"), 1, 50, 1, "g_nexball_goallimit"); break;
+ case MAPINFO_TYPE_ASSAULT: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, ""); break;
+ case MAPINFO_TYPE_ONSLAUGHT: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, ""); break;
+ case MAPINFO_TYPE_CTS: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, ""); break;
+ default: GameType_ConfigureSliders(e, l, l2, _("Frag limit:"), 5, 100, 5, "fraglimit_override"); break;
}
me.mapListBox.refilter(me.mapListBox);
}
METHOD(XonoticAdvancedDialog, fill, void(entity))
METHOD(XonoticAdvancedDialog, showNotify, void(entity))
METHOD(XonoticAdvancedDialog, close, void(entity))
- ATTRIB(XonoticAdvancedDialog, title, string, "Advanced server settings")
+ ATTRIB(XonoticAdvancedDialog, title, string, _("Advanced server settings"))
ATTRIB(XonoticAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
ATTRIB(XonoticAdvancedDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticAdvancedDialog, rows, float, 12)
+ ATTRIB(XonoticAdvancedDialog, rows, float, 17)
ATTRIB(XonoticAdvancedDialog, columns, float, 3)
ATTRIB(XonoticAdvancedDialog, refilterEntity, entity, NULL)
ENDCLASS(XonoticAdvancedDialog)
{
entity e;
me.TR(me);
- me.TD(me, 1, 3, makeXonoticTextLabel(0, "Game settings:"));
+ me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Game settings:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", "Allow spectating"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", _("Allow spectating")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Spawn shield:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Spawn shield:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Game speed:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Game speed:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, makeXonoticTextLabel(0, "Teamplay settings:"));
+ me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Teamplay settings:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire scale:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire scale:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
+ me.TR(me);
+ me.TDempty(me, 0.4);
+ me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_friendlyfire_virtual", _("Virtual friendly fire (effect only)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire penalty:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire penalty:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
+ me.TR(me);
+ me.TDempty(me, 0.4);
+ me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_mirrordamage_virtual", _("Virtual penalty (effect only)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Teams:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Teams:")));
me.TD(me, 1, 1.6, e = makeXonoticTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
e.addValue(e, "Default", "0");
e.addValue(e, "2 teams", "2");
e.addValue(e, "3 teams", "3");
e.addValue(e, "4 teams", "4");
e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Map voting:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
+ e.addValue(e, _("No voting"), "0");
+ e.addValue(e, _("2 choices"), "2");
+ e.addValue(e, _("3 choices"), "3");
+ e.addValue(e, _("4 choices"), "4");
+ e.addValue(e, _("5 choices"), "5");
+ e.addValue(e, _("6 choices"), "6");
+ e.addValue(e, _("7 choices"), "7");
+ e.addValue(e, _("8 choices"), "8");
+ e.addValue(e, _("9 choices"), "9");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", _("Simple majority wins vcall")));
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
CLASS(XonoticMapInfoDialog) EXTENDS(XonoticDialog)
METHOD(XonoticMapInfoDialog, fill, void(entity))
METHOD(XonoticMapInfoDialog, loadMapInfo, void(entity, float, entity))
- ATTRIB(XonoticMapInfoDialog, title, string, "Map Information")
+ ATTRIB(XonoticMapInfoDialog, title, string, _("Map Information"))
ATTRIB(XonoticMapInfoDialog, color, vector, SKINCOLOR_DIALOG_MAPINFO)
- ATTRIB(XonoticMapInfoDialog, intendedWidth, float, 0.85)
- ATTRIB(XonoticMapInfoDialog, rows, float, 9)
+ ATTRIB(XonoticMapInfoDialog, intendedWidth, float, 1.0)
+ ATTRIB(XonoticMapInfoDialog, rows, float, 12)
ATTRIB(XonoticMapInfoDialog, columns, float, 10)
ATTRIB(XonoticMapInfoDialog, previewImage, entity, NULL)
ATTRIB(XonoticMapInfoDialog, descriptionLabel, entity, NULL)
ATTRIB(XonoticMapInfoDialog, featuresLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeDeathmatchLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeTDMLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeLMSLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeArenaLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeRuneLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeDominationLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeKeyHuntLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeCTFLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeCALabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeAssaultLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeOnslaughtLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeRaceLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeCTSLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeNexballLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeFreezetagLabel, entity, NULL)
- ATTRIB(XonoticMapInfoDialog, typeKeepawayLabel, entity, NULL)
+ ATTRIBARRAY(XonoticMapInfoDialog, typeLabels, entity, 24)
ATTRIB(XonoticMapInfoDialog, currentMapIndex, float, 0)
ATTRIB(XonoticMapInfoDialog, currentMapBSPName, string, string_null)
me.currentMapTitle = strzone(MapInfo_Map_title);
me.currentMapAuthor = strzone(MapInfo_Map_author);
me.currentMapDescription = strzone(MapInfo_Map_description);
- me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? "Full item placement" : "MinstaGib only");
+ me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? _("Full item placement") : _("MinstaGib only"));
me.currentMapPreviewImage = strzone(strcat("/maps/", MapInfo_Map_bspname));
me.frame.setText(me.frame, me.currentMapBSPName);
me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
me.previewImage.src = me.currentMapPreviewImage;
- me.typeDeathmatchLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH);
- me.typeTDMLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH);
- me.typeLMSLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_LMS);
- me.typeArenaLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ARENA);
- me.typeDominationLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DOMINATION);
- me.typeRuneLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RUNEMATCH);
- me.typeKeyHuntLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEYHUNT);
- me.typeCTFLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTF);
- me.typeCALabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CA);
- me.typeAssaultLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ASSAULT);
- me.typeOnslaughtLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ONSLAUGHT);
- me.typeRaceLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE);
- me.typeCTSLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTS);
- me.typeNexballLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_NEXBALL);
- me.typeFreezetagLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_FREEZETAG);
- me.typeKeepawayLabel.disabled = !(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEEPAWAY);
+ for(i = 0; i < GameType_GetCount(); ++i)
+ {
+ entity e;
+ e = me.(typeLabels[i]);
+ e.disabled = !(MapInfo_Map_supportedGametypes & GameType_GetID(i));
+ }
MapInfo_ClearTemps();
}
void XonoticMapInfoDialog_fill(entity me)
{
entity e;
- float w, wgt;
+ float w, wgt, i, n;
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, me.rows - 2, 3, e = makeXonoticImage(string_null, 4.0/3.0));
me.previewImage = e;
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
w = me.columns - me.currentColumn;
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Title:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Title:")));
me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
e.colorL = SKINCOLOR_MAPLIST_TITLE;
e.allowCut = 1;
me.titleLabel = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Author:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Author:")));
me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
e.colorL = SKINCOLOR_MAPLIST_AUTHOR;
e.allowCut = 1;
me.authorLabel = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Features:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Features:")));
me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.featuresLabel = e;
me.TR(me);
- me.TD(me, 1, w, e = makeXonoticTextLabel(0, "Game types:"));
- me.TR(me); wgt = (w-0.2)/5;
- me.TDempty(me, 0.2);
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "DM"));
- me.typeDeathmatchLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "TDM"));
- me.typeTDMLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "LMS"));
- me.typeLMSLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Arena"));
- me.typeArenaLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Domination"));
- me.typeDominationLabel = e;
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Key Hunt"));
- me.typeKeyHuntLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTF"));
- me.typeCTFLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CA"));
- me.typeCALabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Assault"));
- me.typeAssaultLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Onslaught"));
- me.typeOnslaughtLabel = e;
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Race"));
- me.typeRaceLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTS"));
- me.typeCTSLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Nexball"));
- me.typeNexballLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Freezetag"));
- me.typeFreezetagLabel = e;
- me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Keepaway"));
- me.typeKeepawayLabel = e;
+ me.TD(me, 1, w, e = makeXonoticTextLabel(0, _("Game types:")));
+
+
+ n = ceil(GameType_GetCount() / (me.rows - 6));
+ wgt = (w - 0.2) / n;
+ for(i = 0; i < GameType_GetCount(); ++i)
+ {
+ if(mod(i, n) == 0)
+ {
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ }
+ me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, GameType_GetName(i)));
+ me.(typeLabels[i]) = e;
+ }
me.gotoRC(me, me.rows - 2, 0);
me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, ""));
me.gotoRC(me, me.rows - 1, 0);
me.TDempty(me, 0.5);
- me.TD(me, 1, me.columns - 5.5, e = makeXonoticButton("Close", '0 0 0'));
+ me.TD(me, 1, me.columns - 5.5, e = makeXonoticButton(_("Close"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
- me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton("Play", '0 0 0'));
+ me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton(_("Play"), '0 0 0'));
me.startButton.onClick = MapList_LoadMap;
me.startButton.onClickEntity = NULL; // filled later
}
METHOD(XonoticMutatorsDialog, fill, void(entity))
METHOD(XonoticMutatorsDialog, showNotify, void(entity))
METHOD(XonoticMutatorsDialog, close, void(entity))
- ATTRIB(XonoticMutatorsDialog, title, string, "Mutators")
+ ATTRIB(XonoticMutatorsDialog, title, string, _("Mutators"))
ATTRIB(XonoticMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
ATTRIB(XonoticMutatorsDialog, intendedWidth, float, 0.9)
ATTRIB(XonoticMutatorsDialog, rows, float, 17)
if(s == "0")
return "";
if(s == "all")
- return "All Weapons Arena";
+ return _("All Weapons Arena");
if(s == "most")
- return "Most Weapons Arena";
+ return _("Most Weapons Arena");
if(s == weaponarenastring_cvar)
return weaponarenastring;
if(weaponarenastring)
s = strcat(s, " & ", e.message);
}
}
- s = strcat(substring(s, 3, strlen(s) - 3), " Arena");
+ s = sprintf(_("%s Arena"), substring(s, 3, strlen(s) - 3));
weaponarenastring = strzone(s);
string s;
s = "";
if(cvar("g_dodging"))
- s = strcat(s, ", Dodging");
+ s = strcat(s, ", ", _("Dodging"));
if(cvar("g_minstagib"))
- s = strcat(s, ", MinstaGib");
+ s = strcat(s, ", ", _("MinstaGib"));
if(cvar("g_nix"))
- s = strcat(s, ", NIX");
+ s = strcat(s, ", ", _("NIX"));
if(cvar("g_rocket_flying"))
- s = strcat(s, ", Rocket Flying");
+ s = strcat(s, ", ", _("Rocket Flying"));
if(cvar_string("g_weaponarena") != "0")
s = strcat(s, ", ", WeaponArenaString());
if(cvar("g_start_weapon_laser") == 0)
- s = strcat(s, ", No start weapons");
+ s = strcat(s, ", ", _("No start weapons"));
if(cvar("sv_gravity") < 800)
- s = strcat(s, ", Low gravity");
+ s = strcat(s, ", ", _("Low gravity"));
if(cvar("g_cloaked"))
- s = strcat(s, ", Cloaked");
+ s = strcat(s, ", ", _("Cloaked"));
if(cvar("g_grappling_hook"))
- s = strcat(s, ", Hook");
+ s = strcat(s, ", ", _("Hook"));
if(cvar("g_midair"))
- s = strcat(s, ", Midair");
+ s = strcat(s, ", ", _("Midair"));
if(cvar("g_vampire"))
- s = strcat(s, ", Vampire");
+ s = strcat(s, ", ", _("Vampire"));
if(cvar("g_pinata"))
- s = strcat(s, ", Pinata");
+ s = strcat(s, ", ", _("Pinata"));
if(cvar("g_weapon_stay"))
- s = strcat(s, ", Weapons stay");
+ s = strcat(s, ", ", _("Weapons stay"));
if(cvar("g_bloodloss") > 0)
- s = strcat(s, ", Bloodloss");
+ s = strcat(s, ", ", _("Bloodloss"));
if(cvar("g_jetpack"))
- s = strcat(s, ", Jet pack");
+ s = strcat(s, ", ", _("Jet pack"));
if(s == "")
- return "None";
+ return _("None");
else
return substring(s, 2, strlen(s) - 2);
}
float i, j;
string str, hstr;
me.TR(me);
- me.TD(me, 1, 2, makeXonoticTextLabel(0, "Gameplay mutators:"));
+ me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Gameplay mutators:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_dodging", "Dodging"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_dodging", _("Dodging")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_cloaked", "Cloaked"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_cloaked", _("Cloaked")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_midair", "Midair"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_midair", _("Midair")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_vampire", "Vampire"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_vampire", _("Vampire")));
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticSlider(10, 50, 1, "g_bloodloss");
- me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(0, 1, s, "Blood loss"));
+ me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(0, 1, s, _("Blood loss")));
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 1.8, s);
s = makeXonoticSlider(80, 400, 8, "sv_gravity");
s.valueDigits = 0;
s.valueDisplayMultiplier = 0.125; // show gravity in percent
- me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(800, 1, s, "Low gravity"));
+ me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(800, 1, s, _("Low gravity")));
e.savedValue = 200; // good on silvercity
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 1.8, s);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 2, makeXonoticTextLabel(0, "Weapon & item mutators:"));
+ me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon & item mutators:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_grappling_hook", "Grappling hook"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_grappling_hook", _("Grappling hook")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", "Jet pack"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", _("Jet pack")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", "Rocket Flying"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", _("Rocket Flying")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", "Pinata"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", _("Pinata")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", "Weapons stay"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", _("Weapons stay")));
me.TR(me);
me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Weapon arenas:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Weapon arenas:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, "Regular (no arena)"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, _("Regular (no arena)")));
for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
{
w = get_weaponinfo(i);
}
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "menu_weaponarena_with_laser", "with laser"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "menu_weaponarena_with_laser", _("with laser")));
// hook the draw function to gray it out
e.draw_weaponarena = e.draw;
e.draw = preDrawLaserWeaponArenaLaserButton;
e.saveCvars_weaponarena = e.saveCvars;
e.saveCvars = saveCvarsLaserWeaponArenaLaserButton;
me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Special arenas:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Special arenas:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_minstagib", string_null, "MinstaGib"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_minstagib", string_null, _("MinstaGib")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_nix", string_null, "NIX"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_nix", string_null, _("NIX")));
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "g_nix_with_laser", "with laser"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "g_nix_with_laser", _("with laser")));
setDependent(e, "g_nix", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "most", "Most weapons"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "most", _("Most weapons")));
e.cvarOffValue = "0";
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", "No start weapons"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", _("No start weapons")));
e.cvarOffValue = "-1";
- makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_campingrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba");
+ makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_sniperrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba g_start_weapon_minelayer");
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#ifdef INTERFACE
CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
METHOD(XonoticDemoBrowserTab, fill, void(entity))
- ATTRIB(XonoticDemoBrowserTab, title, string, "Demo")
+ ATTRIB(XonoticDemoBrowserTab, title, string, _("Demo"))
ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
ATTRIB(XonoticDemoBrowserTab, rows, float, 22)
ATTRIB(XonoticDemoBrowserTab, columns, float, 6.5)
entity dlist;
me.TR(me);
- me.TD(me, 1, me.columns, e = makeXonoticCheckBox(0, "cl_autodemo", "Record demos while playing"));
+ me.TD(me, 1, me.columns, e = makeXonoticCheckBox(0, "cl_autodemo", _("Record demos while playing")));
me.TR(me);
dlist = makeXonoticDemoList();
me.TR(me);
- me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:"));
- me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
+ me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0'));
btn.onClick = InputBox_Clear_Click;
me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
e.onChange = DemoList_Filter_Change;
me.TR(me);
me.TD(me, me.rows - 4, me.columns, dlist);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Timedemo", '0 0 0'));
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Timedemo"), '0 0 0'));
e.onClick = TimeDemo_Click;
e.onClickEntity = dlist;
- me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Play", '0 0 0'));
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Play"), '0 0 0'));
e.onClick = StartDemo_Click;
e.onClickEntity = dlist;
}
#ifdef INTERFACE
CLASS(XonoticServerListTab) EXTENDS(XonoticTab)
METHOD(XonoticServerListTab, fill, void(entity))
- ATTRIB(XonoticServerListTab, title, string, "Join")
+ ATTRIB(XonoticServerListTab, title, string, _("Join"))
ATTRIB(XonoticServerListTab, intendedWidth, float, 0.9)
ATTRIB(XonoticServerListTab, rows, float, 22)
ATTRIB(XonoticServerListTab, columns, float, 6.5)
slist = makeXonoticServerList();
me.TR(me);
- me.TD(me, 1, 0.4, e = makeXonoticTextLabel(0, "Filter:"));
- me.TD(me, 1, 0.6, btn = makeXonoticButton("Clear", '0 0 0'));
+ me.TD(me, 1, 0.4, e = makeXonoticTextLabel(0, _("Filter:")));
+ me.TD(me, 1, 0.6, btn = makeXonoticButton(_("Clear"), '0 0 0'));
btn.onClick = InputBox_Clear_Click;
me.TD(me, 1, me.columns - 0.6 * 4 - 0.4, e = makeXonoticInputBox(0, string_null));
e.onChange = ServerList_Filter_Change;
e.onChangeEntity = slist;
btn.onClickEntity = e;
slist.controlledTextbox = e;
- me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", "Empty"));
+ me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", _("Empty")));
slist.filterShowEmpty = e.checked;
e.onClickEntity = slist;
e.onClick = ServerList_ShowEmpty_Click;
- me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", "Full"));
+ me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", _("Full")));
slist.filterShowFull = e.checked;
e.onClickEntity = slist;
e.onClick = ServerList_ShowFull_Click;
- me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "net_slist_pause", "Pause"));
+ me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "net_slist_pause", _("Pause")));
me.TR(me);
me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0'));
me.TD(me, me.rows - 4, me.columns, slist);
me.gotoRC(me, me.rows - 2, 0);
- me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, "Address:"));
+ me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Address:")));
me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
e.onEnter = ServerList_Connect_Click;
e.onEnterEntity = slist;
e.onClick = ServerList_Favorite_Click;
e.onClickEntity = slist;
slist.favoriteButton = e;
- me.TD(me, 1, 1.5, e = makeXonoticButton("Info", '0 0 0'));
+ me.TD(me, 1, 1.5, e = makeXonoticButton(_("Info"), '0 0 0'));
e.onClick = ServerList_Info_Click;
e.onClickEntity = slist;
slist.infoButton = e;
me.TR(me);
- me.TD(me, 1, me.columns, e = makeXonoticButton("Join!", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("Join!"), '0 0 0'));
e.onClick = ServerList_Connect_Click;
e.onClickEntity = slist;
slist.connectButton = e;
CLASS(XonoticServerInfoDialog) EXTENDS(XonoticDialog)
METHOD(XonoticServerInfoDialog, fill, void(entity))
METHOD(XonoticServerInfoDialog, loadServerInfo, void(entity, float))
- ATTRIB(XonoticServerInfoDialog, title, string, "Server Information")
+ ATTRIB(XonoticServerInfoDialog, title, string, _("Server Information"))
ATTRIB(XonoticServerInfoDialog, color, vector, SKINCOLOR_DIALOG_SERVERINFO)
ATTRIB(XonoticServerInfoDialog, intendedWidth, float, 0.68)
ATTRIB(XonoticServerInfoDialog, rows, float, 15)
#ifdef IMPLEMENTATION
void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
{
- float m, pure, j;
- string s, typestr, versionstr, numh, maxp, k, v;
+ float m, pure, j, numh, maxp;
+ string s, typestr, versionstr, k, v;
if(me.currentServerName)
strunzone(me.currentServerName);
me.cnameLabel.setText(me.cnameLabel, me.currentServerCName);
pure = -1;
- typestr = "N/A";
- versionstr = "N/A";
+ typestr = _("N/A");
+ versionstr = _("N/A");
SLIST_FIELD_QCSTATUS = gethostcacheindexforkey("qcstatus");
s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
me.rawPlayerList.setPlayerList(me.rawPlayerList, me.currentServerPlayers);
SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey("numhumans");
- numh = ftos(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i));
+ numh = gethostcachenumber(SLIST_FIELD_NUMHUMANS, i);
SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey("maxplayers");
- maxp = ftos(gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i));
- me.currentServerNumPlayers = strzone(strcat(numh,"/",maxp));
+ maxp = gethostcachenumber(SLIST_FIELD_MAXPLAYERS, i);
+ me.currentServerNumPlayers = strzone(sprintf(_("%d/%d"), numh, maxp));
me.numPlayersLabel.setText(me.numPlayersLabel, me.currentServerNumPlayers);
SLIST_FIELD_NUMBOTS = gethostcacheindexforkey("numbots");
me.currentServerVersion = strzone(versionstr);
me.versionLabel.setText(me.versionLabel, me.currentServerVersion);
- me.currentServerPure = ((pure < 0) ? "N/A" : (pure == 0) ? "Official settings" : sprintf("%d modified settings", pure));
+ me.currentServerPure = ((pure < 0) ? "N/A" : (pure == 0) ? _("Official settings") : sprintf(_("%d modified settings"), pure));
me.currentServerPure = strzone(me.currentServerPure);
me.pureLabel.setText(me.pureLabel, me.currentServerPure);
s = crypto_getidfp(me.currentServerCName);
if not(s)
- s = "N/A";
+ s = _("N/A");
me.currentServerID = strzone(s);
me.idLabel.setText(me.idLabel, me.currentServerID);
s = crypto_getkeyfp(me.currentServerCName);
if not(s)
- s = "N/A";
+ s = _("N/A");
me.currentServerKey = strzone(s);
me.keyLabel.setText(me.keyLabel, me.currentServerKey);
if(s == "")
{
if(cvar("crypto_aeslevel") >= 3)
- me.currentServerEncrypt = "N/A (can't connect)";
+ me.currentServerEncrypt = _("N/A (can't connect)");
else
- me.currentServerEncrypt = "N/A";
+ me.currentServerEncrypt = _("N/A");
}
else switch(stof(substring(s, 0, 1)))
{
case 0:
if(cvar("crypto_aeslevel") >= 3)
- me.currentServerEncrypt = "not supported (can't connect)";
+ me.currentServerEncrypt = _("not supported (can't connect)");
else
- me.currentServerEncrypt = "not supported (won't encrypt)";
+ me.currentServerEncrypt = _("not supported (won't encrypt)");
break;
case 1:
if(cvar("crypto_aeslevel") >= 2)
- me.currentServerEncrypt = "supported (will encrypt)";
+ me.currentServerEncrypt = _("supported (will encrypt)");
else
- me.currentServerEncrypt = "supported (won't encrypt)";
+ me.currentServerEncrypt = _("supported (won't encrypt)");
break;
case 2:
if(cvar("crypto_aeslevel") >= 1)
- me.currentServerEncrypt = "requested (will encrypt)";
+ me.currentServerEncrypt = _("requested (will encrypt)");
else
- me.currentServerEncrypt = "requested (won't encrypt)";
+ me.currentServerEncrypt = _("requested (won't encrypt)");
break;
case 3:
if(cvar("crypto_aeslevel") <= 0)
- me.currentServerEncrypt = "required (can't connect)";
+ me.currentServerEncrypt = _("required (can't connect)");
else
- me.currentServerEncrypt = "required (will encrypt)";
+ me.currentServerEncrypt = _("required (will encrypt)");
break;
}
me.encryptLabel.setText(me.encryptLabel, me.currentServerEncrypt);
me.cnameLabel = e;
me.TR(me);
- me.TD(me, 1, 5.5, e = makeXonoticTextLabel(0, "Players:"));
+ me.TD(me, 1, 5.5, e = makeXonoticTextLabel(0, _("Players:")));
me.TR(me);
me.TD(me, me.rows - 4, 6, e = makeXonoticPlayerList());
me.rawPlayerList = e;
me.gotoRC(me, 1, 6.25); me.setFirstColumn(me, me.currentColumn);
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Type:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Type:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.typeLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Map:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Map:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.mapLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Gameplay:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Gameplay:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.pureLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Players:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Players:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.numPlayersLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Bots:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Bots:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.numBotsLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Mod:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Mod:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.modLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Version:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Version:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.versionLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Ping:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Ping:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.pingLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "CA:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("CA:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.keyLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Key:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Key:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.idLabel = e;
me.TR(me);
- me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, "Encryption:"));
+ me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Encryption:")));
me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.encryptLabel = e;
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns - 6, e = makeXonoticButton("Close", '0 0 0'));
+ me.TD(me, 1, me.columns - 6, e = makeXonoticButton(_("Close"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
- me.TD(me, 1, me.columns - 6, e = makeXonoticButton("Join!", '0 0 0'));
+ me.TD(me, 1, me.columns - 6, e = makeXonoticButton(_("Join!"), '0 0 0'));
e.onClick = Join_Click;
e.onClickEntity = me;
}
CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticPlayerSettingsTab, fill, void(entity))
METHOD(XonoticPlayerSettingsTab, draw, void(entity))
- ATTRIB(XonoticPlayerSettingsTab, title, string, "Player Setup")
+ ATTRIB(XonoticPlayerSettingsTab, title, string, _("Player Setup"))
ATTRIB(XonoticPlayerSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticPlayerSettingsTab, rows, float, 22)
ATTRIB(XonoticPlayerSettingsTab, columns, float, 6.5)
float i, r, m, n;
me.TR(me);
- me.TD(me, 1, 0.5, me.playerNameLabel = makeXonoticTextLabel(0, "Name:"));
+ me.TD(me, 1, 0.5, me.playerNameLabel = makeXonoticTextLabel(0, _("Name:")));
me.playerNameLabelAlpha = me.playerNameLabel.alpha;
me.TD(me, 1, 2.5, label = makeXonoticTextLabel(0, string_null));
label.allowCut = 1;
me.TR(me);
me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name"));
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
- box.maxLength = -63; // negativ means encoded length in bytes
+ box.maxLength = -127; // negative means encoded length in bytes
label.textEntity = box;
me.TR(me);
me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
me.TR(me);
me.gotoRC(me, 8, 0.0);
pms = makeXonoticPlayerModelSelector();
- me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, "Model:"));
+ me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, _("Model:")));
me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0'));
e.onClick = PlayerModelSelector_Prev_Click;
e.onClickEntity = pms;
}
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Field of view:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 1, "fov"));
me.TR(me);
sl = makeXonoticSlider(0.45, 0.75, 0.01, "cl_bobcycle");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "View bobbing:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, _("View bobbing:")));
makeMulti(sl, "cl_bob2cycle");
me.TD(me, 1, 2, sl);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom factor:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom factor:")));
me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
me.TR(me);
sl = makeXonoticSlider(1, 8, 0.5, "cl_zoomspeed");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1, 1, sl, "Zoom speed:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1, 1, sl, _("Zoom speed:")));
me.TD(me, 1, 2, sl);
me.TR(me);
- me.TD(me, 1, 1.5, e = makeXonoticButton("Weapon settings...", '0 0 0'));
+ me.TD(me, 1, 1.5, e = makeXonoticButton(_("Weapon settings..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.weaponsDialog;
me.TD(me, 1, 1.5, e0 = makeXonoticTextLabel(0, string_null));
e0.textEntity = main.weaponsDialog;
e0.allowCut = 1;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair:")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", _("Per weapon")));
me.TR(me);
me.TDempty(me, 0.2);
for(i = 1; i <= 10; ++i) {
}
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair size:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair size:")));
me.TD(me, 1, 1.8, e = makeXonoticSlider(0.10, 1.5, 0.05, "crosshair_size"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair alpha:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair alpha:")));
me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair color:")));
me.TD(me, 2, 1.8, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
setDependent(e, "crosshair_color_per_weapon", 0, 0);
me.TR(me);
me.TDempty(me, 0.3);
- me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", "Per weapon"));
+ me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", _("Per weapon")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable center dot"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center dot")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Size:"));
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Size:")));
me.TD(me, 1, 0.9, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size"));
setDependent(e, "crosshair_dot", 1, 1);
- me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Alpha:"));
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Alpha:")));
me.TD(me, 1, 0.9, e = makeXonoticSlider(0.10, 1, 0.1, "crosshair_dot_alpha"));
setDependent(e, "crosshair_dot", 1, 1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0", "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1", "TrueAim"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1.25", "Enemies"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Hit test:")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0", _("None")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1", _("TrueAim")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1.25", _("Enemies")));
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints setup...", '0 0 0'));
+ me.TD(me, 1, 2.2, e = makeXonoticButton(_("Waypoints setup..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.waypointDialog;
me.TDempty(me, 0.5);
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 2.2, e = makeXonoticButton("Enter HUD editor", '0 0 0'));
+ me.TD(me, 1, 2.2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
e.onClick = HUDSetup_Join_Click;
e.onClickEntity = me;
me.TDempty(me, 0.5);
me.TR(me);
me.TR(me);
#ifdef ALLOW_FORCEMODELS
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force models:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, "All"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, _("None")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, _("Custom")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, _("All")));
#endif
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", "Disable gore effects"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects")));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Gibs:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs"));
- e.addValue(e, "None", "1");
- e.addValue(e, "Few", "0.75");
- e.addValue(e, "Many", "0.5");
- e.addValue(e, "Lots", "0");
+ e.addValue(e, _("None"), "1");
+ e.addValue(e, _("Few"), "0.75");
+ e.addValue(e, _("Many"), "0.5");
+ e.addValue(e, _("Lots"), "0");
e.configureXonoticTextSliderValues(e);
setDependent(e, "cl_gentle", 0, 0);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Damage splash:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Damage splash:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage"));
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromxonotic;sendcvar cl_forceplayermodels;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
+ me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromxonotic;sendcvar cl_forceplayermodels;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
}
void HUDSetup_Join_Click(entity me, entity btn)
{
#ifdef INTERFACE
CLASS(XonoticWaypointDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticWaypointDialog, toString, string(entity))
METHOD(XonoticWaypointDialog, fill, void(entity))
METHOD(XonoticWaypointDialog, showNotify, void(entity))
- ATTRIB(XonoticWaypointDialog, title, string, "Waypoints")
+ ATTRIB(XonoticWaypointDialog, title, string, _("Waypoints"))
ATTRIB(XonoticWaypointDialog, color, vector, SKINCOLOR_DIALOG_RADAR)
ATTRIB(XonoticWaypointDialog, intendedWidth, float, 0.7)
ATTRIB(XonoticWaypointDialog, rows, float, 6)
{
loadAllCvars(me);
}
-string XonoticWaypointDialog_toString(entity me)
-{
- return "XXX";
-}
void XonoticWaypointDialog_fill(entity me)
{
entity e;
me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Waypoint settings:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Waypoint settings:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 3.8, e = makeXonoticCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
+ me.TD(me, 1, 3.8, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Show base waypoints")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint scale:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Waypoint scale:")));
me.TD(me, 1, 3, e = makeXonoticSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
setDependent(e, "cl_hidewaypoints", 0, 0);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint alpha:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Waypoint alpha:")));
me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
setDependent(e, "cl_hidewaypoints", 0, 0);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Show names:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Show names:")));
me.TD(me, 1, 3, e = makeXonoticTextSlider("cl_shownames"));
- e.addValue(e, "Never", "0");
- e.addValue(e, "Teammates", "1");
- e.addValue(e, "All players", "2");
+ e.addValue(e, _("Never"), "0");
+ e.addValue(e, _("Teammates"), "1");
+ e.addValue(e, _("All players"), "2");
e.configureXonoticTextSliderValues(e);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
METHOD(XonoticWeaponsDialog, toString, string(entity))
METHOD(XonoticWeaponsDialog, fill, void(entity))
METHOD(XonoticWeaponsDialog, showNotify, void(entity))
- ATTRIB(XonoticWeaponsDialog, title, string, "Weapon settings")
+ ATTRIB(XonoticWeaponsDialog, title, string, _("Weapon settings"))
ATTRIB(XonoticWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
ATTRIB(XonoticWeaponsDialog, intendedWidth, float, 0.5)
ATTRIB(XonoticWeaponsDialog, rows, float, 17)
entity e;
me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Weapon priority list:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Weapon priority list:")));
me.TR(me);
me.TD(me, 9, 4, e = me.weaponsList = makeXonoticWeaponsList());
me.gotoRC(me, 10, 0);
me.TDempty(me, 1);
- me.TD(me, 1, 1, e = makeXonoticButton("Up", '0 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Up"), '0 0 0'));
e.onClick = WeaponsList_MoveUp_Click;
e.onClickEntity = me.weaponsList;
- me.TD(me, 1, 1, e = makeXonoticButton("Down", '0 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Down"), '0 0 0'));
e.onClick = WeaponsList_MoveDown_Click;
e.onClickEntity = me.weaponsList;
me.gotoRC(me, 11, 0);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", _("Auto switch weapons on pickup")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", "Draw 1st person weapon model"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_gunalign", "4", "Left align"));
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align")));
setDependent(e, "r_drawviewmodel", 1, 1);
- me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_gunalign", "3", "Right align"));
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align")));
setDependent(e, "r_drawviewmodel", 1, 1);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_flipped", "Flip view horizontally"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_flipped", _("Flip view horizontally")));
me.TR(me);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#ifdef INTERFACE
CLASS(XonoticNewsDialog) EXTENDS(XonoticDialog)
METHOD(XonoticNewsDialog, fill, void(entity))
- ATTRIB(XonoticNewsDialog, title, string, "News")
+ ATTRIB(XonoticNewsDialog, title, string, _("News"))
ATTRIB(XonoticNewsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
ATTRIB(XonoticNewsDialog, intendedWidth, float, 0.96)
ATTRIB(XonoticNewsDialog, rows, float, 24)
entity e;
me.TR(me);
me.TD(me, 24, 1, e = spawnGecko());
- e.configureBrowser( e, "http://alientrap.org/xonotic/index.php?module=news" );
+ e.configureBrowser( e, _("http://www.xonotic.org/team/blog/") );
}
#endif
#ifdef INTERFACE
CLASS(XonoticQuitDialog) EXTENDS(XonoticDialog)
METHOD(XonoticQuitDialog, fill, void(entity))
- ATTRIB(XonoticQuitDialog, title, string, "Quit")
+ ATTRIB(XonoticQuitDialog, title, string, _("Quit"))
ATTRIB(XonoticQuitDialog, color, vector, SKINCOLOR_DIALOG_QUIT)
ATTRIB(XonoticQuitDialog, intendedWidth, float, 0.5)
ATTRIB(XonoticQuitDialog, rows, float, 3)
{
entity e;
me.TR(me);
- me.TD(me, 1, 2, makeXonoticTextLabel(0.5, "Are you sure you want to quit?"));
+ me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Are you sure you want to quit?")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCommandButton("Yes", '1 0 0', "quit", 0));
- me.TD(me, 1, 1, e = makeXonoticButton("No", '0 1 0'));
+ me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "quit", 0));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#ifdef INTERFACE
CLASS(XonoticSettingsDialog) EXTENDS(XonoticDialog)
METHOD(XonoticSettingsDialog, fill, void(entity))
- ATTRIB(XonoticSettingsDialog, title, string, "Settings")
+ ATTRIB(XonoticSettingsDialog, title, string, _("Settings"))
ATTRIB(XonoticSettingsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
ATTRIB(XonoticSettingsDialog, intendedWidth, float, 0.96)
ATTRIB(XonoticSettingsDialog, rows, float, 19)
entity mc;
mc = makeXonoticTabController(me.rows - 2);
me.TR(me);
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Input", makeXonoticInputSettingsTab()));
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Video", makeXonoticVideoSettingsTab()));
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Effects", makeXonoticEffectsSettingsTab()));
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Audio", makeXonoticAudioSettingsTab()));
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Network", makeXonoticNetworkSettingsTab()));
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Misc", makeXonoticMiscSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Input"), makeXonoticInputSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Video"), makeXonoticVideoSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Effects"), makeXonoticEffectsSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Audio"), makeXonoticAudioSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Network"), makeXonoticNetworkSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Misc"), makeXonoticMiscSettingsTab()));
me.TR(me);
me.TR(me);
me.TD(me, me.rows - 2, me.columns, mc);
#ifdef INTERFACE
CLASS(XonoticAudioSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticAudioSettingsTab, fill, void(entity))
- ATTRIB(XonoticAudioSettingsTab, title, string, "Audio")
+ ATTRIB(XonoticAudioSettingsTab, title, string, _("Audio"))
ATTRIB(XonoticAudioSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticAudioSettingsTab, rows, float, 17)
ATTRIB(XonoticAudioSettingsTab, columns, float, 6.5)
me.TR(me);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "mastervolume");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Master:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Master:")));
me.TD(me, 1, 2, s);
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "bgmvolume");
makeMulti(s, "snd_csqcchannel2volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Music:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Music:")));
me.TD(me, 1, 2, s);
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_staticvolume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Ambient:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Ambient:")));
makeMulti(s, "snd_entchannel2volume");
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
- setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(e, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_worldchannel0volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Info:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Info:")));
makeMulti(s, "snd_csqcchannel0volume");
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
- setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(e, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel3volume");
makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume snd_csqcchannel3volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Items:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Items:")));
me.TD(me, 1, 2, s);
- setDependentStringNotEqual(e, "volume", "0");
setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(e, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel6volume");
makeMulti(s, "snd_csqcchannel6volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Pain:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Pain:")));
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
- setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(e, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel7volume");
makeMulti(s, "snd_entchannel7volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Player:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Player:")));
me.TD(me, 1, 2, s);
- setDependentStringNotEqual(e, "volume", "0");
setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(e, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel4volume");
makeMulti(s, "snd_playerchannel4volume snd_entchannel6volume snd_csqcchannel4volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Shots:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Shots:")));
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
- setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(s, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel2volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Voice:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Voice:")));
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
- setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(s, "mastervolume", "0");
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel1volume");
makeMulti(s, "snd_playerchannel5volume snd_entchannel1volume snd_entchannel5volume");
- me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Weapons:"));
+ me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Weapons:")));
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
- setDependentStringNotEqual(s, "volume", "0");
+ setDependentStringNotEqual(s, "mastervolume", "0");
me.TR(me);
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Frequency:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Frequency:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
- e.addValue(e, "8 kHz", "8000");
- e.addValue(e, "11.025 kHz", "11025");
- e.addValue(e, "16 kHz", "16000");
- e.addValue(e, "22.05 kHz", "22050");
- e.addValue(e, "24 kHz", "24000");
- e.addValue(e, "32 kHz", "32000");
- e.addValue(e, "44.1 kHz", "44100");
- e.addValue(e, "48 kHz", "48000");
+ e.addValue(e, _("8 kHz"), "8000");
+ e.addValue(e, _("11.025 kHz"), "11025");
+ e.addValue(e, _("16 kHz"), "16000");
+ e.addValue(e, _("22.05 kHz"), "22050");
+ e.addValue(e, _("24 kHz"), "24000");
+ e.addValue(e, _("32 kHz"), "32000");
+ e.addValue(e, _("44.1 kHz"), "44100");
+ e.addValue(e, _("48 kHz"), "48000");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Channels:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Channels:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
- e.addValue(e, "Mono", "1");
- e.addValue(e, "Stereo", "2");
- e.addValue(e, "2.1", "3");
- e.addValue(e, "3.1", "4");
- e.addValue(e, "4.1", "5");
- e.addValue(e, "5.1", "6");
- e.addValue(e, "6.1", "7");
- e.addValue(e, "7.1", "8");
+ e.addValue(e, _("Mono"), "1");
+ e.addValue(e, _("Stereo"), "2");
+ e.addValue(e, _("2.1"), "3");
+ e.addValue(e, _("4"), "4");
+ e.addValue(e, _("5"), "5");
+ e.addValue(e, _("5.1"), "6");
+ e.addValue(e, _("6.1"), "7");
+ e.addValue(e, _("7.1"), "8");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_swapstereo", "Swap Stereo"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_swapstereo", _("Swap Stereo")));
setDependent(e, "snd_channels", 1.5, 0.5);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", "Headphone friendly mode"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
setDependent(e, "snd_channels", 1.5, 0.5);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Spatial voices:"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", "None"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", "Taunts"));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", "All"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Spatial voices:")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", _("None")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", _("Taunts")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", _("All")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Taunt range:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Taunt range:")));
setDependent(e, "cl_voice_directional", 0.5, -0.5);
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
- e.addValue(e, "Very short", "3");
- e.addValue(e, "Short", "2");
- e.addValue(e, "Normal", "0.5");
- e.addValue(e, "Long", "0.25");
- e.addValue(e, "Full", "0.015625");
+ e.addValue(e, _("Very short"), "3");
+ e.addValue(e, _("Short"), "2");
+ e.addValue(e, _("Normal"), "0.5");
+ e.addValue(e, _("Long"), "0.25");
+ e.addValue(e, _("Full"), "0.015625");
e.configureXonoticTextSliderValues(e);
setDependent(e, "cl_voice_directional", 0.5, -0.5);
me.TR(me);
sl = makeXonoticSlider(0.15, 1, 0.05, "cl_autotaunt");
sl.valueDisplayMultiplier = 100;
sl.valueDigits = 0;
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "Automatic taunts"));
+ me.TD(me, 1, 3, e = makeXonoticSliderCheckBox(0, 1, sl, _("Automatic taunts")));
if(sl.value != e.savedValue)
e.savedValue = 0.65; // default
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Frequency:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Frequency:")));
me.TD(me, 1, 2, sl);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Time warning:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time warning:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_sound_maptime_warning"));
- e.addValue(e, "None", "0");
- e.addValue(e, "1 minute", "1");
- e.addValue(e, "5 minutes", "2");
- e.addValue(e, "Both", "3");
+ e.addValue(e, _("None"), "0");
+ e.addValue(e, _("1 minute"), "1");
+ e.addValue(e, _("5 minutes"), "2");
+ e.addValue(e, _("Both"), "3");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", "Hit indicator"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", _("Hit indicator")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", "Menu sounds"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "snd_restart; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
+ me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
}
#endif
#ifdef INTERFACE
CLASS(XonoticEffectsSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticEffectsSettingsTab, fill, void(entity))
- ATTRIB(XonoticEffectsSettingsTab, title, string, "Effects")
+ ATTRIB(XonoticEffectsSettingsTab, title, string, _("Effects"))
ATTRIB(XonoticEffectsSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticEffectsSettingsTab, rows, float, 17)
ATTRIB(XonoticEffectsSettingsTab, columns, float, 6.5)
entity e, s;
float n;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Quality preset:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Quality preset:")));
n = 5 + 2 * !!cvar("developer");
if(cvar("developer"))
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("OMG!", '1 0 1', "exec effects-omg.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Low", '0 0 0', "exec effects-low.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Medium", '0 0 0', "exec effects-med.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Normal", '0 0 0', "exec effects-normal.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("High", '0 0 0', "exec effects-high.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Ultra", '0 0 0', "exec effects-ultra.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("OMG!"), '1 0 1', "exec effects-omg.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Low"), '0 0 0', "exec effects-low.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Medium"), '0 0 0', "exec effects-med.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Normal"), '0 0 0', "exec effects-normal.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("High"), '0 0 0', "exec effects-high.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Ultra"), '0 0 0', "exec effects-ultra.cfg", 0));
if(cvar("developer"))
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton("Ultimate", '0 0 0', "exec effects-ultimate.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Ultimate"), '0 0 0', "exec effects-ultimate.cfg", 0));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Geometry detail:"));
+ me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Geometry detail:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_subdivisions_tolerance"));
- e.addValue(e, "Lowest", "16");
- e.addValue(e, "Low", "8");
- e.addValue(e, "Normal", "4");
- e.addValue(e, "Good", "3");
- e.addValue(e, "Best", "2");
- e.addValue(e, "Insane", "1");
+ e.addValue(e, _("Lowest"), "16");
+ e.addValue(e, _("Low"), "8");
+ e.addValue(e, _("Normal"), "4");
+ e.addValue(e, _("Good"), "3");
+ e.addValue(e, _("Best"), "2");
+ e.addValue(e, _("Insane"), "1");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Antialiasing:"));
+ me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Antialiasing:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_samples"));
- e.addValue(e, "Disabled", "1");
- e.addValue(e, "2x", "2");
- e.addValue(e, "4x", "4");
+ e.addValue(e, _("Disabled"), "1");
+ e.addValue(e, _("2x"), "2");
+ e.addValue(e, _("4x"), "4");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Texture resolution:"));
+ me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Texture resolution:")));
me.TD(me, 1, 2, e = makeXonoticPicmipSlider());
if(cvar("developer"))
- e.addValue(e, "Leet", "1337");
- e.addValue(e, "Lowest", "2");
- e.addValue(e, "Low", "1");
- e.addValue(e, "Normal", "0");
- e.addValue(e, "Good", "-1");
- e.addValue(e, "Best", "-2");
+ e.addValue(e, _("Leet"), "1337");
+ e.addValue(e, _("Lowest"), "2");
+ e.addValue(e, _("Low"), "1");
+ e.addValue(e, _("Normal"), "0");
+ e.addValue(e, _("Good"), "-1");
+ e.addValue(e, _("Best"), "-2");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
case 0:
break;
case 1:
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", "Avoid lossy texture compression"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression")));
break;
case 2:
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", "Avoid lossy texture compression"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(1, "r_texture_dds_load", _("Avoid lossy texture compression")));
makeMulti(e, "gl_texturecompression");
break;
}
}
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Anisotropy:"));
+ me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_texture_anisotropy"));
- e.addValue(e, "Disabled", "1");
- e.addValue(e, "2x", "2");
- e.addValue(e, "4x", "4");
- e.addValue(e, "8x", "8");
- e.addValue(e, "16x", "16");
+ e.addValue(e, _("Disabled"), "1");
+ e.addValue(e, _("2x"), "2");
+ e.addValue(e, _("4x"), "4");
+ e.addValue(e, _("8x"), "8");
+ e.addValue(e, _("16x"), "16");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Particle quality:"));
+ me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Particle quality:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 1.0, 0.1, "cl_particles_quality"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Particle dist.:"));
+ me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Particle distance:")));
me.TD(me, 1, 2, e = makeXonoticSlider(500, 2000, 100, "r_drawparticles_drawdistance"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_decals", "Decals"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_decals", _("Decals")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Distance:"));
+ me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Distance:")));
setDependent(e, "cl_decals", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance"));
setDependent(e, "cl_decals", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Time:"));
+ me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Time:")));
setDependent(e, "cl_decals", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_time"));
setDependent(e, "cl_decals", 1, 1);
me.gotoRC(me, 2, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", "Use lightmaps"));
- me.TD(me, 1, 1.9, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", "Deluxe mapping"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", _("Use lightmaps")));
+ me.TD(me, 1, 1.9, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", _("Deluxe mapping")));
setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0);
- me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "r_shadow_gloss", "Gloss"));
+ me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "r_shadow_gloss", _("Gloss")));
setDependentAND3(e, "vid_gl20", 1, 1, "r_glsl_deluxemapping", 1, 2, "mod_q3bsp_nolightmaps", 0, 0);
me.TR(me);
- me.TD(me, 1, 1.5, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", "Offset mapping"));
+ me.TD(me, 1, 1.5, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", _("Offset mapping")));
setDependent(e, "vid_gl20", 1, 1);
- me.TD(me, 1, 1.9, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", "Relief mapping"));
+ me.TD(me, 1, 1.9, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping")));
setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", "Reflections:"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", _("Reflections:")));
setDependent(e, "vid_gl20", 1, 1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_water_resolutionmultiplier"));
- e.addValue(e, "Blurred", "0.25");
- e.addValue(e, "Good", "0.5");
- e.addValue(e, "Sharp", "1");
+ e.addValue(e, _("Blurred"), "0.25");
+ e.addValue(e, _("Good"), "0.5");
+ e.addValue(e, _("Sharp"), "1");
e.configureXonoticTextSliderValues(e);
setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
me.TR(me);
if(cvar("developer"))
- me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", "Show surfaces"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", _("Show surfaces")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(1, string_null, string_null, "No dynamic lighting"));
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(1, string_null, string_null, _("No dynamic lighting")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "gl_flashblend", string_null, "Flash blend approximation"));
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "gl_flashblend", string_null, _("Flash blend approximation")));
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "r_shadow_realtime_dlight", string_null, "Realtime dynamic lighting"));
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_dlight_shadows", "Shadows"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "r_shadow_realtime_dlight", string_null, _("Realtime dynamic lighting")));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_dlight_shadows", _("Shadows")));
setDependent(e, "r_shadow_realtime_dlight", 1, 1);
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_shadow_realtime_world", "Realtime world lighting"));
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_world_shadows", "Shadows"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_shadow_realtime_world", _("Realtime world lighting")));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_world_shadows", _("Shadows")));
setDependent(e, "r_shadow_realtime_world", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_shadow_usenormalmap", "Use normal maps"));
+ me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_shadow_usenormalmap", _("Use normal maps")));
setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", "Soft shadows"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", _("Soft shadows")));
setDependentWeird(e, someShadowCvarIsEnabled);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_coronas", "Coronas"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_coronas", _("Coronas")));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_bloom", "Bloom"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_bloom", _("Bloom")));
setDependent(e, "r_hdr", 0, 0);
- me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "r_hdr", "High Dynamic Range (HDR)"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "r_hdr", _("High Dynamic Range (HDR)")));
me.TR(me);
s = makeXonoticSlider(0.1, 1, 0.1, "r_motionblur");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, "Motion blur:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, _("Motion blur:")));
if(s.value != e.savedValue)
e.savedValue = 0.5; // default
me.TD(me, 1, 2, s);
me.TR(me);
s = makeXonoticSlider(0.1, 1, 0.1, "r_damageblur");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, "Damage blur:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, _("Damage blur:")));
if(s.value != e.savedValue)
e.savedValue = 0.4; // default
me.TD(me, 1, 2, s);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
+ me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
}
#endif
#ifdef INTERFACE
CLASS(XonoticInputSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticInputSettingsTab, fill, void(entity))
- ATTRIB(XonoticInputSettingsTab, title, string, "Input")
+ ATTRIB(XonoticInputSettingsTab, title, string, _("Input"))
ATTRIB(XonoticInputSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticInputSettingsTab, rows, float, 17)
ATTRIB(XonoticInputSettingsTab, columns, float, 6.5)
entity kb;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Key bindings:"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Key bindings:")));
me.TR(me);
me.TD(me, me.rows - 2, 3.3, kb = makeXonoticKeyBinder());
me.gotoRC(me, me.rows - 1, 0);
me.TR(me);
- me.TD(me, 1, 1.1, e = makeXonoticButton("Change key...", '0 0 0'));
+ me.TD(me, 1, 1.1, e = makeXonoticButton(_("Change key..."), '0 0 0'));
e.onClick = KeyBinder_Bind_Change;
e.onClickEntity = kb;
kb.keyGrabButton = e;
- me.TD(me, 1, 1.1, e = makeXonoticButton("Edit...", '0 0 0'));
+ me.TD(me, 1, 1.1, e = makeXonoticButton(_("Edit..."), '0 0 0'));
e.onClick = KeyBinder_Bind_Edit;
e.onClickEntity = kb;
kb.userbindEditButton = e;
kb.userbindEditDialog = main.userbindEditDialog;
main.userbindEditDialog.keybindBox = kb;
- me.TD(me, 1, 1.1, e = makeXonoticButton("Clear", '0 0 0'));
+ me.TD(me, 1, 1.1, e = makeXonoticButton(_("Clear"), '0 0 0'));
e.onClick = KeyBinder_Bind_Clear;
e.onClickEntity = kb;
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Sensitivity:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:")));
me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "UI mouse speed:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("UI mouse speed:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 4.0, 0.1, "menu_mouse_speed"));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", "Mouse filter"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", _("Mouse filter")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", "Invert mouse"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert mouse")));
me.TR(me);
if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE)
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", "Use joystick input"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input")));
else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE)
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", "Use joystick input"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input")));
me.TR(me);
if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE)
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", "Turn off OS mouse acceleration"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Turn off OS mouse acceleration")));
else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE)
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", "Turn off OS mouse acceleration"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Turn off OS mouse acceleration")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", "\"enter console\" also closes"));
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Show binds:"));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("sbar_showbinds"));
- e.addValue(e, "Actions", "0");
- e.addValue(e, "Bound keys", "1");
- e.addValue(e, "Both", "2");
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "cl_showpressedkeys", "Show pressed keys"));
}
#endif
CLASS(XonoticUserbindEditDialog) EXTENDS(XonoticDialog)
METHOD(XonoticUserbindEditDialog, loadUserBind, void(entity, string, string, string))
METHOD(XonoticUserbindEditDialog, fill, void(entity))
- ATTRIB(XonoticUserbindEditDialog, title, string, "User defined key bind")
+ ATTRIB(XonoticUserbindEditDialog, title, string, _("User defined key bind"))
ATTRIB(XonoticUserbindEditDialog, color, vector, SKINCOLOR_DIALOG_USERBIND)
ATTRIB(XonoticUserbindEditDialog, intendedWidth, float, 0.7)
ATTRIB(XonoticUserbindEditDialog, rows, float, 4)
{
entity e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Name:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Name:")));
me.TD(me, 1, me.columns - 1, me.nameBox = makeXonoticInputBox(0, string_null));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Command when pressed:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Command when pressed:")));
me.TD(me, 1, me.columns - 1, me.commandPressBox = makeXonoticInputBox(0, string_null));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Command when released:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Command when released:")));
me.TD(me, 1, me.columns - 1, me.commandReleaseBox = makeXonoticInputBox(0, string_null));
me.TR(me);
- me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Save", '0 0 0'));
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Save"), '0 0 0'));
e.onClick = XonoticUserbindEditDialog_Save;
e.onClickEntity = me;
- me.TD(me, 1, me.columns / 2, e = makeXonoticButton("Cancel", '0 0 0'));
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Cancel"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#ifdef INTERFACE
CLASS(XonoticMiscSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticMiscSettingsTab, fill, void(entity))
- ATTRIB(XonoticMiscSettingsTab, title, string, "Misc")
+ ATTRIB(XonoticMiscSettingsTab, title, string, _("Misc"))
ATTRIB(XonoticMiscSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticMiscSettingsTab, rows, float, 17)
ATTRIB(XonoticMiscSettingsTab, columns, float, 6.5)
entity sk;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Menu skins:"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Menu skins:")));
me.TR(me);
me.TD(me, me.rows - 2, 3, sk = makeXonoticSkinList());
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, 3, e = makeXonoticButton("Apply immediately", '0 0 0'));
+ me.TD(me, 1, 3, e = makeXonoticButton(_("Apply immediately"), '0 0 0'));
e.onClick = SetSkin_Click;
e.onClickEntity = sk;
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", "Show current time"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current time")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showdate", "Show current date"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showdate", _("Show current date")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", "Show frames per second"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showspeed", "Speedometer"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showspeed", _("Speedometer")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "0", "qu/s (hidden)"));
+ me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "0", _("qu/s (hidden)")));
setDependent(e, "cl_showspeed", 1, 1);
- me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "1", "qu/s"));
+ me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "1", _("qu/s")));
setDependent(e, "cl_showspeed", 1, 1);
- me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "2", "m/s"));
+ me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "2", _("m/s")));
setDependent(e, "cl_showspeed", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "3", "km/h"));
+ me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "3", _("km/h")));
setDependent(e, "cl_showspeed", 1, 1);
- me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "4", "mph"));
+ me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "4", _("mph")));
setDependent(e, "cl_showspeed", 1, 1);
- me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "5", "knots"));
+ me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "5", _("knots")));
setDependent(e, "cl_showspeed", 1, 1);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showacceleration", "Show accelerometer"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showacceleration", _("Show accelerometer")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8/2, e = makeXonoticTextLabel(0, "Accelerometer scale:"));
+ me.TD(me, 1, 2.8/2, e = makeXonoticTextLabel(0, _("Accelerometer scale:")));
setDependent(e, "cl_showacceleration", 1, 1);
me.TD(me, 1, 2.8/2, e = makeXonoticSlider(0.2, 2, 0.2, "cl_showacceleration_scale"));
setDependent(e, "cl_showacceleration", 1, 1);
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", "Minimize input latency"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", _("Minimize input latency")));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0'));
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.cvarsDialog;
}
#ifdef INTERFACE
CLASS(XonoticCvarsDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticCvarsDialog, toString, string(entity))
METHOD(XonoticCvarsDialog, fill, void(entity))
METHOD(XonoticCvarsDialog, showNotify, void(entity))
- ATTRIB(XonoticCvarsDialog, title, string, "Advanced settings")
+ ATTRIB(XonoticCvarsDialog, title, string, _("Advanced settings"))
ATTRIB(XonoticCvarsDialog, color, vector, SKINCOLOR_DIALOG_CVARS)
ATTRIB(XonoticCvarsDialog, intendedWidth, float, 0.8)
ATTRIB(XonoticCvarsDialog, rows, float, 25)
{
loadAllCvars(me);
}
-string XonoticCvarsDialog_toString(entity me)
-{
- return "XXX";
-}
void XonoticCvarsDialog_fill(entity me)
{
entity e, cvarlist, btn;
cvarlist = makeXonoticCvarList();
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Cvar filter:"));
- me.TD(me, 1, 0.5, btn = makeXonoticButton("Clear", '0 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
+ me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0'));
me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
e.onChange = CvarList_Filter_Change;
e.onChangeEntity = cvarlist;
me.TR(me);
me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
me.gotoRC(me, me.rows - 7, 0);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Setting:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:")));
me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
cvarlist.cvarNameBox = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Type:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:")));
me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
cvarlist.cvarTypeBox = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Value:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:")));
me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null));
cvarlist.cvarValueBox = e;
e.onChange = CvarList_Value_Change;
e.allowCut = 1;
e.marginLeft = e.marginRight = 0.5;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Description:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:")));
me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null));
cvarlist.cvarDescriptionBox = e;
e.allowWrap = 1;
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#ifdef INTERFACE
CLASS(XonoticNetworkSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticNetworkSettingsTab, fill, void(entity))
- ATTRIB(XonoticNetworkSettingsTab, title, string, "Network")
+ ATTRIB(XonoticNetworkSettingsTab, title, string, _("Network"))
ATTRIB(XonoticNetworkSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticNetworkSettingsTab, rows, float, 17)
ATTRIB(XonoticNetworkSettingsTab, columns, float, 6.5)
entity e;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", "Client-side movement prediction"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction")));
me.TR(me);
- //me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_nolerp", "Network update smoothing"));
+ //me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_nolerp", _("Network update smoothing")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "shownetgraph", "Show netgraph"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "shownetgraph", _("Show netgraph")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Network speed:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Network speed:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_rate"));
- e.addValue(e, "56k", "4000");
- e.addValue(e, "ISDN", "7000");
- e.addValue(e, "Slow ADSL", "15000");
- e.addValue(e, "Fast ADSL", "20000");
- e.addValue(e, "Broadband", "66666");
+ e.addValue(e, _("56k"), "4000");
+ e.addValue(e, _("ISDN"), "7000");
+ e.addValue(e, _("Slow ADSL"), "15000");
+ e.addValue(e, _("Fast ADSL"), "20000");
+ e.addValue(e, _("Broadband"), "66666");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Input packets/s:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:")));
me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 1, "cl_netfps"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "HTTP downloads:"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("HTTP downloads:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Downloads:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Downloads:")));
me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "cl_curl_maxdownloads"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Speed (kB/s):"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed (kB/s):")));
me.TD(me, 1, 2, e = makeXonoticSlider(10, 1500, 10, "cl_curl_maxspeed"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Client UDP port:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Client UDP port:")));
me.TD(me, 1, 0.64, e = makeXonoticInputBox(0, "cl_port"));
}
#endif
#ifdef INTERFACE
CLASS(XonoticVideoSettingsTab) EXTENDS(XonoticTab)
METHOD(XonoticVideoSettingsTab, fill, void(entity))
- ATTRIB(XonoticVideoSettingsTab, title, string, "Video")
+ ATTRIB(XonoticVideoSettingsTab, title, string, _("Video"))
ATTRIB(XonoticVideoSettingsTab, intendedWidth, float, 0.9)
ATTRIB(XonoticVideoSettingsTab, rows, float, 17)
ATTRIB(XonoticVideoSettingsTab, columns, float, 6.5)
entity e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Resolution:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Resolution:")));
me.TD(me, 1, 2, e = makeXonoticResolutionSlider());
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Font/UI size:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Font/UI size:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_vid_scale"));
- e.addValue(e, "Unreadable", "-1");
- e.addValue(e, "Tiny", "-0.75");
- e.addValue(e, "Little", "-0.5");
- e.addValue(e, "Small", "-0.25");
- e.addValue(e, "Medium", "0");
- e.addValue(e, "Large", "0.25");
- e.addValue(e, "Huge", "0.5");
- e.addValue(e, "Gigantic", "0.75");
- e.addValue(e, "Colossal", "1");
+ e.addValue(e, _("Unreadable"), "-1");
+ e.addValue(e, _("Tiny"), "-0.75");
+ e.addValue(e, _("Little"), "-0.5");
+ e.addValue(e, _("Small"), "-0.25");
+ e.addValue(e, _("Medium"), "0");
+ e.addValue(e, _("Large"), "0.25");
+ e.addValue(e, _("Huge"), "0.5");
+ e.addValue(e, _("Gigantic"), "0.75");
+ e.addValue(e, _("Colossal"), "1");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Color depth:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Color depth:")));
me.TD(me, 1, 2, e = makeXonoticSlider(16, 32, 16, "vid_bitsperpixel"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", "Full screen"));
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", "Vertical Synchronization"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", _("Vertical Synchronization")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", "Use OpenGL 2.0 shaders (GLSL)"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_coronas_occlusionquery", "Use Occlusion Queries"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_coronas_occlusionquery", _("Use Occlusion Queries")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Vertex Buffer Objects (VBOs)"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Vertex Buffer Objects (VBOs)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", "Off"));
- me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "3", "Vertices, some Tris (compatible)"));
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", _("Off")));
+ me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "2", "Vertices"));
- me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "1", "Vertices and Triangles"));
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "2", _("Vertices")));
+ me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "1", _("Vertices and Triangles")));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Depth first:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_depthfirst"));
- e.addValue(e, "Disabled", "0");
- e.addValue(e, "World", "1");
- e.addValue(e, "All", "2");
+ e.addValue(e, _("Disabled"), "0");
+ e.addValue(e, _("World"), "1");
+ e.addValue(e, _("All"), "2");
e.configureXonoticTextSliderValues(e);
me.TR(me);
if(cvar_type("apple_multithreadedgl") & CVAR_TYPEFLAG_ENGINE)
- me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "apple_multithreadedgl", "Disable multithreaded OpenGL"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "apple_multithreadedgl", _("Disable multithreaded OpenGL")));
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "gl_finish", "Wait for GPU to finish each frame"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "gl_finish", _("Wait for GPU to finish each frame")));
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Brightness:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Brightness:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0.0, 0.5, 0.02, "v_brightness"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Contrast:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast:")));
me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 3.0, 0.05, "v_contrast"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Gamma:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "v_gamma"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Contrast boost:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:")));
me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 5.0, 0.1, "v_contrastboost"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Saturation:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:")));
setDependent(e, "vid_gl20", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_glsl_saturation"));
setDependent(e, "vid_gl20", 1, 1);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_glslgamma", "Use GLSL to handle color control"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_glslgamma", _("Use GLSL to handle color control")));
setDependent(e, "vid_gl20", 1, 1);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Ambient:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Ambient:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0, 20.0, 1.0, "r_ambient"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Intensity:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Intensity:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "menu_cmd setresolution; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
+ me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_cmd setresolution; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
}
#endif
#ifdef INTERFACE
CLASS(XonoticSingleplayerDialog) EXTENDS(XonoticDialog)
METHOD(XonoticSingleplayerDialog, fill, void(entity))
- ATTRIB(XonoticSingleplayerDialog, title, string, "Singleplayer")
+ ATTRIB(XonoticSingleplayerDialog, title, string, _("Singleplayer"))
ATTRIB(XonoticSingleplayerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER)
ATTRIB(XonoticSingleplayerDialog, intendedWidth, float, 0.80)
ATTRIB(XonoticSingleplayerDialog, rows, float, 24)
me.TR(me);
me.TDempty(me, (me.columns - 3) / 2);
- me.TD(me, 2, 3, e = makeXonoticBigButton("Instant action! (random map with bots)", '0 0 0'));
+ me.TD(me, 2, 3, e = makeXonoticBigButton(_("Instant action! (random map with bots)"), '0 0 0'));
e.onClick = InstantAction_LoadMap;
e.onClickEntity = NULL;
me.TR(me);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, btnPrev = makeXonoticButton("<<", '0 0 0'));
- me.TD(me, 1, me.columns - 2, lblTitle = makeXonoticTextLabel(0.5, "???"));
+ me.TD(me, 1, me.columns - 2, lblTitle = makeXonoticTextLabel(0.5, _("???")));
me.TD(me, 1, 1, btnNext = makeXonoticButton(">>", '0 0 0'));
me.TR(me);
me.TD(me, me.rows - 5, me.columns, me.campaignBox = makeXonoticCampaignList());
me.campaignBox.campaignGo(me.campaignBox, 0);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("Start Singleplayer!", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Singleplayer!"), '0 0 0'));
e.onClick = CampaignList_LoadMap;
e.onClickEntity = me.campaignBox;
}
#ifdef INTERFACE
CLASS(XonoticWinnerDialog) EXTENDS(XonoticDialog)
METHOD(XonoticWinnerDialog, fill, void(entity))
- ATTRIB(XonoticWinnerDialog, title, string, "Winner")
+ ATTRIB(XonoticWinnerDialog, title, string, _("Winner"))
ATTRIB(XonoticWinnerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER)
ATTRIB(XonoticWinnerDialog, intendedWidth, float, 0.32)
ATTRIB(XonoticWinnerDialog, rows, float, 12)
me.TD(me, me.rows - 2, me.columns, e = makeXonoticImage("/gfx/winner", -1));
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
CLASS(XonoticTeamSelectDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticTeamSelectDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls
METHOD(XonoticTeamSelectDialog, showNotify, void(entity))
- ATTRIB(XonoticTeamSelectDialog, title, string, "Team Selection") // ;)
+ ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection")) // ;)
ATTRIB(XonoticTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticTeamSelectDialog, intendedWidth, float, 0.4)
ATTRIB(XonoticTeamSelectDialog, rows, float, 5)
{
entity e;
me.TR(me);
- me.TD(me, 2, 4, e = makeTeamButton("join 'best' team (auto-select)", '0 0 0', "cmd selectteam auto; cmd join"));
+ me.TD(me, 2, 4, e = makeTeamButton(_("join 'best' team (auto-select)"), '0 0 0', "cmd selectteam auto; cmd join"));
e.preferredFocusPriority = 1;
me.TR(me);
me.TR(me);
- me.TD(me, 2, 1, me.team1 = makeTeamButton("red", '1 0.5 0.5', "cmd selectteam red; cmd join"));
- me.TD(me, 2, 1, me.team2 = makeTeamButton("blue", '0.5 0.5 1', "cmd selectteam blue; cmd join"));
- me.TD(me, 2, 1, me.team3 = makeTeamButton("yellow", '1 1 0.5', "cmd selectteam yellow; cmd join"));
- me.TD(me, 2, 1, me.team4 = makeTeamButton("pink", '1 0.5 1', "cmd selectteam pink; cmd join"));
+ me.TD(me, 2, 1, me.team1 = makeTeamButton(_("red"), '1 0.5 0.5', "cmd selectteam red; cmd join"));
+ me.TD(me, 2, 1, me.team2 = makeTeamButton(_("blue"), '0.5 0.5 1', "cmd selectteam blue; cmd join"));
+ me.TD(me, 2, 1, me.team3 = makeTeamButton(_("yellow"), '1 1 0.5', "cmd selectteam yellow; cmd join"));
+ me.TD(me, 2, 1, me.team4 = makeTeamButton(_("pink"), '1 0.5 1', "cmd selectteam pink; cmd join"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 4, makeXonoticCommandButton("spectate", '0 0 0', "cmd spectate", 1));
+ me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", 1));
}
#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticGametypeList) EXTENDS(XonoticListBox)
+ METHOD(XonoticGametypeList, configureXonoticGametypeList, void(entity))
+ ATTRIB(XonoticGametypeList, rowsPerItem, float, 1)
+ METHOD(XonoticGametypeList, drawListBoxItem, void(entity, float, vector, float))
+ METHOD(XonoticGametypeList, resizeNotify, void(entity, vector, vector, vector, vector))
+ METHOD(XonoticGametypeList, setSelected, void(entity, float))
+ METHOD(XonoticGametypeList, loadCvars, void(entity))
+ METHOD(XonoticGametypeList, saveCvars, void(entity))
+
+ ATTRIB(XonoticGametypeList, realFontSize, vector, '0 0 0')
+ ATTRIB(XonoticGametypeList, realUpperMargin, float, 0)
+ ATTRIB(XonoticGametypeList, columnNameOrigin, float, 0)
+ ATTRIB(XonoticGametypeList, columnNameSize, float, 0)
+ENDCLASS(XonoticGametypeList)
+entity makeXonoticGametypeList();
+#endif
+
+#ifdef IMPLEMENTATION
+
+entity makeXonoticGametypeList(void)
+{
+ entity me;
+ me = spawnXonoticGametypeList();
+ me.configureXonoticGametypeList(me);
+ return me;
+}
+void XonoticGametypeList_configureXonoticGametypeList(entity me)
+{
+ me.loadCvars(me);
+ me.configureXonoticListBox(me);
+ me.nItems = GameType_GetCount();
+}
+void XonoticGametypeList_setSelected(entity me, float i)
+{
+ SUPER(XonoticGametypeList).setSelected(me, i);
+ me.saveCvars(me);
+}
+
+void XonoticGametypeList_loadCvars(entity me)
+{
+ float t;
+ t = MapInfo_CurrentGametype();
+ float i;
+ for(i = 0; i < GameType_GetCount(); ++i)
+ if(t == GameType_GetID(i))
+ break;
+ if(i >= GameType_GetCount())
+ {
+ for(i = 0; i < GameType_GetCount(); ++i)
+ if(t == MAPINFO_TYPE_DEATHMATCH)
+ break;
+ if(i >= GameType_GetCount())
+ i = 0;
+ }
+ me.setSelected(me, i);
+ // do we need this: me.parent.gameTypeChangeNotify(me.parent); // to make sure
+}
+void XonoticGametypeList_saveCvars(entity me)
+{
+ float t;
+ t = GameType_GetID(me.selectedItem);
+ if(t == MapInfo_CurrentGametype())
+ return;
+ MapInfo_SwitchGameType(t);
+ me.parent.gameTypeChangeNotify(me.parent);
+}
+void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
+{
+ string s;
+ if(isSelected)
+ draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
+ s = GameType_GetName(i);
+ draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+}
+void XonoticGametypeList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+ SUPER(XonoticServerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
+ me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
+ me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
+ me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+ me.columnNameOrigin = 0;
+ me.columnNameSize = 1;
+}
+#endif
string s;
Xonotic_KeyBinds_Count = 0;
- fh = fopen("keybinds.txt", FILE_READ);
+ fh = fopen(language_filename("keybinds.txt"), FILE_READ);
if(fh < 0)
return;
while((s = fgets(fh)))
}
}
localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n");
+ localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
}
void XonoticKeyBinder_editUserbind(entity me, string theName, string theCommandPress, string theCommandRelease)
{
//localcmd("\nunbind \"", keynumtostring(k), "\"\n");
localcmd("\nbind \"", keynumtostring(k), "\" \"", KEY_NOT_BOUND_CMD, "\"\n");
}
-
+ localcmd("-zoom\n"); // to make sure we aren't in togglezoom'd state
}
void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where)
{
void DemoButton_Click(entity me, entity other)
{
- if(me.text == "Do not press this button again!")
+ if(me.text == _("Do not press this button again!"))
DialogOpenButton_Click(me, other);
else
- me.setText(me, "Do not press this button again!");
+ me.setText(me, _("Do not press this button again!"));
}
void MainWindow_configureMainWindow(entity me)
m = MapInfo_BSPName_ByID(i);
if not(m)
{
- print("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n");
+ print(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
+ me.refilter(me);
return;
}
if(MapInfo_CheckMap(m))
{
localcmd("\nmenu_loadmap_prepare\n");
if(cvar("menu_use_default_hostname"))
- localcmd("hostname \"", strdecolorize(cvar_string("_cl_name")), "'s Xonotic server\"\n");
+ localcmd("hostname \"", sprintf(_("%s's Xonotic Server"), strdecolorize(cvar_string("_cl_name"))), "\"\n");
MapInfo_LoadMap(m);
}
else
{
- print("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n");
+ print(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
me.refilter(me);
+ return;
}
}
float sortbuf, glob, i;
string fn;
- glob = search_begin(get_model_datafilename(string_null, -1, "txt"), TRUE, TRUE);
+ glob = search_begin(language_filename(get_model_datafilename(string_null, -1, "txt")), TRUE, TRUE);
if (glob < 0)
return;
bufstr_set(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_SKIN, ftos(get_model_parameters_modelskin));
get_model_parameters_desc = strcat(get_model_parameters_desc, "\n");
if(get_model_parameters_sex)
- get_model_parameters_desc = strcat(get_model_parameters_desc, "\nSex: ", get_model_parameters_sex);
+ get_model_parameters_desc = strcat(get_model_parameters_desc, sprintf("\nSex: %s", get_model_parameters_sex));
if(get_model_parameters_weight)
- get_model_parameters_desc = strcat(get_model_parameters_desc, "\nWeight: ", ftos(get_model_parameters_weight), " kg");
+ get_model_parameters_desc = strcat(get_model_parameters_desc, sprintf("\nWeight: %g kg", get_model_parameters_weight));
if(get_model_parameters_age)
- get_model_parameters_desc = strcat(get_model_parameters_desc, "\nAge: ", ftos(get_model_parameters_age));
+ get_model_parameters_desc = strcat(get_model_parameters_desc, sprintf("\nAge: %g", get_model_parameters_age));
while(substring(get_model_parameters_desc, -1, 1) == "\n")
get_model_parameters_desc = substring(get_model_parameters_desc, 0, -2);
bufstr_set(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_DESC, get_model_parameters_desc);
if (me.numModels <= 0)
{
- draw_CenterText('0.5 0.5 0', "<no model found>", me.realFontSize, '1 1 1', 0.6, FALSE);
+ draw_CenterText('0.5 0.5 0', _("<no model found>"), me.realFontSize, '1 1 1', 0.6, FALSE);
return;
}
// still to be customized by user
/*
ATTRIB(XonoticDialog, closable, float, 1)
- ATTRIB(XonoticDialog, title, string, "Form1") // ;)
+ ATTRIB(XonoticDialog, title, string, _("Form1")) // ;)
ATTRIB(XonoticDialog, color, vector, '1 0.5 1')
ATTRIB(XonoticDialog, intendedWidth, float, 0)
ATTRIB(XonoticDialog, rows, float, 3)
if(srv == "")
return FALSE;
srv = netaddress_resolve(srv, 26000);
+ if(srv == "")
+ return FALSE;
p = crypto_getidfp(srv);
n = tokenize_console(cvar_string("net_slist_favorites"));
for(i = 0; i < n; ++i)
if(me.ipAddressBox.focused || me.ipAddressBoxFocused < 0)
{
if(IsFavorite(me.ipAddressBox.text))
- me.favoriteButton.setText(me.favoriteButton, "Remove");
+ me.favoriteButton.setText(me.favoriteButton, _("Remove"));
else
- me.favoriteButton.setText(me.favoriteButton, "Bookmark");
+ me.favoriteButton.setText(me.favoriteButton, _("Bookmark"));
}
me.ipAddressBoxFocused = me.ipAddressBox.focused;
}
me.columnPingSize = me.realFontSize_x * 3;
me.columnMapSize = me.realFontSize_x * 10;
me.columnTypeSize = me.realFontSize_x * 4;
- me.columnPlayersSize = me.realFontSize_x * 4;
+ me.columnPlayersSize = me.realFontSize_x * 5;
me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnIconsSize - me.columnTypeSize - 5 * me.realFontSize_x;
me.columnPingOrigin = me.columnIconsOrigin + me.columnIconsSize + me.realFontSize_x;
me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
me.columnTypeOrigin = me.columnMapOrigin + me.columnMapSize + me.realFontSize_x;
me.columnPlayersOrigin = me.columnTypeOrigin + me.columnTypeSize + me.realFontSize_x;
- me.positionSortButton(me, me.sortButton1, me.columnPingOrigin, me.columnPingSize, "Ping", ServerList_PingSort_Click);
- me.positionSortButton(me, me.sortButton2, me.columnNameOrigin, me.columnNameSize, "Host name", ServerList_NameSort_Click);
- me.positionSortButton(me, me.sortButton3, me.columnMapOrigin, me.columnMapSize, "Map", ServerList_MapSort_Click);
- me.positionSortButton(me, me.sortButton4, me.columnTypeOrigin, me.columnTypeSize, "Type", ServerList_TypeSort_Click);
- me.positionSortButton(me, me.sortButton5, me.columnPlayersOrigin, me.columnPlayersSize, "Players", ServerList_PlayerSort_Click);
+ me.positionSortButton(me, me.sortButton1, me.columnPingOrigin, me.columnPingSize, _("Ping"), ServerList_PingSort_Click);
+ me.positionSortButton(me, me.sortButton2, me.columnNameOrigin, me.columnNameSize, _("Host name"), ServerList_NameSort_Click);
+ me.positionSortButton(me, me.sortButton3, me.columnMapOrigin, me.columnMapSize, _("Map"), ServerList_MapSort_Click);
+ me.positionSortButton(me, me.sortButton4, me.columnTypeOrigin, me.columnTypeSize, _("Type"), ServerList_TypeSort_Click);
+ me.positionSortButton(me, me.sortButton5, me.columnPlayersOrigin, me.columnPlayersSize, _("Players"), ServerList_PlayerSort_Click);
float f;
f = me.currentSortField;
}
else if(scan == K_MOUSE2 || scan == K_SPACE)
{
- main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
- DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
+ if(me.nItems != 0)
+ {
+ main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
+ DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
+ }
}
else if(scan == K_INS || scan == K_MOUSE3 || scan == K_KP_INS)
{
{
s = search_getfilename(glob, i);
bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part
- bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, "<TITLE>");
- bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, "<AUTHOR>");
+ bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, _("<TITLE>"));
+ bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, _("<AUTHOR>"));
bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));
- fh = fopen(s, FILE_READ);
+ fh = fopen(language_filename(s), FILE_READ);
if(fh < 0)
{
print("Warning: can't open skinvalues.txt file\n");
draw_Picture(me.columnPreviewOrigin * eX, s, me.columnPreviewSize * eX + eY, '1 1 1', 1);
s = me.skinParameter(me, i, SKINPARM_NAME);
- s = strcat(s, ": ", me.skinParameter(me, i, SKINPARM_TITLE));
+ s = sprintf(_("%s: %s"), s, me.skinParameter(me, i, SKINPARM_TITLE));
s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_SKINLIST_TITLE, SKINALPHA_TEXT, 0);
string XonoticDecibelsSlider_valueToText(entity me, float v)
{
if(v < -33)
- return "OFF";
+ return _("OFF");
else if(v >= -0.1)
- return "MAX";
- return strcat(SUPER(XonoticDecibelsSlider).valueToText(me, v), " dB");
+ return _("MAX");
+ return sprintf(_("%s dB"), SUPER(XonoticDecibelsSlider).valueToText(me, v));
}
#endif
METHOD(XonoticPicmipSlider, configureXonoticPicmipSlider, void(entity))
METHOD(XonoticPicmipSlider, draw, void(entity))
METHOD(XonoticPicmipSlider, autofix, void(entity))
+ ATTRIB(XonoticPicmipSlider, have_s3tc, float, 0)
ENDCLASS(XonoticPicmipSlider)
entity makeXonoticPicmipSlider(); // note: you still need to call addValue and configureXonoticTextSliderValues!
#endif
{
me.configureXonoticTextSlider(me, "gl_picmip");
me.autofix(me);
+ me.have_s3tc = GL_Have_TextureCompression();
}
-float texmemsize()
+float texmemsize(float s3tc)
{
return
(
- 2500 * pow(0.5, max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
- + 1500 * pow(0.5, max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
- ) * ((cvar("r_texture_dds_load") || cvar("gl_texturecompression")) ? 0.4 : 1.0); // TC: normalmaps 50%, other 25%, few incompressible, guessing 40% as conservative average
+ 2500 * pow(0.25, max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
+ + 1500 * pow(0.25, max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
+ ) * ((s3tc && (cvar("r_texture_dds_load") || cvar("gl_texturecompression"))) ? 0.2 : 1.0); // TC: normalmaps 50%, other 25%, few incompressible, guessing 40% as conservative average
}
void XonoticPicmipSlider_autofix(entity me)
{
float max_hard, max_soft;
+ if(cvar("menu_picmip_bypass"))
+ return;
max_hard = cvar("sys_memsize_virtual");
max_soft = cvar("sys_memsize_physical");
if(max_hard > 0)
{
- while(me.value > 0 && texmemsize() > max_hard)
+ while(me.value > 0 && texmemsize(me.have_s3tc) > max_hard)
me.setValue(me, me.value - 1);
}
// TODO also check the soft limit!
}
void XonoticResolutionSlider_addResolution(entity me, float w, float h, float pixelheight)
{
- me.addValue(me, strzone(strcat(ftos(w), "x", ftos(h))), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
+ me.addValue(me, strzone(sprintf(_("%dx%d"), w, h)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
// FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
}
void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
if(r == r0)
continue;
r0 = r;
- if(r_x < 640 || r_y < 400)
+ if(r_x < 640 || r_y < 480)
+ continue;
+ if(r_x > 2 * r_y) // likely dualscreen resolution, skip this one
continue;
me.addResolution(me, r_x, r_y, r_z);
}
+ if(me.nValues == 0)
+ {
+ me.addResolution(me, 640, 480, 1);
+ me.addResolution(me, 800, 600, 1);
+ me.addResolution(me, 1024, 768, 1);
+ me.addResolution(me, 1280, 960, 1);
+ me.addResolution(me, 1280, 1024, 1);
+ me.addResolution(me, 1650, 1080, 1);
+ me.addResolution(me, 1920, 1080, 1);
+ }
+
me.configureXonoticTextSliderValues(me);
}
void XonoticResolutionSlider_loadCvars(entity me)
+float GL_CheckExtension(string ext)
+{
+ return (strstrofs(strcat(" ", cvar_string("gl_info_extensions"), " "), strcat(" ", ext, " "), 0) >= 0);
+}
+
+float GL_Have_TextureCompression()
+{
+ return (GL_CheckExtension("GL_EXT_texture_compression_s3tc") && GL_CheckExtension("GL_ARB_texture_compression"));
+}
+
float tooltipdb;
void loadTooltips()
{
- tooltipdb = db_load("tooltips.db");
+ tooltipdb = db_load(language_filename("tooltips.db"));
}
void unloadTooltips()
{
}
else
{
- print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
+ print(sprintf(_("Received HTTP request data for an invalid id %d.\n"), id));
}
}
if(_Nex_ExtResponseSystem_UpdateTo)
{
- print("error: UpdateNotification_URI_Get_Callback has been called before\n");
+ dprint("error: UpdateNotification_URI_Get_Callback has been called before\n");
return;
}
if(status != 0)
{
- print(sprintf("error receiving update notification: status is %d\n", status));
+ print(sprintf(_("error receiving update notification: status is %d\n"), status));
return;
}
if(substring(data, 0, 1) == "<")
{
- print("error: received HTML instead of an update notification\n");
+ print(_("error: received HTML instead of an update notification\n"));
return;
}
if(strstrofs(data, "\r", 0) != -1)
{
- print("error: received carriage returns from update notification server\n");
+ print(_("error: received carriage returns from update notification server\n"));
return;
}
{
// update needed
if(n >= 2)
- print(sprintf("Update can be downloaded at:\n%s\n", argv(1)));
+ print(sprintf(_("Update can be downloaded at:\n%s\n"), argv(1)));
}
_Nex_ExtResponseSystem_UpdateTo = strzone(_Nex_ExtResponseSystem_UpdateTo);
draw_reset_cropped();
sz = eX * 0.025 + eY * 0.025 * (draw_scale_x / draw_scale_y);
- draw_CenterText('0.5 0.5 0' - 1.25 * sz_y * eY, "Autogenerating mapinfo for newly added maps...", sz, '1 1 1', 1, 0);
+ draw_CenterText('0.5 0.5 0' - 1.25 * sz_y * eY, _("Autogenerating mapinfo for newly added maps..."), sz, '1 1 1', 1, 0);
boxA = '0.05 0.5 0' + 0.25 * sz_y * eY;
boxB = '0.95 0.5 0' + 1.25 * sz_y * eY;
// TODO rather turn this into a dialog
fs = ((1/draw_scale_x) * eX + (1/draw_scale_y) * eY) * 12;
line = eY * fs_y;
- sz_x = draw_TextWidth(" http://www.xonotic.com/ ", 0, fs);
+ sz_x = draw_TextWidth(" http://www.xonotic.org/ ", 0, fs);
sz_y = 3 * fs_y;
draw_alpha = sin(time * 0.112 - 0.3) * 10;
{
float fh;
float have_dds, have_jpg, have_tga;
+ float can_dds;
if((have_dds = ((fh = fopen("dds/particles/particlefont.dds", FILE_READ)) >= 0)))
fclose(fh);
if((have_jpg = ((fh = fopen("particles/particlefont.jpg", FILE_READ)) >= 0)))
fclose(fh);
if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
fclose(fh);
+ can_dds = GL_Have_TextureCompression();
if(have_dds && (have_jpg || have_tga))
{
// both? Let's only use good quality precompressed files
- cvar_set("gl_texturecompression", "0");
- return 1;
+ // but ONLY if we actually support it!
+ if(can_dds)
+ {
+ cvar_set("gl_texturecompression", "0");
+ return 1;
+ }
+ else
+ {
+ cvar_set("gl_texturecompression", "0");
+ cvar_set("r_texture_dds_load", "0");
+ return 0;
+ }
}
else if(have_dds)
{
// DDS only? We probably always want texture compression
cvar_set("gl_texturecompression", "1");
cvar_set("r_texture_dds_load", "1");
+ if(!can_dds)
+ print(_("^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems.\n"));
return 0;
}
else
{
// TGA only? Allow runtime compression
- cvar_set("gl_texturecompression", cvar_string("r_texture_dds_load"));
- return 2;
+ if(can_dds)
+ {
+ cvar_set("gl_texturecompression", cvar_string("r_texture_dds_load"));
+ return 2;
+ }
+ else
+ {
+ cvar_set("gl_texturecompression", "0");
+ cvar_set("r_texture_dds_load", "0");
+ return 0;
+ }
}
}
+
+// note: include only those that should be in the menu!
+#define GAMETYPES \
+ GAMETYPE(MAPINFO_TYPE_ARENA, _("Arena")) \
+ GAMETYPE(MAPINFO_TYPE_ASSAULT, _("Assault")) \
+ GAMETYPE(MAPINFO_TYPE_CTF, _("Capture The Flag")) \
+ GAMETYPE(MAPINFO_TYPE_CA, _("Clan Arena")) \
+ GAMETYPE(MAPINFO_TYPE_DEATHMATCH, _("Deathmatch")) \
+ GAMETYPE(MAPINFO_TYPE_DOMINATION, _("Domination")) \
+ GAMETYPE(MAPINFO_TYPE_FREEZETAG, _("Freeze Tag")) \
+ GAMETYPE(MAPINFO_TYPE_KEEPAWAY, _("Keepaway")) \
+ GAMETYPE(MAPINFO_TYPE_KEYHUNT, _("Key Hunt")) \
+ GAMETYPE(MAPINFO_TYPE_LMS, _("Last Man Standing")) \
+ GAMETYPE(MAPINFO_TYPE_NEXBALL, _("Nexball")) \
+ GAMETYPE(MAPINFO_TYPE_ONSLAUGHT, _("Onslaught")) \
+ GAMETYPE(MAPINFO_TYPE_RACE, _("Race")) \
+ GAMETYPE(MAPINFO_TYPE_CTS, _("Race CTS")) \
+ GAMETYPE(MAPINFO_TYPE_RUNEMATCH, _("Runematch")) \
+ GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH, _("Team Deathmatch")) \
+ /* nothing */
+
+float GameType_GetID(float cnt)
+{
+ float i;
+ i = 0;
+#define GAMETYPE(id,name) if(i++ == cnt) return id;
+ GAMETYPES
+#undef GAMETYPE
+ return 0;
+}
+string GameType_GetName(float cnt)
+{
+ float i;
+ i = 0;
+#define GAMETYPE(id,name) if(i++ == cnt) return name;
+ GAMETYPES
+#undef GAMETYPE
+ return _("@!#%'n Tuba Throwing");
+}
+float GameType_GetCount()
+{
+ float i;
+ i = 0;
+#define GAMETYPE(id,name) ++i;
+ GAMETYPES
+#undef GAMETYPE
+ return i;
+}
+
+string language_filename(string s)
+{
+ string fn;
+ float fh;
+ fn = cvar_string("prvm_language");
+ if(fn == "" || fn == "dump")
+ return s;
+ fn = strcat(s, ".", fn);
+ if((fh = fopen(fn, FILE_READ)) >= 0)
+ {
+ fclose(fh);
+ return fn;
+ }
+ return s;
+}
+
+void dialog_hudpanel_common_notoggle(entity me, string panelname)
+{
+ float i;
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Background:")));
+ me.TD(me, 1, 1.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg"))));
+ e.addValue(e, _("Default"), "");
+ e.addValue(e, _("Disable"), "0");
+ e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
+ me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
+ setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), _("Use default")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Border size:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border"))));
+ e.addValue(e, _("Default"), "");
+ e.addValue(e, _("Disable"), "0");
+ for(i = 1; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha"))));
+ e.addValue(e, _("Default"), "");
+ for(i = 1; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Team Color:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team"))));
+ e.addValue(e, _("Default"), "");
+ e.addValue(e, _("Disable"), "0");
+ for(i = 1; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10)));
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.4);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_configure_teamcolorforced", _("Test the team color in HUD configure mode")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Padding:")));
+ me.TD(me, 1, 2.6, e = makeXonoticTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding"))));
+ e.addValue(e, _("Default"), "");
+ for(i = 0; i <= 10; ++i)
+ e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5)));
+ e.configureXonoticTextSliderValues(e);
+}
+float GL_CheckExtension(string ext);
+float GL_Have_TextureCompression();
+
void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
void saveAllCvars(entity root);
void loadAllCvars(entity root);
void Curl_URI_Get_Callback(float id, float status, string data);
void URI_Get_Callback(float id, float status, string data);
+
+// game type list box stuff (does not NEED to contain all game types, other
+// types stay available via console)
+float GameType_GetID(float cnt);
+string GameType_GetName(float cnt);
+float GameType_GetCount();
+
+void dialog_hudpanel_common_notoggle(entity me, string panelname);
+#define DIALOG_HUDPANEL_COMMON_NOTOGGLE() \
+ dialog_hudpanel_common_notoggle(me, panelname)
+#define DIALOG_HUDPANEL_COMMON() \
+ me.TR(me); \
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \
+ DIALOG_HUDPANEL_COMMON_NOTOGGLE()
+
+string language_filename(string s);
+.float anticheat_jointime;
+
void mean_accumulate(entity e, .float a, .float c, float mean, float value, float weight)
{
if(weight == 0)
{
if(time < self.anticheat_div0_evade_offset)
self.anticheat_div0_evade_v_angle = self.v_angle;
- MEAN_ACCUMULATE(anticheat_div0_evade, 1 - (self.anticheat_div0_evade_forward_initial * v_forward), 1);
+ MEAN_ACCUMULATE(anticheat_div0_evade, 0.5 - 0.5 * (self.anticheat_div0_evade_forward_initial * v_forward), 1);
}
- MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), max(0, sys_frametime - frametime));
+ MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), 1);
self.anticheat_div0_strafebot_movement_prev = self.movement;
if(vlen(self.anticheat_div0_strafebot_forward_prev))
- MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 1 - (self.anticheat_div0_strafebot_forward_prev * v_forward), max(0, sys_frametime - frametime));
+ MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 0.5 - 0.5 * (self.anticheat_div0_strafebot_forward_prev * v_forward), 1);
self.anticheat_div0_strafebot_forward_prev = v_forward;
// generic speedhack detection: correlate anticheat_speedhack_movetime (UPDATED BEFORE THIS) and server time
self.anticheat_speedhack_offset = f;
else
{
- MEAN_ACCUMULATE(anticheat_speedhack, fabs(f - self.anticheat_speedhack_offset), 1);
+ MEAN_ACCUMULATE(anticheat_speedhack, max(0, f - self.anticheat_speedhack_offset), 1);
self.anticheat_speedhack_offset += (f - self.anticheat_speedhack_offset) * frametime * 0.1;
}
self.anticheat_div0_evade_offset = 0;
}
+string anticheat_display(float f, float tmin, float mi, float ma)
+{
+ string s;
+ s = ftos(f);
+ if(f <= mi)
+ return strcat(s, ":N");
+ if(f >= ma)
+ return strcat(s, ":Y");
+ return strcat(s, ":-");
+}
+
void anticheat_report()
{
if(!autocvar_sv_eventlog)
return;
- GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_speedhack))));
- GameLogEcho(strcat(":anticheat:div0_strafebot_old:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_old))));
- GameLogEcho(strcat(":anticheat:div0_strafebot_new:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_new))));
- GameLogEcho(strcat(":anticheat:div0_evade:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_evade))));
+ GameLogEcho(strcat(":anticheat:_time:", ftos(self.playerid), ":", ftos(servertime - self.anticheat_jointime)));
+ GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_speedhack), 240, 0.1, 0.15)));
+ GameLogEcho(strcat(":anticheat:div0_strafebot_old:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_div0_strafebot_old), 120, 0.3, 0.4)));
+ GameLogEcho(strcat(":anticheat:div0_strafebot_new:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_div0_strafebot_new), 120, 0.3, 0.4)));
+ GameLogEcho(strcat(":anticheat:div0_evade:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_div0_evade), 120, 0.1, 0.2)));
}
void anticheat_serverframe()
void anticheat_init()
{
self.anticheat_speedhack_offset = 0;
+ self.anticheat_jointime = servertime;
}
void anticheat_shutdown()
}
if(other.assault_sprite)
+ {
WaypointSprite_Disown(other.assault_sprite, waypointsprite_deadlifetime);
+ if(other.classname == "func_assault_destructible")
+ other.sprite = world;
+ }
else
return; // already activated! cannot activate again!
for(ent = world; (ent = find(ent, target, self.targetname)); )
{
if(ent.assault_sprite != world)
+ {
WaypointSprite_Disown(ent.assault_sprite, waypointsprite_deadlifetime);
+ if(ent.classname == "func_assault_destructible")
+ ent.sprite = world;
+ }
spr = WaypointSprite_SpawnFixed("<placeholder>", 0.5 * (ent.absmin + ent.absmax), ent, assault_sprite);
spr.assault_decreaser = self;
spr.classname = "sprite_waypoint";
WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY);
if(ent.classname == "func_assault_destructible")
+ {
WaypointSprite_UpdateSprites(spr, "as-defend", "as-destroy", "as-destroy");
+ WaypointSprite_UpdateMaxHealth(spr, ent.max_health);
+ WaypointSprite_UpdateHealth(spr, ent.health);
+ ent.sprite = spr;
+ }
else
WaypointSprite_UpdateSprites(spr, "as-defend", "as-push", "as-push");
WaypointSprite_UpdateTeamRadar(spr, RADARICON_OBJECTIVE, '1 0.5 0');
float autocvar_g_balance_armor_rotlinear;
float autocvar_g_balance_armor_rotstable;
float autocvar_g_balance_armor_start;
-float autocvar_g_balance_campingrifle_auto_reload_on_switch;
-float autocvar_g_balance_campingrifle_bursttime;
-float autocvar_g_balance_campingrifle_magazinecapacity;
-float autocvar_g_balance_campingrifle_primary_ammo;
-float autocvar_g_balance_campingrifle_primary_animtime;
-float autocvar_g_balance_campingrifle_primary_bulletconstant;
-float autocvar_g_balance_campingrifle_primary_bullethail;
-float autocvar_g_balance_campingrifle_primary_burstcost;
-float autocvar_g_balance_campingrifle_primary_damage;
-float autocvar_g_balance_campingrifle_primary_force;
-float autocvar_g_balance_campingrifle_primary_headshotaddeddamage;
-float autocvar_g_balance_campingrifle_primary_lifetime;
-float autocvar_g_balance_campingrifle_primary_refire;
-float autocvar_g_balance_campingrifle_primary_speed;
-float autocvar_g_balance_campingrifle_primary_spread;
-float autocvar_g_balance_campingrifle_primary_tracer;
-float autocvar_g_balance_campingrifle_reloadtime;
-float autocvar_g_balance_campingrifle_secondary;
-float autocvar_g_balance_campingrifle_secondary_ammo;
-float autocvar_g_balance_campingrifle_secondary_animtime;
-float autocvar_g_balance_campingrifle_secondary_bulletconstant;
-float autocvar_g_balance_campingrifle_secondary_bullethail;
-float autocvar_g_balance_campingrifle_secondary_burstcost;
-float autocvar_g_balance_campingrifle_secondary_damage;
-float autocvar_g_balance_campingrifle_secondary_force;
-float autocvar_g_balance_campingrifle_secondary_headshotaddeddamage;
-float autocvar_g_balance_campingrifle_secondary_lifetime;
-float autocvar_g_balance_campingrifle_secondary_refire;
-float autocvar_g_balance_campingrifle_secondary_speed;
-float autocvar_g_balance_campingrifle_secondary_spread;
-float autocvar_g_balance_campingrifle_secondary_tracer;
+float autocvar_g_balance_sniperrifle_auto_reload_on_switch;
+float autocvar_g_balance_sniperrifle_bursttime;
+float autocvar_g_balance_sniperrifle_magazinecapacity;
+float autocvar_g_balance_sniperrifle_primary_ammo;
+float autocvar_g_balance_sniperrifle_primary_animtime;
+float autocvar_g_balance_sniperrifle_primary_bulletconstant;
+float autocvar_g_balance_sniperrifle_primary_bullethail;
+float autocvar_g_balance_sniperrifle_primary_burstcost;
+float autocvar_g_balance_sniperrifle_primary_damage;
+float autocvar_g_balance_sniperrifle_primary_force;
+float autocvar_g_balance_sniperrifle_primary_headshotaddeddamage;
+float autocvar_g_balance_sniperrifle_primary_lifetime;
+float autocvar_g_balance_sniperrifle_primary_refire;
+float autocvar_g_balance_sniperrifle_primary_speed;
+float autocvar_g_balance_sniperrifle_primary_spread;
+float autocvar_g_balance_sniperrifle_primary_tracer;
+float autocvar_g_balance_sniperrifle_reloadtime;
+float autocvar_g_balance_sniperrifle_secondary;
+float autocvar_g_balance_sniperrifle_secondary_ammo;
+float autocvar_g_balance_sniperrifle_secondary_animtime;
+float autocvar_g_balance_sniperrifle_secondary_bulletconstant;
+float autocvar_g_balance_sniperrifle_secondary_bullethail;
+float autocvar_g_balance_sniperrifle_secondary_burstcost;
+float autocvar_g_balance_sniperrifle_secondary_damage;
+float autocvar_g_balance_sniperrifle_secondary_force;
+float autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage;
+float autocvar_g_balance_sniperrifle_secondary_lifetime;
+float autocvar_g_balance_sniperrifle_secondary_reload;
+float autocvar_g_balance_sniperrifle_secondary_refire;
+float autocvar_g_balance_sniperrifle_secondary_speed;
+float autocvar_g_balance_sniperrifle_secondary_spread;
+float autocvar_g_balance_sniperrifle_secondary_tracer;
float autocvar_g_balance_cloaked_alpha;
float autocvar_g_balance_crylink_primary_ammo;
float autocvar_g_balance_crylink_primary_animtime;
float autocvar_g_balance_crylink_primary_damage;
float autocvar_g_balance_crylink_primary_edgedamage;
float autocvar_g_balance_crylink_primary_force;
+float autocvar_g_balance_crylink_primary_joindelay;
float autocvar_g_balance_crylink_primary_joinexplode;
float autocvar_g_balance_crylink_primary_joinexplode_damage;
float autocvar_g_balance_crylink_primary_joinexplode_edgedamage;
float autocvar_g_balance_crylink_secondary_damage;
float autocvar_g_balance_crylink_secondary_edgedamage;
float autocvar_g_balance_crylink_secondary_force;
+float autocvar_g_balance_crylink_secondary_joindelay;
float autocvar_g_balance_crylink_secondary_joinexplode;
float autocvar_g_balance_crylink_secondary_joinexplode_damage;
float autocvar_g_balance_crylink_secondary_joinexplode_edgedamage;
float autocvar_g_balance_laser_primary_delay;
float autocvar_g_balance_laser_primary_edgedamage;
float autocvar_g_balance_laser_primary_force;
+float autocvar_g_balance_laser_primary_force_other_scale;
float autocvar_g_balance_laser_primary_force_velocitybias;
float autocvar_g_balance_laser_primary_force_zscale;
float autocvar_g_balance_laser_primary_lifetime;
float autocvar_g_balance_laser_secondary_damage;
float autocvar_g_balance_laser_secondary_edgedamage;
float autocvar_g_balance_laser_secondary_force;
+float autocvar_g_balance_laser_secondary_force_other_scale;
float autocvar_g_balance_laser_secondary_force_velocitybias;
float autocvar_g_balance_laser_secondary_force_zscale;
float autocvar_g_balance_laser_secondary_lifetime;
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;
float autocvar_g_balance_uzi_burst_refire;
float autocvar_g_balance_uzi_burst_refire2;
float autocvar_g_balance_uzi_burst_spread;
float autocvar_g_freezetag_point_leadlimit;
float autocvar_g_freezetag_point_limit;
float autocvar_g_freezetag_revive_extra_size;
-float autocvar_g_freezetag_revive_time;
+float autocvar_g_freezetag_revive_speed;
+float autocvar_g_freezetag_revive_clearspeed;
float autocvar_g_freezetag_warmup;
#define autocvar_g_friendlyfire cvar("g_friendlyfire")
+#define autocvar_g_friendlyfire_virtual cvar("g_friendlyfire_virtual")
+#define autocvar_g_friendlyfire_virtual_force cvar("g_friendlyfire_virtual_force")
float autocvar_g_full_getstatus_responses;
float autocvar_g_fullbrightitems;
float autocvar_g_fullbrightplayers;
float autocvar_g_jetpack_fuel;
float autocvar_g_jetpack_maxspeed_side;
float autocvar_g_jetpack_maxspeed_up;
-float autocvar_g_keepaway_ballcarrier_alpha;
+float autocvar_g_keepaway_ballcarrier_effects;
float autocvar_g_keepaway_ballcarrier_damage;
float autocvar_g_keepaway_ballcarrier_force;
float autocvar_g_keepaway_ballcarrier_highspeed;
float autocvar_g_keepaway_ballcarrier_selfdamage;
float autocvar_g_keepaway_ballcarrier_selfforce;
-float autocvar_g_keepaway_bckillscore;
float autocvar_g_keepaway_noncarrier_damage;
float autocvar_g_keepaway_noncarrier_force;
float autocvar_g_keepaway_noncarrier_selfdamage;
float autocvar_g_keepaway_noncarrier_selfforce;
float autocvar_g_keepaway_noncarrier_warn;
+float autocvar_g_keepaway_score_bckill;
+float autocvar_g_keepaway_score_killac;
+float autocvar_g_keepaway_score_timepoints;
+float autocvar_g_keepaway_score_timeinterval;
float autocvar_g_keepawayball_damageforcescale;
+float autocvar_g_keepawayball_effects;
float autocvar_g_keepawayball_respawntime;
float autocvar_g_keepawayball_trail_color;
float autocvar_g_keyhunt_point_leadlimit;
float autocvar_g_minstagib_ammo_drop;
float autocvar_g_minstagib_extralives;
float autocvar_g_minstagib_speed_highspeed;
+float autocvar_g_mirrordamage;
#define autocvar_g_mirrordamage cvar("g_mirrordamage")
+#define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")
float autocvar_g_monster_zombie_attack_run_damage;
float autocvar_g_monster_zombie_attack_run_delay;
float autocvar_g_monster_zombie_attack_run_force;
float autocvar_g_player_brightness;
float autocvar_g_playerclip_collisions;
string autocvar_g_playerstats_uri;
+float autocvar_g_playerstats_debug;
float autocvar_g_powerup_shield;
float autocvar_g_powerup_strength;
float autocvar_g_powerup_superhealth;
#define autocvar_utf8_enable cvar("utf8_enable")
float autocvar_waypoint_benchmark;
float autocvar_welcome_message_time;
+float autocvar_sv_gameplayfix_gravityunaffectedbyticrate;
+float autocvar_g_trueaim_minrange;
{
f = bot_aimdir(v - shotorg, r);
//dprint("AIM: ");dprint(vtos(self.bot_aimtargorigin));dprint(" + ");dprint(vtos(self.bot_aimtargvelocity));dprint(" * ");dprint(ftos(self.bot_aimlatency + vlen(self.bot_aimtargorigin - shotorg) / shotspeed));dprint(" = ");dprint(vtos(v));dprint(" : aimdir = ");dprint(vtos(normalize(v - shotorg)));dprint(" : ");dprint(vtos(shotdir));dprint("\n");
- traceline(shotorg, shotorg + shotdir * 10000, FALSE, self);
- if (trace_ent.takedamage)
- if (trace_fraction < 1)
- if (!bot_shouldattack(trace_ent))
- return FALSE;
+ //traceline(shotorg, shotorg + shotdir * 10000, FALSE, self);
+ //if (trace_ent.takedamage)
+ //if (trace_fraction < 1)
+ //if (!bot_shouldattack(trace_ent))
+ // return FALSE;
traceline(shotorg, self.bot_aimtargorigin, FALSE, self);
if (trace_fraction < 1)
if (trace_ent != self.enemy)
if (!bot_shouldattack(trace_ent))
return FALSE;
}
- if (r > maxshottime * shotspeed)
- return FALSE;
- return f;
+
+ //if (r > maxshottime * shotspeed)
+ // return FALSE;
+ return TRUE;
};
return;
// Don't jump when using some weapons
+ /*
if(self.aistatus & AI_STATUS_ATTACKING)
- if(self.weapon & WEP_CAMPINGRIFLE)
+ if(self.weapon == WEP_SNIPERRIFLE)
return;
if(self.goalcurrent.classname == "player")
return;
+ */
maxspeed = autocvar_sv_maxspeed;
}
// Release jump button
+ if(!cvar("sv_pogostick"))
if(self.flags & FL_ONGROUND == 0)
{
if(self.velocity_z < 0 || vlen(self.velocity)<maxspeed)
// I want to do a second scan if no enemy was found or I don't have weapons
// TODO: Perform the scan when using the rifle (requires changes on the rifle code)
- if(best || self.weapons) // || self.weapon == WEP_CAMPINGRIFLE
+ if(best || self.weapons) // || self.weapon == WEP_SNIPERRIFLE
break;
if(i)
break;
return;
// Workaround for rifle reloading (..)
- if(self.weapon == WEP_CAMPINGRIFLE)
- if(i < autocvar_g_balance_campingrifle_reloadtime + 1)
+ if(self.weapon == WEP_SNIPERRIFLE)
+ if(i < autocvar_g_balance_sniperrifle_reloadtime + 1)
return;
local float w;
- local float rocket ; rocket =-1000;
- local float nex ; nex =-1000;
- local float hagar ; hagar =-1000;
- local float grenade ; grenade =-1000;
- local float mine ; mine =-1000;
- local float electro ; electro =-1000;
- local float crylink ; crylink =-1000;
- local float uzi ; uzi =-1000;
- local float shotgun ; shotgun =-1000;
- local float campingrifle ; campingrifle =-1000;
- local float laser ; laser =-1000;
- local float minstanex ; minstanex =-1000;
- local float bestscore; bestscore = 0;
- local float bestweapon; bestweapon=self.switchweapon;
local float distance; distance=bound(10,vlen(self.origin-self.enemy.origin)-200,10000);
- local float maxdelaytime=0.5;
- local float spreadpenalty=10;
// Should it do a weapon combo?
local float af, ct, combo_time, combo;
{
// LordHavoc: disabled because this is too expensive
return '0 0 0';
- /*
+#if 0
local entity head;
local vector dodge, v, n;
local float danger, bestdanger, vl, d;
head = head.chain;
}
return dodge;
- */
+#endif
};
void race_SendRankings(float pos, float prevpos, float del, float msg);
void send_CSQC_teamnagger() {
- WriteByte(0, SVC_TEMPENTITY);
- WriteByte(0, TE_CSQC_TEAMNAGGER);
-}
-
-void send_CSQC_cr_maxbullets(entity e) {
- msg_entity = e;
- WriteByte(MSG_ONE, SVC_TEMPENTITY);
- WriteByte(MSG_ONE, TE_CSQC_CR_MAXBULLETS);
- WriteByte(MSG_ONE, autocvar_g_balance_campingrifle_magazinecapacity);
+ WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
+ WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER);
}
void Announce(string snd) {
self.cnt = self.switchweapon;
self.weapon = 0;
+ self.wish_reload = 0;
+
if(!self.alivetime)
self.alivetime = time;
} else if(self.classname == "observer" || (g_ca && !allowed_to_spawn)) {
WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
WriteCoord(MSG_ENTITY, self.ebouncestop); // g_balance_grenadelauncher_bouncestop
WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
- WriteByte(MSG_ENTITY, autocvar_g_balance_campingrifle_secondary); // client has to know if it should zoom or not
+ WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
+ WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_magazinecapacity); // rifle max bullets
+ WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
return TRUE;
}
{
// do nothing
}
- else if(g_freezetag && self.freezetag_frozen == 1)
+ else if(self.freezetag_frozen)
{
// do nothing
}
else if(autocvar_sv_teamnagger && !(autocvar_bot_vs_human && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca
send_CSQC_teamnagger();
- send_CSQC_cr_maxbullets(self);
-
CheatInitClient();
PlayerStats_AddPlayer(self);
self.modelflags &~= MF_ROCKET;
}
- self.effects &~= (EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
+ self.effects &~= (EF_DIMLIGHT | EF_RED | EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT | EF_FLAME | EF_NODEPTHTEST);
if(!self.modelindex || self.deadflag) // don't apply the flags if the player is gibbed
return;
}
if(!zoomstate_set)
- SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_CAMPINGRIFLE && autocvar_g_balance_campingrifle_secondary == 0));
+ SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
float oldspectatee_status;
oldspectatee_status = self.spectatee_status;
*/
void PlayerJump (void)
{
- if(g_freezetag && self.freezetag_frozen)
+ if(self.freezetag_frozen)
return; // no jumping in freezetag when frozen
float mjumpheight;
bot_think();
}
- MUTATOR_CALLHOOK(PlayerPhysics);
-
self.items &~= IT_USING_JETPACK;
if(self.classname == "player")
if (self.movetype == MOVETYPE_NONE)
return;
+ // when we get here, disableclientprediction cannot be 2
+ self.disableclientprediction = 0;
+ if(time < self.ladder_time)
+ self.disableclientprediction = 1;
+
+ MUTATOR_CALLHOOK(PlayerPhysics);
+
maxspd_mod = 1;
swampspd_mod = 1;
// on a spawnfunc_func_ladder or swimming in spawnfunc_func_water
self.flags &~= FL_ONGROUND;
+ float g;
+ g = autocvar_sv_gravity * frametime;
+ if(self.gravity)
+ g *= self.gravity;
+ if(autocvar_sv_gameplayfix_gravityunaffectedbyticrate)
+ {
+ g *= 0.5;
+ self.velocity_z += g;
+ }
+
self.velocity = self.velocity * (1 - frametime * autocvar_sv_friction);
makevectors(self.v_angle);
//wishvel = v_forward * self.movement_x + v_right * self.movement_y + v_up * self.movement_z;
wishvel = v_forward * self.movement_x + v_right * self.movement_y + '0 0 1' * self.movement_z;
- if (self.gravity)
- self.velocity_z = self.velocity_z + self.gravity * autocvar_sv_gravity * frametime;
- else
- self.velocity_z = self.velocity_z + autocvar_sv_gravity * frametime;
+ self.velocity_z += g;
if (self.ladder_entity.classname == "func_water")
{
f = vlen(wishvel);
{
if(self.weapons & W_WeaponBit(j))
if(W_IsWeaponThrowable(j))
- W_ThrowNewWeapon(self, j, FALSE, self.origin, randomvec() * 175 + '0 0 325');
+ W_ThrowNewWeapon(self, j, FALSE, org, randomvec() * 175 + '0 0 325');
}
}
else
- W_ThrowWeapon(randomvec() * 125 + '0 0 200', org - self.origin, FALSE);
+ {
+ if(W_IsWeaponThrowable(self.weapon))
+ W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
+ }
}
void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
void ClientKill_Now_TeamChange();
void freezetag_CheckWinner();
-void freezetag_Unfreeze();
void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
frag_target = self;
MUTATOR_CALLHOOK(PlayerDies);
- if(g_freezetag)
- return;
-
if(self.flagcarried)
{
if(attacker.classname != "player" && attacker.classname != "gib")
if(self.ballcarried && g_nexball)
DropBall(self.ballcarried, self.origin, self.velocity);
Portal_ClearAllLater(self);
- // clear waypoints
+
+ if(clienttype(self) == CLIENTTYPE_REAL)
+ {
+ stuffcmd(self, "-zoom\n");
+ self.fixangle = TRUE;
+ //msg_entity = self;
+ //WriteByte (MSG_ONE, SVC_SETANGLE);
+ //WriteAngle (MSG_ONE, self.v_angle_x);
+ //WriteAngle (MSG_ONE, self.v_angle_y);
+ //WriteAngle (MSG_ONE, 80);
+ }
+
+ if(defer_ClientKill_Now_TeamChange) // TODO does this work with FreezeTag?
+ ClientKill_Now_TeamChange();
+
+ if(g_arena)
+ Spawnqueue_Unmark(self);
+
+ if(g_freezetag)
+ return;
+
+ // when we get here, player actually dies
+ // clear waypoints (do this AFTER FreezeTag)
WaypointSprite_PlayerDead();
+
// make the corpse upright (not tilted)
self.angles_x = 0;
self.angles_z = 0;
waves = 0;
sdelay = cvar(strcat("g_", GetGametype(), "_respawn_delay"));
if(!sdelay)
- {
- if(g_cts)
- sdelay = 0; // no respawn delay in CTS
- else
- sdelay = autocvar_g_respawn_delay;
- }
+ {
+ if(g_cts)
+ sdelay = 0; // no respawn delay in CTS
+ else
+ sdelay = autocvar_g_respawn_delay;
+ }
waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
if(!waves)
waves = autocvar_g_respawn_waves;
// set up to fade out later
SUB_SetFade (self, time + 6 + random (), 1);
- if(clienttype(self) == CLIENTTYPE_REAL)
- {
- self.fixangle = TRUE;
- //msg_entity = self;
- //WriteByte (MSG_ONE, SVC_SETANGLE);
- //WriteAngle (MSG_ONE, self.v_angle_x);
- //WriteAngle (MSG_ONE, self.v_angle_y);
- //WriteAngle (MSG_ONE, 80);
- }
-
- if(g_arena)
- Spawnqueue_Unmark(self);
-
- if(defer_ClientKill_Now_TeamChange)
- ClientKill_Now_TeamChange();
-
if(sv_gentle > 0 || autocvar_ekg) {
// remove corpse
PlayerCorpseDamage (inflictor, attacker, 100.0, deathtype, hitloc, force);
}
// reset fields the weapons may use just in case
- for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+ for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
- weapon_action(j, WR_RESETPLAYER);
+ weapon_action(j, WR_RESETPLAYER);
ATTACK_FINISHED_FOR(self, j) = 0;
}
}
void W_Reload()
{
- if(self.switchweapon == self.weapon)
- if(self.weaponentity.state == WS_READY)
- weapon_action(self.weapon, WR_RELOAD);
+ self.wish_reload = 1;
}
// switch between weapons
float W_IsWeaponThrowable(float w)
{
float wb, wa;
+
+ if (!autocvar_g_pickup_items)
+ return 0;
+ if (g_weaponarena)
+ return 0;
+ if (g_lms)
+ return 0;
+ if (g_ca)
+ return 0;
+ if (g_cts)
+ return 0;
+ if (g_nexball && w == WEP_GRENADE_LAUNCHER)
+ return 0;
+
wb = W_WeaponBit(w);
if(!wb)
return 0;
return; // just in case
if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon))
return;
- if (g_weaponarena)
- return;
- if (g_lms)
- return;
- if (g_nexball && w == WEP_GRENADE_LAUNCHER)
- return;
- if (!autocvar_g_pickup_items)
- return;
- if (g_ca)
- return;
- if (g_cts)
- return;
if(!autocvar_g_weapon_throwable)
return;
if(autocvar_g_weapon_stay == 1)
return;
- if(!W_IsWeaponThrowable(w))
+ if(self.weaponentity.state != WS_READY)
return;
- if(self.deadflag == DEAD_NO && self.weaponentity.state != WS_READY)
+ if(!W_IsWeaponThrowable(w))
return;
wb = W_WeaponBit(w);
a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
if not(a)
return;
- if(self.health >= 1)
- {
- if(a == "")
- sprint(self, strcat("You dropped the ^2", W_Name(w), "\n"));
- else
- sprint(self, strcat("You dropped the ^2", W_Name(w), " with ", a, "\n"));
- }
+ if(a == "")
+ sprint(self, strcat("You dropped the ^2", W_Name(w), "\n"));
+ else
+ sprint(self, strcat("You dropped the ^2", W_Name(w), " with ", a, "\n"));
};
// Bringed back weapon frame
local float oldsolid;
vector vecs, dv;
oldsolid = ent.dphitcontentsmask;
- if(ent.weapon == WEP_CAMPINGRIFLE)
+ if(ent.weapon == WEP_SNIPERRIFLE)
ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
else
ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
v_right = vr;
v_up = vu;
+ // un-adjust trueaim if shotend is too close
+ if(vlen(w_shotend - (ent.origin + ent.view_ofs)) < autocvar_g_trueaim_minrange)
+ w_shotend = ent.origin + ent.view_ofs + s_forward * autocvar_g_trueaim_minrange;
+
// track max damage
if(accuracy_canbegooddamage(ent))
accuracy_add(ent, ent.weapon, maxdamage, 0);
float client_cefc_accumulatortime;
#endif
-.float campingrifle_bulletcounter;
+.float sniperrifle_bulletcounter;
+.float wish_reload;
#define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
// when doing this, hagar can go through clones
.float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
.float freezetag_frozen;
-.float freezetag_beginrevive_time;
.float freezetag_revive_progress;
+
+.entity muzzle_flash;
+.float misc_bulletcounter; // replaces uzi & hlac bullet counter.
void func_breakable_behave_restore()
{
self.health = self.max_health;
+ if(self.sprite)
+ {
+ WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
+ WaypointSprite_UpdateHealth(self.sprite, self.health);
+ }
self.takedamage = DAMAGE_AIM;
self.event_damage = func_breakable_damage;
self.state = 0;
if(self.team)
if(attacker.team == self.team)
return;
+ self.health = self.health - damage;
if(self.sprite)
+ {
WaypointSprite_Ping(self.sprite);
- self.health = self.health - damage;
+ WaypointSprite_UpdateHealth(self.sprite, self.health);
+ }
func_breakable_colormod();
if(self.health <= 0)
{
// teamkill
PlayerScore_Add(attacker, SP_KILLS, -1); // or maybe add a teamkills field?
- PlayerStats_Event(attacker, PLAYERSTATS_KILLS, -1);
}
}
else
{
// regular frag
PlayerScore_Add(attacker, SP_KILLS, 1);
- PlayerStats_Event(attacker, PLAYERSTATS_KILLS, 1);
}
PlayerScore_Add(targ, SP_DEATHS, 1);
{
if(!lms_next_place)
lms_next_place = player_count;
+ else
+ lms_next_place = min(lms_next_place, player_count);
PlayerScore_Add(targ, SP_LMS_RANK, lms_next_place); // won't ever spawn again
--lms_next_place;
}
// TODO: make these print a newline if they dont
Send_CSQC_Centerprint(attacker, "", "", KILL_FIRST_BLOOD, MSG_KILL);
Send_CSQC_Centerprint(targ, "", "", KILL_FIRST_VICTIM, MSG_KILL);
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1);
+ PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
}
if((autocvar_sv_fragmessage_information_typefrag) && (targ.BUTTON_CHAT)) {
{
Send_KillNotification(a, "", "", KILL_SPREE_3, MSG_SPREE);
AnnounceTo(attacker, "03kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3, 1);
}
else if (attacker.killcount == 5)
{
Send_KillNotification(a, "", "", KILL_SPREE_5, MSG_SPREE);
AnnounceTo(attacker, "05kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5, 1);
}
else if (attacker.killcount == 10)
{
Send_KillNotification(a, "", "", KILL_SPREE_10, MSG_SPREE);
AnnounceTo(attacker, "10kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10, 1);
}
else if (attacker.killcount == 15)
{
Send_KillNotification(a, "", "", KILL_SPREE_15, MSG_SPREE);
AnnounceTo(attacker, "15kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15, 1);
}
else if (attacker.killcount == 20)
{
Send_KillNotification(a, "", "", KILL_SPREE_20, MSG_SPREE);
AnnounceTo(attacker, "20kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20, 1);
}
else if (attacker.killcount == 25)
{
Send_KillNotification(a, "", "", KILL_SPREE_25, MSG_SPREE);
AnnounceTo(attacker, "25kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25, 1);
}
else if (attacker.killcount == 30)
{
Send_KillNotification(a, "", "", KILL_SPREE_30, MSG_SPREE);
AnnounceTo(attacker, "30kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30, 1);
}
LogDeath("frag", deathtype, attacker, targ);
}
GiveFrags(targ, targ, -1, deathtype);
if(PlayerScore_Add(targ, SP_SCORE, 0) == -5) {
AnnounceTo(targ, "botlike");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_BOTLIKE, 1);
}
Send_KillNotification(s, msg, "", deathtype, MSG_KILL_ACTION);
else
damage = autocvar_g_friendlyfire * damage;
// mirrordamage will be used LATER
+
+ if(autocvar_g_mirrordamage_virtual)
+ {
+ vector v;
+ v = healtharmor_applydamage(attacker.armorvalue, autocvar_g_balance_armor_blockpercent, mirrordamage);
+ attacker.dmg_take += v_x;
+ attacker.dmg_save += v_y;
+ attacker.dmg_inflictor = inflictor;
+ mirrordamage = 0;
+ mirrorforce = 0;
+ }
+
+ if(autocvar_g_friendlyfire_virtual)
+ {
+ vector v;
+ v = healtharmor_applydamage(targ.armorvalue, autocvar_g_balance_armor_blockpercent, damage);
+ targ.dmg_take += v_x;
+ targ.dmg_save += v_y;
+ targ.dmg_inflictor = inflictor;
+ damage = 0;
+ if(!autocvar_g_friendlyfire_virtual_force)
+ force = '0 0 0';
+ }
}
else
damage = 0;
if (DEATH_ISWEAPON(deathtype, WEP_LASER))
{
damage = 0;
+ mirrordamage = 0;
if (targ != attacker)
{
if ((targ.health >= 1) && (targ.classname == "player"))
centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "Secondary fire inflicts no damage!"));
- damage = 0;
- mirrordamage = 0;
force = '0 0 0';
// keep mirrorforce
attacker = targ;
{
if(damage > 0)
{
- if(attacker.weapon != WEP_ELECTRO && attacker.weapon != WEP_LASER || ((attacker.weapon == WEP_ELECTRO && autocvar_g_balance_electro_lightning || attacker.weapon == WEP_LASER) && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time))
+ if(attacker.weapon != WEP_LASER
+ && (attacker.weapon != WEP_ELECTRO || !autocvar_g_balance_electro_lightning)
+ && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
{
if(targ.BUTTON_CHAT)
attacker.typehitsound += 1;
}
else
{
- if(deathtype != DEATH_FIRE)
+ if(deathtype != DEATH_FIRE
+ && attacker.prevhitsound + autocvar_sv_hitsound_antispam_time < time)
+ {
attacker.typehitsound += 1;
+ attacker.prevhitsound = time;
+ }
if(mirrordamage > 0)
if(time > attacker.teamkill_complain)
{
{
attacker = attacker_save;
if(g_minstagib)
- if(mirrordamage > 0)
+ if(mirrordamage > 0)
+ {
+ // just lose extra LIVES, don't kill the player for mirror damage
+ if(attacker.armorvalue > 0)
{
- // just lose extra LIVES, don't kill the player for mirror damage
- if(attacker.armorvalue > 0)
- {
- attacker.armorvalue = attacker.armorvalue - 1;
- centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^3Remaining extra lives: ",ftos(attacker.armorvalue)));
- attacker.hitsound += 1;
- }
- mirrordamage = 0;
+ attacker.armorvalue = attacker.armorvalue - 1;
+ centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^3Remaining extra lives: ",ftos(attacker.armorvalue)));
+ attacker.hitsound += 1;
}
+ mirrordamage = 0;
+ }
+
force = normalize(attacker.origin + attacker.view_ofs - hitloc) * mirrorforce;
Damage(attacker, inflictor, attacker, mirrordamage, DEATH_MIRRORDAMAGE, attacker.origin, force);
}
// laser force adjustments :P
if(DEATH_WEAPONOF(deathtype) == WEP_LASER)
{
- vector vel;
-
- float force_zscale;
- float force_velocitybiasramp;
- float force_velocitybias;
-
- force_velocitybiasramp = autocvar_sv_maxspeed;
- if(deathtype & HITTYPE_SECONDARY)
- {
- force_zscale = autocvar_g_balance_laser_secondary_force_zscale;
- force_velocitybias = autocvar_g_balance_laser_secondary_force_velocitybias;
- }
- else
- {
- force_zscale = autocvar_g_balance_laser_primary_force_zscale;
- force_velocitybias = autocvar_g_balance_laser_primary_force_velocitybias;
- }
-
- vel = targ.velocity;
- vel_z = 0;
- vel = normalize(vel) * bound(0, vlen(vel) / force_velocitybiasramp, 1) * force_velocitybias;
- force =
- vlen(force)
- *
- normalize(normalize(force) + vel);
-
- force_z *= force_zscale;
+ if (targ == attacker)
+ {
+ vector vel;
+
+ float force_zscale;
+ float force_velocitybiasramp;
+ float force_velocitybias;
+
+ force_velocitybiasramp = autocvar_sv_maxspeed;
+ if(deathtype & HITTYPE_SECONDARY)
+ {
+ force_zscale = autocvar_g_balance_laser_secondary_force_zscale;
+ force_velocitybias = autocvar_g_balance_laser_secondary_force_velocitybias;
+ }
+ else
+ {
+ force_zscale = autocvar_g_balance_laser_primary_force_zscale;
+ force_velocitybias = autocvar_g_balance_laser_primary_force_velocitybias;
+ }
+
+ vel = targ.velocity;
+ vel_z = 0;
+ vel = normalize(vel) * bound(0, vlen(vel) / force_velocitybiasramp, 1) * force_velocitybias;
+ force =
+ vlen(force)
+ *
+ normalize(normalize(force) + vel);
+
+ force_z *= force_zscale;
+ }
+ else
+ {
+ if(deathtype & HITTYPE_SECONDARY)
+ {
+ force *= autocvar_g_balance_laser_secondary_force_other_scale;
+ }
+ else
+ {
+ force *= autocvar_g_balance_laser_primary_force_other_scale;
+ }
+ }
}
//if (targ == attacker)
if(e.watertype != CONTENT_LAVA)
e.fire_endtime = 0;
+ // ice stops fire
+ if(e.freezetag_frozen)
+ e.fire_endtime = 0;
+
t = min(frametime, e.fire_endtime - time);
d = e.fire_damagepersec * t;
if((arena_roundbased && time < warmup) || (time < game_starttime))
return;
+ if(self.freezetag_frozen)
+ return;
+
makevectors(self.v_angle);
s = self.cvar_cl_gunalign;
//missile.glow_size = 120;
missile.touch = GrapplingHookTouch;
missile.think = GrapplingHookThink;
- missile.nextthink = time + 0.1;
+ missile.nextthink = time;
missile.effects = /*EF_FULLBRIGHT | EF_ADDITIVE |*/ EF_LOWPRECISION;
SetCustomizer(self, LOD_customize, LOD_uncustomize);
}
+void ApplyMinMaxScaleAngles(entity e)
+{
+ if(e.angles_x != 0 || e.angles_z != 0 || self.avelocity_x != 0 || self.avelocity_z != 0) // "weird" rotation
+ {
+ e.maxs = '1 1 1' * vlen(
+ '1 0 0' * max(-e.mins_x, e.maxs_x) +
+ '0 1 0' * max(-e.mins_y, e.maxs_y) +
+ '0 0 1' * max(-e.mins_z, e.maxs_z)
+ );
+ e.mins = -e.maxs;
+ }
+ else if(e.angles_y != 0 || self.avelocity_y != 0) // yaw only is a bit better
+ {
+ e.maxs_x = vlen(
+ '1 0 0' * max(-e.mins_x, e.maxs_x) +
+ '0 1 0' * max(-e.mins_y, e.maxs_y)
+ );
+ e.maxs_y = e.maxs_x;
+ e.mins_x = -e.maxs_x;
+ e.mins_y = -e.maxs_x;
+ }
+ if(e.scale)
+ setsize(e, e.mins * e.scale, e.maxs * e.scale);
+ else
+ setsize(e, e.mins, e.maxs);
+}
+
void SetBrushEntityModel()
{
if(self.model != "")
InitializeEntity(self, LODmodel_attach, INITPRIO_FINDTARGET);
}
setorigin(self, self.origin);
- if(self.scale)
- setsize(self, self.mins * self.scale, self.maxs * self.scale);
- else
- setsize(self, self.mins, self.maxs);
+ ApplyMinMaxScaleAngles(self);
}
void SetBrushEntityModelNoLOD()
setmodel(self, self.model); // no precision needed
}
setorigin(self, self.origin);
- if(self.scale)
- setsize(self, self.mins * self.scale, self.maxs * self.scale);
- else
- setsize(self, self.mins, self.maxs);
+ ApplyMinMaxScaleAngles(self);
}
/*
BADCVAR("g_forced_team_pink");
// mapinfo
- BADCVAR("timelimit");
BADCVAR("fraglimit");
- BADCVAR("leadlimit");
- BADCVAR("g_tdm_teams");
- BADCVAR("g_keyhunt_teams");
- BADCVAR("g_domination_default_teams");
- BADCVAR("g_race_qualifying_timelimit");
- BADCVAR("g_lms");
BADCVAR("g_arena");
- BADCVAR("g_ca");
BADCVAR("g_assault");
+ BADCVAR("g_ca");
BADCVAR("g_ctf");
+ BADCVAR("g_cts");
BADCVAR("g_dm");
BADCVAR("g_domination");
+ BADCVAR("g_domination_default_teams");
BADCVAR("g_freezetag");
+ BADCVAR("g_keepaway");
BADCVAR("g_keyhunt");
BADCVAR("g_keyhunt_teams");
+ BADCVAR("g_keyhunt_teams");
+ BADCVAR("g_lms");
+ BADCVAR("g_nexball");
BADCVAR("g_onslaught");
BADCVAR("g_race");
- BADCVAR("g_cts");
+ BADCVAR("g_race_qualifying_timelimit");
BADCVAR("g_runematch");
BADCVAR("g_tdm");
- BADCVAR("g_nexball");
- BADCVAR("g_keepaway");
+ BADCVAR("g_tdm_teams");
+ BADCVAR("leadlimit");
+ BADCVAR("nextmap");
BADCVAR("teamplay");
+ BADCVAR("timelimit");
// long
BADCVAR("hostname");
// does nothing visible
BADCVAR("captureleadlimit_override");
BADCVAR("g_arena_point_leadlimit");
+ BADCVAR("g_balance_kill_delay");
BADCVAR("g_ca_point_leadlimit");
+ BADCVAR("g_ctf_captimerecord_always");
BADCVAR("g_ctf_capture_leadlimit");
+ BADCVAR("g_ctf_flag_capture_effects");
+ BADCVAR("g_ctf_flag_glowtrails");
+ BADCVAR("g_ctf_flag_pickup_effects");
BADCVAR("g_domination_point_leadlimit");
+ BADCVAR("g_forced_respawn");
BADCVAR("g_keyhunt_point_leadlimit");
BADCVAR("g_nexball_goalleadlimit");
BADCVAR("g_runematch_point_leadlimit");
BADCVAR("leadlimit_and_fraglimit");
BADCVAR("leadlimit_override");
- BADCVAR("sv_checkforpacketsduringsleep");
BADCVAR("pausable");
+ BADCVAR("sv_checkforpacketsduringsleep");
BADCVAR("sv_timeout");
+ BADCVAR("welcome_message_time");
BADPREFIX("crypto_");
BADPREFIX("g_chat_");
+ BADPREFIX("g_ctf_captimerecord_");
+ BADPREFIX("g_maplist_votable_");
BADPREFIX("net_");
BADPREFIX("prvm_");
+ BADPREFIX("skill_");
BADPREFIX("sv_fragmessage_");
+ BADPREFIX("sv_maxidle_");
BADPREFIX("sv_vote_");
BADPREFIX("timelimit_");
BADCVAR("timelimit_override");
BADCVAR("g_warmup");
BADPREFIX("g_warmup_");
+ BADCVAR("teamplay_mode");
if(autocvar_g_minstagib)
{
addstat(STAT_FUEL, AS_INT, ammo_fuel);
addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
- addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
+ addstat(STAT_BULLETS_LOADED, AS_INT, sniperrifle_bulletcounter);
addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
fputs(file, ":end\n");
fclose(file);
}
-
- // send statistics
- FOR_EACH_CLIENT(e)
- PlayerStats_AddGlobalInfo(e);
- PlayerStats_Shutdown();
}
void FixIntermissionClient(entity e)
DumpStats(TRUE);
+ // send statistics
+ entity e;
+ PlayerStats_EndMatch(1);
+ FOR_EACH_CLIENT(e)
+ PlayerStats_AddGlobalInfo(e);
+ PlayerStats_Shutdown();
+
if(autocvar_sv_eventlog)
GameLogEcho(":gameover");
print("Saving persistent data...\n");
Ban_SaveBans();
+ PlayerStats_EndMatch(0);
FOR_EACH_CLIENT(e)
PlayerStats_AddGlobalInfo(e);
PlayerStats_Shutdown();
g_weaponarena = 0;
s = cvar_string("g_weaponarena");
- if (s == "0")
+ if (s == "0" || s == "")
{
+ if(g_lms || g_ca)
+ s = "most";
+ }
+
+ if (s == "off")
+ {
+ // forcibly turn off weaponarena
}
else if (s == "all")
{
if (g_weaponarena)
{
start_weapons = g_weaponarena;
+ if(!(g_lms || g_ca))
+ start_items |= IT_UNLIMITED_AMMO;
+ }
+ else if (g_minstagib)
+ {
+ start_health = 100;
+ start_armorvalue = 0;
+ start_weapons = WEPBIT_MINSTANEX;
+ weapon_action(WEP_MINSTANEX, WR_PRECACHE);
+ g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
+
+ if (g_minstagib_invis_alpha <= 0)
+ g_minstagib_invis_alpha = -1;
+ }
+ else
+ {
+ for (i = WEP_FIRST; i <= WEP_LAST; ++i)
+ {
+ e = get_weaponinfo(i);
+ if(want_weapon("g_start_weapon_", e, FALSE))
+ start_weapons |= e.weapons;
+ }
+ }
+
+ if(!cvar("g_use_ammunition"))
+ start_items |= IT_UNLIMITED_AMMO;
+
+ if(g_minstagib)
+ {
+ start_ammo_cells = cvar("g_minstagib_ammo_start");
+ start_ammo_fuel = cvar("g_start_ammo_fuel");
+ }
+ else if(start_items & IT_UNLIMITED_WEAPON_AMMO)
+ {
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
e = get_weaponinfo(j);
start_ammo_fuel = 999;
}
}
- start_items |= IT_UNLIMITED_AMMO;
- }
- else if (g_minstagib)
- {
- start_health = 100;
- start_armorvalue = 0;
- start_weapons = WEPBIT_MINSTANEX;
- weapon_action(WEP_MINSTANEX, WR_PRECACHE);
- start_ammo_cells = cvar("g_minstagib_ammo_start");
- g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
- start_ammo_fuel = cvar("g_start_ammo_fuel");
-
- if (g_minstagib_invis_alpha <= 0)
- g_minstagib_invis_alpha = -1;
}
else
{
- if (g_lms || g_ca)
+ if(g_lms || g_ca)
{
start_ammo_shells = cvar("g_lms_start_ammo_shells");
start_ammo_nails = cvar("g_lms_start_ammo_nails");
start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
start_ammo_cells = cvar("g_lms_start_ammo_cells");
start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
- start_health = cvar("g_lms_start_health");
- start_armorvalue = cvar("g_lms_start_armor");
}
else
{
start_ammo_cells = cvar("g_start_ammo_cells");
start_ammo_fuel = cvar("g_start_ammo_fuel");
}
+ }
- for (i = WEP_FIRST; i <= WEP_LAST; ++i)
- {
- e = get_weaponinfo(i);
- if(want_weapon("g_start_weapon_", e, FALSE))
- start_weapons |= e.weapons;
- }
+ if (g_lms || g_ca)
+ {
+ start_health = cvar("g_lms_start_health");
+ start_armorvalue = cvar("g_lms_start_armor");
}
if (inWarmupStage)
warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
}
- if(!cvar("g_use_ammunition"))
- {
- start_ammo_shells = cvar("g_pickup_shells_max");
- start_ammo_nails = cvar("g_pickup_nails_max");
- start_ammo_rockets = cvar("g_pickup_rockets_max");
- start_ammo_cells = cvar("g_pickup_cells_max");
- start_ammo_fuel = cvar("g_pickup_fuel_max");
- start_items |= IT_UNLIMITED_AMMO;
- warmup_start_ammo_shells = cvar("g_pickup_shells_max");
- warmup_start_ammo_nails = cvar("g_pickup_nails_max");
- warmup_start_ammo_rockets = cvar("g_pickup_rockets_max");
- warmup_start_ammo_cells = cvar("g_pickup_cells_max");
- warmup_start_ammo_fuel = cvar("g_pickup_fuel_max");
- //warmup_start_items |= IT_UNLIMITED_AMMO;
- }
-
if (g_jetpack)
start_items |= IT_JETPACK;
// rule 6: we must not end up in trigger_hurt
if (tracebox_hits_trigger_hurt(start, e.mins, e.maxs, enddown))
- {
- dprint("trigger_hurt! ouch! and nothing else could find it!\n");
continue;
- }
break;
}
// checks if the current item may be spawned (self.items and self.weapons may be read and written to, as well as the ammo_ fields)
// return error to request removal
+MUTATOR_HOOKABLE(TurretSpawn);
+ // return error to request removal
+ // INPUT: self - turret
+
MUTATOR_HOOKABLE(OnEntityPreSpawn);
// return error to prevent entity spawn, or modify the entity
{
precache_model("models/ice/ice.md3");
warmup = time + autocvar_g_start_delay + autocvar_g_freezetag_warmup;
+ ScoreRules_freezetag();
}
void freezetag_CheckWinner()
entity e, winner;
string teamname;
+ winner = world;
FOR_EACH_PLAYER(e)
{
if(winner != world) // just in case a winner wasn't found
{
- TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
if(winner.team == COLOR_TEAM1)
teamname = "^1Red Team";
else if(winner.team == COLOR_TEAM2)
centerprint(e, strcat(teamname, "^5 wins the round, all other teams were frozen.\n"));
}
bprint(teamname, "^5 wins the round since all the other teams were frozen.\n");
+ TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
}
next_round = time + 5;
}
+// this is needed to allow the player to turn his view around (fixangle can't
+// be used to freeze his view, as that also changes the angles), while not
+// turning that ice object with the player
void freezetag_Ice_Think()
{
setorigin(self, self.owner.origin - '0 0 16');
self.nextthink = time;
}
-void freezetag_Freeze()
+void freezetag_Freeze(entity attacker)
{
+ if(self.freezetag_frozen)
+ return;
self.freezetag_frozen = 1;
+ self.freezetag_revive_progress = 0;
entity ice;
ice = spawn();
ice.frame = floor(random() * 21); // ice model has 20 different looking frames
setmodel(ice, "models/ice/ice.md3");
- self.movement = '0 0 0';
+ entity oldself;
+ oldself = self;
+ self = ice;
+ freezetag_Ice_Think();
+ self = oldself;
// add waypoint
WaypointSprite_Spawn("freezetag_frozen", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attached, TRUE);
{
WaypointSprite_UpdateTeamRadar(self.waypointsprite_attached, RADARICON_WAYPOINT, '0.25 0.90 1');
}
+
+ if(attacker == self)
+ {
+ // you froze your own dumb self
+ // counted as "suicide" already
+ PlayerScore_Add(self, SP_SCORE, -1);
+ }
+ else if(attacker.classname == "player")
+ {
+ // got frozen by an enemy
+ // counted as "kill" and "death" already
+ PlayerScore_Add(self, SP_SCORE, -1);
+ PlayerScore_Add(attacker, SP_SCORE, +1);
+ }
+ else
+ {
+ // nothing - got frozen by the game type rules themselves
+ }
}
-void freezetag_Unfreeze()
+void freezetag_Unfreeze(entity attacker)
{
self.freezetag_frozen = 0;
+ self.freezetag_revive_progress = 0;
// remove the ice block
entity ice;
if(totalspawned > 2) // only check for winners if we had more than two players (one of them left, don't let the other player win just because of that)
freezetag_CheckWinner();
- freezetag_Unfreeze();
+ freezetag_Unfreeze(world);
return 1;
}
--pinkalive;
--totalalive;
- freezetag_Freeze();
+ freezetag_Freeze(frag_attacker);
}
if(frag_attacker.classname == STR_PLAYER)
MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
{
- freezetag_Unfreeze(); // start by making sure that all ice blocks are removed
+ freezetag_Unfreeze(world); // start by making sure that all ice blocks are removed
if(totalspawned == 1 && time > game_starttime) // only one player active on server, start a new match immediately
if(!next_round && warmup && (time < warmup - autocvar_g_freezetag_warmup || time > warmup)) // not awaiting next round
if(warmup && time > warmup) // spawn too late, freeze player
{
centerprint(self, "^1You spawned after the round started, you'll spawn as frozen.\n");
- freezetag_Freeze();
+ freezetag_Freeze(world);
}
return 1;
MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
{
- vector revive_extra_size;
- revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
+ float n;
+ vector revive_extra_size;
- float teammate_nearby;
- FOR_EACH_PLAYER(other) if(self != other)
- {
- if(other.freezetag_frozen == 0)
- {
- if(other.team == self.team)
- {
- teammate_nearby = boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax);
- if(teammate_nearby)
- break;
- }
- }
- }
+ revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
- if(teammate_nearby && self.freezetag_frozen == 1) // OK, there is at least one teammate reviving us
- {
- if(self.freezetag_beginrevive_time == -9999) // initialize values if this is the first frame of revival
- {
- self.freezetag_beginrevive_time = time;
- self.freezetag_revive_progress = 0;
- }
- else
- {
- self.freezetag_revive_progress = (time - self.freezetag_beginrevive_time) / autocvar_g_freezetag_revive_time;
- if(time - self.freezetag_beginrevive_time >= autocvar_g_freezetag_revive_time)
- {
- freezetag_Unfreeze();
-
- centerprint(self, strcat("^5You were revived by ^7", other.netname, ".\n"));
- centerprint(other, strcat("^5You revived ^7", self.netname, ".\n"));
- bprint("^7", other.netname, "^5 revived ^7", self.netname, ".\n");
-
- self.freezetag_beginrevive_time = -9999;
- self.freezetag_revive_progress = 0;
- }
- }
- // now find EVERY teammate within reviving radius, set their revive_progress values correct
- FOR_EACH_PLAYER(other) if(self != other)
- {
- if(other.freezetag_frozen == 0)
- {
- if(other.team == self.team)
- {
- teammate_nearby = boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax);
- if(teammate_nearby)
- other.freezetag_revive_progress = self.freezetag_revive_progress;
- }
- }
- }
- }
- else if(!teammate_nearby) // only if no teammate is nearby will we reset
- {
- self.freezetag_beginrevive_time = -9999;
- self.freezetag_revive_progress = 0;
- }
+ entity o;
+ o = world;
+ n = 0;
+ FOR_EACH_PLAYER(other) if(self != other)
+ {
+ if(other.freezetag_frozen == 0)
+ {
+ if(other.team == self.team)
+ {
+ if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
+ {
+ if(!o)
+ o = other;
+ ++n;
+ }
+ }
+ }
+ }
+
+ if(n && self.freezetag_frozen) // OK, there is at least one teammate reviving us
+ {
+ self.freezetag_revive_progress = bound(0, self.freezetag_revive_progress + frametime * autocvar_g_freezetag_revive_speed, 1);
+
+ if(self.freezetag_revive_progress >= 1)
+ {
+ freezetag_Unfreeze(self);
+
+ // EVERY team mate nearby gets a point (even if multiple!)
+ FOR_EACH_PLAYER(other) if(self != other)
+ {
+ if(other.freezetag_frozen == 0)
+ {
+ if(other.team == self.team)
+ {
+ if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
+ {
+ PlayerScore_Add(other, SP_FREEZETAG_REVIVALS, +1);
+ PlayerScore_Add(other, SP_SCORE, +1);
+ }
+ }
+ }
+ }
+
+ if(n > 1)
+ centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5 et al.\n"));
+ else
+ centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5.\n"));
+ centerprint(o, strcat("^5You revived ^7", self.netname, "^5.\n"));
+ if(n > 1)
+ bprint("^7", o.netname, "^5 et al revived ^7", self.netname, "^5.\n");
+ else
+ bprint("^7", o.netname, "^5 revived ^7", self.netname, "^5.\n");
+ }
+
+ // now find EVERY teammate within reviving radius, set their revive_progress values correct
+ FOR_EACH_PLAYER(other) if(self != other)
+ {
+ if(other.freezetag_frozen == 0)
+ {
+ if(other.team == self.team)
+ {
+ if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
+ other.freezetag_revive_progress = self.freezetag_revive_progress;
+ }
+ }
+ }
+ }
+ else if(!n && self.freezetag_frozen) // only if no teammate is nearby will we reset
+ {
+ self.freezetag_revive_progress = bound(0, self.freezetag_revive_progress - frametime * autocvar_g_freezetag_revive_clearspeed, 1);
+ }
+ else if(!n)
+ {
+ self.freezetag_revive_progress = 0; // thawing nobody
+ }
return 1;
}
MUTATOR_HOOKFUNCTION(freezetag_PlayerPhysics)
{
if(self.freezetag_frozen)
+ {
self.movement = '0 0 0';
+ self.disableclientprediction = 1;
+ }
return 1;
}
void ka_TouchEvent(void);
void ka_RespawnBall(void);
void ka_DropEvent(entity);
+void ka_TimeScoring(void);
float ka_ballcarrier_waypointsprite_visible_for_player(entity);
ka_RespawnBall();
}
-void ka_SpawnBall() // loads various values for the ball
+void ka_SpawnBall() // loads various values for the ball, runs only once at start of match
{
if(!g_keepaway) { return; }
entity e;
e = spawn();
e.model = "models/orbs/orbblue.md3";
- e.scale = 1;
precache_model(e.model);
setmodel(e, e.model);
setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
e.classname = "keepawayball";
e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
e.takedamage = DAMAGE_YES;
+ e.solid = SOLID_TRIGGER;
+ e.movetype = MOVETYPE_BOUNCE;
e.glow_color = autocvar_g_keepawayball_trail_color;
e.glow_trail = TRUE;
- e.movetype = MOVETYPE_BOUNCE;
- e.touch = ka_TouchEvent;
e.flags = FL_ITEM;
e.reset = ka_Reset;
+ e.touch = ka_TouchEvent;
e.owner = world;
InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So.
void ka_RespawnBall() // runs whenever the ball needs to be relocated
{
+ if(gameover) { return; }
vector oldballorigin = self.origin;
-
+
if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
{
makevectors(self.angles);
self.movetype = MOVETYPE_BOUNCE;
self.velocity = '0 0 200';
self.angles = '0 0 0';
- self.solid = SOLID_TRIGGER;
+ self.effects = autocvar_g_keepawayball_effects;
self.think = ka_RespawnBall;
self.nextthink = time + autocvar_g_keepawayball_respawntime;
void ka_TouchEvent() // runs any time that the ball comes in contact with something
{
+ if(gameover) { return; }
if(!self) { return; }
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
{ // The ball fell off the map, respawn it since players can't get to it
self.owner = other;
other.ballcarried = self;
setattachment(self, other, "");
- setorigin(self, '3 0 20');
+ setorigin(self, '0 0 0');
- // make the ball invisible/unable to do anything
+ // make the ball invisible/unable to do anything/set up time scoring
self.velocity = '0 0 0';
self.movetype = MOVETYPE_NONE;
- self.touch = SUB_Null;
self.effects |= EF_NODRAW;
- self.think = SUB_Null;
- self.nextthink = 0;
+ self.touch = SUB_Null;
+ self.think = ka_TimeScoring;
+ self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
self.takedamage = DAMAGE_NO;
// apply effects to player
other.glow_color = autocvar_g_keepawayball_trail_color;
other.glow_trail = TRUE;
- other.effects |= EF_DIMLIGHT;
- other.alpha = autocvar_g_keepaway_ballcarrier_alpha;
- other.exteriorweaponentity.alpha = autocvar_g_keepaway_ballcarrier_alpha;
-
+ other.effects |= autocvar_g_keepaway_ballcarrier_effects;
+
// messages and sounds
Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA);
WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
// reset the ball
setattachment(ball, world, "");
ball.movetype = MOVETYPE_BOUNCE;
- ball.solid = SOLID_TRIGGER; // is this needed?
ball.wait = time + 1;
+ ball.touch = ka_TouchEvent;
ball.think = ka_RespawnBall;
ball.nextthink = time + autocvar_g_keepawayball_respawntime;
- ball.touch = ka_TouchEvent;
ball.takedamage = DAMAGE_YES;
ball.effects &~= EF_NODRAW;
setorigin(ball, plyr.origin + '0 0 10');
ball.owner = world;
// reset the player effects
- plyr.effects &~= EF_DIMLIGHT;
- plyr.alpha = default_player_alpha;
- plyr.exteriorweaponentity.alpha = default_weapon_alpha;
plyr.glow_trail = FALSE;
-
+ plyr.effects &~= autocvar_g_keepaway_ballcarrier_effects;
+
// messages and sounds
Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA);
WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
float ka_ballcarrier_waypointsprite_visible_for_player(entity e) // runs on waypoints which are attached to ballcarriers, updates once per frame
{
if(e.ballcarried)
- {
if(other.classname == "spectator")
return FALSE; // we don't want spectators of the ballcarrier to see the attached waypoint on the top of their screen
- else if(g_minstagib && (e.items & IT_STRENGTH))
- return FALSE; // if the ballcarrier has invisibility, don't draw the waypoint as this is the function of invisibility in keepaway
- }
+
+ // TODO: Make the ballcarrier lack a waypointsprite whenever they have the invisibility powerup
return TRUE;
}
-MUTATOR_HOOKFUNCTION(ka_RemovePlayer)
+void ka_TimeScoring()
{
- if(self.ballcarried) { ka_DropEvent(self); } // a player with the ball has left the match, drop it
- return 0;
+ if(self.owner.ballcarried)
+ { // add points for holding the ball after a certain amount of time
+ if(autocvar_g_keepaway_score_timepoints)
+ PlayerScore_Add(self.owner, SP_SCORE, autocvar_g_keepaway_score_timepoints);
+
+ PlayerScore_Add(self.owner, SP_KEEPAWAY_TIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
+ self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
+ }
}
MUTATOR_HOOKFUNCTION(ka_Scoring)
{
if(frag_target.ballcarried) { // add to amount of times killing carrier
PlayerScore_Add(frag_attacker, SP_KEEPAWAY_CARRIERKILLS, 1);
- if(autocvar_g_keepaway_bckillscore) // add bckills to the score
- PlayerScore_Add(frag_attacker, SP_KEEPAWAY_SCORE, 1);
+ if(autocvar_g_keepaway_score_bckill) // add bckills to the score
+ PlayerScore_Add(frag_attacker, SP_SCORE, autocvar_g_keepaway_score_bckill);
}
else if(!frag_attacker.ballcarried)
if(autocvar_g_keepaway_noncarrier_warn)
centerprint_atprio(frag_attacker, (CENTERPRIO_SPAM + 5), "Killing people while you don't have the ball gives no points!");
if(frag_attacker.ballcarried) // add to amount of kills while ballcarrier
- PlayerScore_Add(frag_attacker, SP_KEEPAWAY_SCORE, 1);
+ PlayerScore_Add(frag_attacker, SP_SCORE, autocvar_g_keepaway_score_killac);
}
if(self.ballcarried) { ka_DropEvent(self); } // a player with the ball has died, drop it
MUTATOR_HOOKFUNCTION(ka_GiveFragsForKill)
{
frag_score = 0; // no frags counted in keepaway
- return 0;
+ return 1; // you deceptive little bugger ;3 This needs to be true in order for this function to even count.
}
MUTATOR_HOOKFUNCTION(ka_PlayerPreThink)
return 0;
}
+MUTATOR_HOOKFUNCTION(ka_RemovePlayer)
+{
+ if(self.ballcarried) { ka_DropEvent(self); } // a player with the ball has left the match, drop it
+ return 0;
+}
+
MUTATOR_HOOKFUNCTION(ka_PlayerPowerups)
{
- if(self.ballcarried)
- {
- // if the player has the ball, force ballcarrier alpha upon them
- self.alpha = autocvar_g_keepaway_ballcarrier_alpha;
- self.exteriorweaponentity.alpha = autocvar_g_keepaway_ballcarrier_alpha;
+ // In the future this hook is supposed to allow me to do some extra stuff with waypointsprites and invisibility powerup
+ // So bare with me until I can fix a certain bug with ka_ballcarrier_waypointsprite_visible_for_player()
- // if we're in minstagib and a ballcarrier has just picked up invisibility,
- // notify all the other players that the ballcarrier no longer has a waypoint
- if(g_minstagib)
- {
- if(olditems & IT_STRENGTH)
- {
- if(time > self.strength_finished)
- { // this only runs ONCE right after the player loses invisibility
- bprint(self.netname, "^7 isn't invisible from radar anymore.\n");
- }
- }
- else
- {
- if(time < self.strength_finished)
- { // this only runs ONCE right after the player gains invisibility
- bprint(self.netname, "^7 has picked up invisibility and can no longer be seen on radar!\n");
- }
- }
- }
- }
- else if(g_minstagib)
- {
- // if we're in minstagib and a noncarrier has invisibility, assure that we apply the invisibility effects normally
- if(olditems & IT_STRENGTH)
- {
- self.alpha = g_minstagib_invis_alpha;
- self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
- }
- }
- else
- {
- // if we're a normal player with no powerups that edit alpha make sure the alpha is default.
- // (normal powerups just use EF_ADDITIVE)
- self.alpha = default_player_alpha;
- self.exteriorweaponentity.alpha = default_weapon_alpha;
- }
+ self.effects &~= autocvar_g_keepaway_ballcarrier_effects;
+
+ if(self.ballcarried)
+ self.effects |= autocvar_g_keepaway_ballcarrier_effects;
return 0;
}
MUTATOR_DEFINITION(gamemode_keepaway)
{
- // I don't quite understand these orders, perhaps someone could enlighten me?
MUTATOR_HOOK(MakePlayerObserver, ka_RemovePlayer, CBC_ORDER_ANY);
MUTATOR_HOOK(ClientDisconnect, ka_RemovePlayer, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDies, ka_Scoring, CBC_ORDER_ANY);
MUTATOR_HOOK(GiveFragsForKill, ka_GiveFragsForKill, CBC_ORDER_ANY);
- MUTATOR_HOOK(PlayerPreThink, ka_PlayerPreThink, CBC_ORDER_FIRST);
+ MUTATOR_HOOK(PlayerPreThink, ka_PlayerPreThink, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDamage_Calculate, ka_PlayerDamage, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPowerups, ka_PlayerPowerups, CBC_ORDER_ANY);
string events_last;
.float playerstats_addedglobalinfo;
float playerstats_requested;
+.string playerstats_id;
void PlayerStats_Init()
{
playerstats_waitforme = FALSE; // must wait for it at match end
PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
- PlayerStats_AddEvent(PLAYERSTATS_KILLS);
+ PlayerStats_AddEvent(PLAYERSTATS_WINS);
+ PlayerStats_AddEvent(PLAYERSTATS_MATCHES);
+ PlayerStats_AddEvent(PLAYERSTATS_JOINS);
+ PlayerStats_AddEvent(PLAYERSTATS_SCOREBOARD_VALID);
+
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_BOTLIKE);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM);
}
void PlayerStats_AddPlayer(entity e)
{
- if(!e.crypto_idfp || playerstats_db < 0)
+ if(playerstats_db < 0)
return;
+
+ if(e.crypto_idfp != "")
+ e.playerstats_id = strzone(e.crypto_idfp);
+ else if(clienttype(e) == CLIENTTYPE_BOT)
+ e.playerstats_id = strzone(sprintf("bot#%d", e.playerid));
+ else
+ e.playerstats_id = strzone(sprintf("player#%d", e.playerid));
string key;
- key = sprintf("%s:*", e.crypto_idfp);
+ key = sprintf("%s:*", e.playerstats_id);
string p;
p = db_get(playerstats_db, key);
}
else
db_put(playerstats_db, key, "#");
- playerstats_last = strzone(e.crypto_idfp);
+ playerstats_last = strzone(e.playerstats_id);
}
}
void PlayerStats_Event(entity e, string event_id, float value)
{
- if(!e.crypto_idfp || playerstats_db < 0)
+ if(!e.playerstats_id || playerstats_db < 0)
return;
string key;
float val;
- key = sprintf("%s:%s", e.crypto_idfp, event_id);
+ key = sprintf("%s:%s", e.playerstats_id, event_id);
val = stof(db_get(playerstats_db, key));
val += value;
db_put(playerstats_db, key, ftos(val));
{
float v;
v = stof(db_get(playerstats_db, sprintf("%s:%s", p, e)));
- bufstr_set(b, i++, sprintf("e %s %f", e, v));
+ if(v != 0)
+ bufstr_set(b, i++, sprintf("e %s %g", e, v));
}
}
bufstr_set(b, i++, "");
+ if(autocvar_g_playerstats_debug)
+ {
+ for(i = 0; i < buf_getsize(b); ++i)
+ print(bufstr_get(b, i), "\n");
+ }
+
if(crypto_uri_postbuf(uri, URI_GET_PLAYERSTATS_SENT, "text/plain", "\n", b, 0))
playerstats_requested = TRUE;
else
{
if(playerstats_db < 0)
return;
- if(!p.crypto_idfp || playerstats_db < 0)
+ if(!p.playerstats_id || playerstats_db < 0)
return;
p.playerstats_addedglobalinfo = TRUE;
// add global info!
if(p.alivetime)
PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, time - p.alivetime);
+
+ if(p.alivetime)
+ PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, time - p.alivetime);
- if(p.cvar_cl_allow_uid2name == 1)
- db_put(playerstats_db, sprintf("%s:_netname", p.crypto_idfp), p.netname);
+ if(p.cvar_cl_allow_uid2name == 1 || clienttype(p) == CLIENTTYPE_BOT)
+ db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), p.netname);
+
+ if(p.alivetime > 0)
+ PlayerStats_Event(p, PLAYERSTATS_JOINS, 1);
+
+ strunzone(p.playerstats_id);
+ p.playerstats_id = string_null;
+}
+
+void PlayerStats_EndMatch(float finished)
+{
+ entity p;
+ FOR_EACH_PLAYER(p)
+ {
+ PlayerScore_PlayerStats(p);
+ PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_VALID, 1);
+ if(finished)
+ {
+ PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
+ PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
+ }
+ }
}
// time the player was alive and kicking
-string PLAYERSTATS_ALIVETIME = "alivetime";
-string PLAYERSTATS_KILLS = "kills";
+string PLAYERSTATS_ALIVETIME = "alivetime";
+string PLAYERSTATS_WINS = "wins";
+string PLAYERSTATS_MATCHES = "matches";
+string PLAYERSTATS_JOINS = "joins";
+string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
+
+string PLAYERSTATS_TOTAL = "total-";
+string PLAYERSTATS_SCOREBOARD = "scoreboard-";
+
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3 = "achievement-kill-spree-3";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5 = "achievement-kill-spree-5";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10 = "achievement-kill-spree-10";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15 = "achievement-kill-spree-15";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20 = "achievement-kill-spree-20";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25 = "achievement-kill-spree-25";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30 = "achievement-kill-spree-30";
+string PLAYERSTATS_ACHIEVEMENT_BOTLIKE = "achievement-botlike";
+string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood";
+string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
// delay map switch until this is set
float playerstats_waitforme;
// call this whenever a player leaves
void PlayerStats_AddGlobalInfo(entity p);
+
+// call this at the end of the match
+void PlayerStats_EndMatch(float finished);
scores_primary = scores[i];
scores_flags_primary = scoreflags;
}
+ if(label != "")
+ {
+ PlayerStats_AddEvent(strcat(PLAYERSTATS_TOTAL, label));
+ PlayerStats_AddEvent(strcat(PLAYERSTATS_SCOREBOARD, label));
+ }
}
void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags)
if(teamscores_entities_count)
return;
+
if(g_lms) return;
if(g_arena || g_ca) return;
if(g_race && !g_race_qualifying) return;
if(score)
if(scores_label[scorefield] != "")
s.SendFlags |= pow(2, scorefield);
+ PlayerStats_Event(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label[scorefield]), score);
+ s.(scores_accumulated[scorefield]) += score;
return (s.(scores[scorefield]) += score);
}
}
}
+void PlayerScore_PlayerStats(entity p)
+{
+ entity s;
+ float i;
+ s = p.scorekeeper;
+
+ for(i = 0; i < MAX_SCORE; ++i)
+ if(s.(scores[i]) != 0)
+ if(scores_label[i] != "")
+ PlayerStats_Event(s.owner, strcat(PLAYERSTATS_SCOREBOARD, scores_label[i]), s.(scores[i]));
+}
.float scores[MAX_SCORE];
.float teamscores[MAX_TEAMSCORE];
+.float scores_accumulated[MAX_SCORE]; // for player stats only
+
/**
* Attaches a PlayerScore entity to a player. Use that in ClientConnect.
* Remember to detach it in ClientDisconnect!
}
void ScoreRules_generic()
{
- CheckAllowedTeams(world);
if(teams_matter)
{
CheckAllowedTeams(world);
#define SP_KEEPAWAY_PICKUPS 4
#define SP_KEEPAWAY_CARRIERKILLS 5
#define SP_KEEPAWAY_DROPS 6
-#define SP_KEEPAWAY_SCORE 7
+#define SP_KEEPAWAY_TIME 7
void ScoreRules_keepaway()
{
- ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, FALSE); // SFL_SORT_PRIO_PRIMARY
- ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_SCORE, "score", SFL_SORT_PRIO_PRIMARY);
- ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS, "pickups", 0);
+ ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, TRUE); // SFL_SORT_PRIO_PRIMARY
+ ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS, "pickups", 0);
ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_CARRIERKILLS, "bckills", 0);
- ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS, "drops", SFL_LOWER_IS_BETTER);
+ ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS, "drops", SFL_LOWER_IS_BETTER);
+ ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_TIME, "time", SFL_SORT_PRIO_SECONDARY);
+ ScoreRules_basics_end();
+}
+
+// FreezeTag stuff
+#define SP_FREEZETAG_REVIVALS 4
+void ScoreRules_freezetag()
+{
+ CheckAllowedTeams(world);
+ ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY
+ ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS, "revivals", 0);
ScoreRules_basics_end();
}
void CreatureFrame (void)
{
local entity oldself;
- local float dm, maxspeed;
+ local float dm;
oldself = self;
self = findfloat(world, iscreature, TRUE);
while (self)
self.dmg = 2;
}
// check for falling damage
+ float velocity_len = vlen(self.velocity);
if(!self.hook.state && !g_ca && !(g_cts && !autocvar_g_cts_selfdamage))
{
- dm = vlen(self.oldvelocity) - vlen(self.velocity); // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
+ dm = vlen(self.oldvelocity) - velocity_len; // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
if (self.deadflag)
dm = (dm - autocvar_g_balance_falldamage_deadminspeed) * autocvar_g_balance_falldamage_factor;
else
Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');
}
- maxspeed = autocvar_g_maxspeed;
- if(maxspeed > 0 && vlen(self.velocity) > maxspeed)
+ if(autocvar_g_maxspeed > 0 && velocity_len > autocvar_g_maxspeed)
Damage (self, world, world, 100000, DEATH_SHOOTING_STAR, self.origin, '0 0 0');
// play stupid sounds
if (g_footsteps)
if (!gameover)
if (self.flags & FL_ONGROUND)
- if (vlen(self.velocity) > autocvar_sv_maxspeed * 0.6)
+ if (velocity_len > autocvar_sv_maxspeed * 0.6)
if (!self.deadflag)
if (time < self.lastground + 0.2)
{
self.blocked = generic_plat_blocked;
+ self.avelocity_z = 0.0000001;
if not(InitMovingBrushTrigger())
return;
self.angles = '0 0 0';
self.max_health = self.health;
+ self.avelocity = self.movedir;
if not(InitMovingBrushTrigger())
return;
+ self.velocity = '0 0 0';
//self.effects |= EF_LOWPRECISION;
self.classname = "door_rotating";
void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
// Rail -> Rifle
-void spawnfunc_weapon_railgun() { spawnfunc_weapon_campingrifle(); }
+void spawnfunc_weapon_railgun() { spawnfunc_weapon_sniperrifle(); }
void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); }
// BFG -> Crylink
vector turret_stdproc_aim_generic()
{
- vector pre_pos,prep;
- float distance,impact_time,i,mintime;
+ vector pre_pos, prep;
+ float distance, impact_time, i, mintime;
turret_tag_fire_update();
if(self.aim_flags & TFL_AIM_SIMPLE)
return real_origin(self.enemy);
- mintime = max(self.attack_finished_single - time,0) + sys_frametime ;
+ mintime = max(self.attack_finished_single - time,0) + sys_frametime;
// Baseline
pre_pos = real_origin(self.enemy);
// thorw head slightly off aim when hit?
if (self.damage_flags & TFL_DMG_HEADSHAKE)
{
- //baseent.tur_aimoff_x += (random() * damage);
- //baseent.tur_aimoff_y += ((random()*0.75) * damage);
self.tur_head.angles_x = self.tur_head.angles_x + (-0.5 + random()) * damage;
self.tur_head.angles_y = self.tur_head.angles_y + (-0.5 + random()) * damage;
}
if (self.turrcaps_flags & TFL_TURRCAPS_MOVE)
self.velocity = self.velocity + vforce;
- // FIXME: Better damage feedback
- // Start burning when we have 10% or less health left
- //if (self.health < (self.tur_health * 0.1))
- // self.effects = EF_FLAME;
-
+ // FIXME: Better damage feedback?
+
if (self.health <= 0)
{
self.event_damage = SUB_Null;
if (self.ammo < self.ammo_max)
self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max);
+ if (self.health < (self.tur_health * 0.5))
+ if(random() < 0.25)
+ te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
+
// Inactive turrets needs to run the think loop,
// So they can handle animation and wake up if need be.
if not (self.tur_active)
{
e = spawn();
+ /*
setorigin(e,'0 0 0');
setmodel(e,"models/turrets/plasma.md3");
vector v;
//crash();
}
setmodel(e,"");
+ */
e.classname = "turret_manager";
e.think = turrets_manager_think;
// Offsets & origins
if (!self.tur_shotorg) self.tur_shotorg = '50 0 50';
+// Gane hooks
+ if(MUTATOR_CALLHOOK(TurretSpawn))
+ return 0;
+
// End of default & sanety checks, start building the turret.
// Spawn extra bits
activator = ee;
self.use();
}
-
+
turret_stdproc_respawn();
return 1;
}
void turret_fusionreactor_dinit();
void turret_fusionreactor_fire();
-float turret_fusionreactor_firecheck()
-{
- if (self.enemy == world) return 0;
- if not (self.enemy.ammo_flags & TFL_AMMO_RECIVE) return 0;
- if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY) return 0;
- if (self.ammo < self.shot_dmg) return 0;
- if (self.enemy.ammo >= self.enemy.ammo_max) return 0;
- if (self.tur_dist_aimpos > self.target_range) return 0;
- if (self.tur_dist_aimpos < self.target_range_min) return 0;
-
- return 1;
-}
-
void turret_fusionreactor_fire()
{
vector fl_org;
self.enemy.ammo = min(self.enemy.ammo + self.shot_dmg,self.enemy.ammo_max);
fl_org = 0.5 * (self.enemy.absmin + self.enemy.absmax);
te_smallflash(fl_org);
- //te_lightning1(world,self.origin,self.enemy.origin);
}
void turret_fusionreactor_postthink()
{
- float f;
- f = self.ammo / self.ammo_max;
- self.tur_head.avelocity = '0 250 0' * f;
+ self.tur_head.avelocity = '0 250 0' * (self.ammo / self.ammo_max);
}
+/*
void turret_fusionreactor_respawnhook()
{
self.tur_head.avelocity = '0 50 0';
}
+*/
+
+/**
+** Preforms pre-fire checks for fusionreactor
+**/
+float turret_fusionreactor_firecheck()
+{
+ if (self.attack_finished_single > time)
+ return 0;
+
+ if (self.enemy.deadflag != DEAD_NO)
+ return 0;
+
+ if (self.enemy == world)
+ return 0;
+
+ if (self.ammo < self.shot_dmg)
+ return 0;
+
+ if (self.enemy.ammo >= self.enemy.ammo_max)
+ return 0;
+
+ if (vlen(self.enemy.origin - self.origin) > self.target_range)
+ return 0;
+
+ if(self.team != self.enemy.team)
+ return 0;
+
+ if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY)
+ return 0;
+
+ return 1;
+}
void turret_fusionreactor_dinit()
{
self.shoot_flags = TFL_SHOOT_HITALLVALID;
self.aim_flags = TFL_AIM_NO;
self.track_flags = TFL_TRACK_NO;
- self.turret_respawnhook = turret_fusionreactor_respawnhook;
+ // self.turret_respawnhook = turret_fusionreactor_respawnhook;
if (turret_stdproc_init("fusreac_std",0,"models/turrets/base.md3","models/turrets/reactor.md3") == 0)
{
sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, autocvar_g_balance_uzi_bulletconstant);
endFireBallisticBullet();
- if (self.uzi_bulletcounter == 2)
+ if (self.misc_bulletcounter == 2)
{
UziFlash();
setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
- self.uzi_bulletcounter = 0;
+ self.misc_bulletcounter = 0;
}
- self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+ self.misc_bulletcounter = self.misc_bulletcounter + 1;
self.tur_head.frame = self.tur_head.frame + 1;
}
{
// Fire bullets, alternating trails left<->right
self = self.owner;
- if(self.uzi_bulletcounter == 1)
+ if(self.misc_bulletcounter == 1)
{
spiderbot_minigun_fire(self.vehicle.gun1, 0);
spiderbot_minigun_fire(self.vehicle.gun2, 1);
- self.uzi_bulletcounter = 0;
+ self.misc_bulletcounter = 0;
}
else
{
spiderbot_minigun_fire(self.vehicle.gun1, 1);
spiderbot_minigun_fire(self.vehicle.gun2, 0);
- self.uzi_bulletcounter += 1;
+ self.misc_bulletcounter += 1;
}
self = self.vehicle;
#include "w_hook.qc"
#include "w_hlac.qc"
#include "w_tuba.qc"
-#include "w_campingrifle.qc"
+#include "w_sniperrifle.qc"
#include "w_fireball.qc"
#include "w_seeker.qc"
+++ /dev/null
-#ifdef REGISTER_WEAPON
-REGISTER_WEAPON(CAMPINGRIFLE, w_campingrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "campingrifle", "Sniper Rifle");
-#else
-#ifdef SVQC
-//Camping rifle Primary mode: manually operated bolt*, Secondary: full automatic**
-//* Manually operating the bolt means that all the power of the gas is used to propell the bullet. In this mode the bolt is prevented from moving backwards in response to the firing of the bullet.
-//** In fully automatic mode some of the gas is used to extract and reload the next cartrige, thus there is less power and range.
-
-.float campingrifle_accumulator;
-
-float W_CampingRifle_CheckMaxBullets(float checkammo)
-{
- float maxbulls;
- maxbulls = autocvar_g_balance_campingrifle_magazinecapacity;
- if(!maxbulls)
- maxbulls = 8; // match HUD
- if(checkammo)
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- maxbulls = min(maxbulls, floor(self.ammo_nails / min(autocvar_g_balance_campingrifle_primary_ammo, autocvar_g_balance_campingrifle_secondary_ammo)));
- if(self.campingrifle_bulletcounter > maxbulls || !autocvar_g_balance_campingrifle_magazinecapacity)
- self.campingrifle_bulletcounter = maxbulls;
- return (self.campingrifle_bulletcounter == maxbulls);
-}
-
-void W_CampingRifle_ReloadedAndReady()
-{
- float t;
- self.campingrifle_bulletcounter = autocvar_g_balance_campingrifle_magazinecapacity;
- W_CampingRifle_CheckMaxBullets(TRUE);
- t = ATTACK_FINISHED(self) - autocvar_g_balance_campingrifle_reloadtime - 1;
- ATTACK_FINISHED(self) = t;
- w_ready();
-}
-
-float W_CampingRifle_Reload()
-{
- float t;
-
- W_CampingRifle_CheckMaxBullets(TRUE);
-
- if(self.ammo_nails < min(autocvar_g_balance_campingrifle_primary_ammo, autocvar_g_balance_campingrifle_secondary_ammo)) // when we get here, bulletcounter must be 0 or -1
- {
- print("cannot reload... not enough bullets\n");
- self.campingrifle_bulletcounter = -1; // reload later
- W_SwitchToOtherWeapon(self);
- return 0;
- }
-
- if (self.campingrifle_bulletcounter >= autocvar_g_balance_campingrifle_magazinecapacity)
- return 0;
-
- if (self.weaponentity)
- {
- if (self.weaponentity.wframe == WFRAME_RELOAD)
- return 0;
-
- // allow to switch away while reloading, but this will cause a new reload!
- self.weaponentity.state = WS_READY;
- }
-
- sound (self, CHAN_WEAPON2, "weapons/campingrifle_reload.wav", VOL_BASE, ATTN_NORM);
-
- t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_campingrifle_reloadtime + 1;
- ATTACK_FINISHED(self) = t;
-
- weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_campingrifle_reloadtime, W_CampingRifle_ReloadedAndReady);
-
- self.campingrifle_bulletcounter = -1;
-
- return 1;
-}
-
-void W_CampingRifle_CheckReloadAndReady()
-{
- w_ready();
- if(self.campingrifle_bulletcounter <= 0)
- if(W_CampingRifle_Reload())
- return;
-}
-
-void W_CampingRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant)
-{
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- self.ammo_nails -= pAmmo;
-
- if(deathtype & HITTYPE_SECONDARY)
- W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, autocvar_g_balance_campingrifle_secondary_damage + autocvar_g_balance_campingrifle_secondary_headshotaddeddamage);
- else
- W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, autocvar_g_balance_campingrifle_primary_damage + autocvar_g_balance_campingrifle_primary_headshotaddeddamage);
-
- pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
-
- if(self.BUTTON_ZOOM) // if zoomed, shoot from the eye
- {
- w_shotdir = v_forward;
- w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
- }
-
- if(deathtype & HITTYPE_SECONDARY)
- fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_campingrifle_secondary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
- else
- fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_campingrifle_primary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
- endFireBallisticBullet();
-
- 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);
-
- self.campingrifle_bulletcounter = self.campingrifle_bulletcounter - 1;
- W_CampingRifle_CheckMaxBullets(TRUE);
-}
-
-void W_CampingRifle_Attack()
-{
- W_CampingRifle_FireBullet(autocvar_g_balance_campingrifle_primary_spread, autocvar_g_balance_campingrifle_primary_damage, autocvar_g_balance_campingrifle_primary_headshotaddeddamage, autocvar_g_balance_campingrifle_primary_force, autocvar_g_balance_campingrifle_primary_speed, autocvar_g_balance_campingrifle_primary_lifetime, autocvar_g_balance_campingrifle_primary_ammo, WEP_CAMPINGRIFLE, autocvar_g_balance_campingrifle_primary_bulletconstant);
-}
-
-void W_CampingRifle_Attack2()
-{
- W_CampingRifle_FireBullet(autocvar_g_balance_campingrifle_secondary_spread, autocvar_g_balance_campingrifle_secondary_damage, autocvar_g_balance_campingrifle_secondary_headshotaddeddamage, autocvar_g_balance_campingrifle_secondary_force, autocvar_g_balance_campingrifle_secondary_speed, autocvar_g_balance_campingrifle_secondary_lifetime, autocvar_g_balance_campingrifle_secondary_ammo, WEP_CAMPINGRIFLE | HITTYPE_SECONDARY, autocvar_g_balance_campingrifle_secondary_bulletconstant);
-}
-
-void spawnfunc_weapon_campingrifle (void)
-{
- weapon_defaultspawnfunc(WEP_CAMPINGRIFLE);
-}
-
-.void(void) campingrifle_bullethail_attackfunc;
-.float campingrifle_bullethail_frame;
-.float campingrifle_bullethail_animtime;
-.float campingrifle_bullethail_refire;
-void W_CampingRifle_BulletHail_Continue()
-{
- float r, sw, af;
- W_CampingRifle_CheckReloadAndReady();
- if(self.campingrifle_bulletcounter < 0)
- return; // reloading, so we are done
- sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing
- af = ATTACK_FINISHED(self);
- self.switchweapon = self.weapon;
- ATTACK_FINISHED(self) = time;
- print(ftos(self.ammo_nails), "\n");
- r = weapon_prepareattack(self.campingrifle_bullethail_frame == WFRAME_FIRE2, self.campingrifle_bullethail_refire);
- if(self.switchweapon == self.weapon)
- self.switchweapon = sw;
- if(r)
- {
- self.campingrifle_bullethail_attackfunc();
- weapon_thinkf(self.campingrifle_bullethail_frame, self.campingrifle_bullethail_animtime, W_CampingRifle_BulletHail_Continue);
- print("thinkf set\n");
- }
- else
- {
- ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time
- print("out of ammo... ", ftos(self.weaponentity.state), "\n");
- }
-}
-
-void W_CampingRifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire)
-{
- // if we get here, we have at least one bullet to fire
- AttackFunc();
- if(mode)
- {
- // continue hail
- self.campingrifle_bullethail_attackfunc = AttackFunc;
- self.campingrifle_bullethail_frame = fr;
- self.campingrifle_bullethail_animtime = animtime;
- self.campingrifle_bullethail_refire = refire;
- weapon_thinkf(fr, animtime, W_CampingRifle_BulletHail_Continue);
- }
- else
- {
- // just one shot
- weapon_thinkf(fr, animtime, W_CampingRifle_CheckReloadAndReady);
- }
-}
-
-.float bot_secondary_campingriflemooth;
-float w_campingrifle(float req)
-{
- float full;
- if (req == WR_AIM)
- {
- self.BUTTON_ATCK=FALSE;
- self.BUTTON_ATCK2=FALSE;
- if(vlen(self.origin-self.enemy.origin) > 1000)
- self.bot_secondary_campingriflemooth = 0;
- if(self.bot_secondary_campingriflemooth == 0)
- {
- if(bot_aim(autocvar_g_balance_campingrifle_primary_speed, 0, autocvar_g_balance_campingrifle_primary_lifetime, TRUE))
- {
- self.BUTTON_ATCK = TRUE;
- if(random() < 0.01) self.bot_secondary_campingriflemooth = 1;
- }
- }
- else
- {
- if(bot_aim(autocvar_g_balance_campingrifle_secondary_speed, 0, autocvar_g_balance_campingrifle_secondary_lifetime, TRUE))
- {
- self.BUTTON_ATCK2 = TRUE;
- if(random() < 0.03) self.bot_secondary_campingriflemooth = 0;
- }
- }
- }
- else if (req == WR_THINK)
- {
- if(self.campingrifle_bulletcounter < 0) // forced reload (e.g. because interrupted)
- {
- if(self.switchweapon == self.weapon)
- if(self.weaponentity.state == WS_READY)
- W_CampingRifle_Reload();
- }
- else
- {
- self.campingrifle_accumulator = bound(time - autocvar_g_balance_campingrifle_bursttime, self.campingrifle_accumulator, time);
- if (self.BUTTON_ATCK)
- if (weapon_prepareattack_check(0, autocvar_g_balance_campingrifle_primary_refire))
- if (time >= self.campingrifle_accumulator + autocvar_g_balance_campingrifle_primary_burstcost)
- {
- weapon_prepareattack_do(0, autocvar_g_balance_campingrifle_primary_refire);
- W_CampingRifle_BulletHail(autocvar_g_balance_campingrifle_primary_bullethail, W_CampingRifle_Attack, WFRAME_FIRE1, autocvar_g_balance_campingrifle_primary_animtime, autocvar_g_balance_campingrifle_primary_refire);
- self.campingrifle_accumulator += autocvar_g_balance_campingrifle_primary_burstcost;
- }
- if (self.BUTTON_ATCK2)
- {
- if (autocvar_g_balance_campingrifle_secondary)
- {
- if (weapon_prepareattack_check(1, autocvar_g_balance_campingrifle_secondary_refire))
- if (time >= self.campingrifle_accumulator + autocvar_g_balance_campingrifle_secondary_burstcost)
- {
- weapon_prepareattack_do(1, autocvar_g_balance_campingrifle_secondary_refire);
- W_CampingRifle_BulletHail(autocvar_g_balance_campingrifle_secondary_bullethail, W_CampingRifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_campingrifle_secondary_animtime, autocvar_g_balance_campingrifle_primary_refire);
- self.campingrifle_accumulator += autocvar_g_balance_campingrifle_secondary_burstcost;
- }
- }
- }
- }
- }
- else if (req == WR_PRECACHE)
- {
- precache_model ("models/weapons/g_campingrifle.md3");
- precache_model ("models/weapons/v_campingrifle.md3");
- precache_model ("models/weapons/h_campingrifle.iqm");
- precache_sound ("weapons/campingrifle_reload.wav");
- precache_sound ("weapons/campingrifle_fire.wav");
- precache_sound ("weapons/campingrifle_fire2.wav");
- }
- else if (req == WR_SETUP)
- {
- weapon_setup(WEP_CAMPINGRIFLE);
-
- full = W_CampingRifle_CheckMaxBullets(TRUE);
- if(autocvar_g_balance_campingrifle_auto_reload_on_switch)
- if(!full)
- self.campingrifle_bulletcounter = -1;
- }
- else if (req == WR_CHECKAMMO1)
- return self.ammo_nails >= autocvar_g_balance_campingrifle_primary_ammo;
- else if (req == WR_CHECKAMMO2)
- return self.ammo_nails >= autocvar_g_balance_campingrifle_secondary_ammo;
- else if (req == WR_RELOAD)
- {
- W_CampingRifle_Reload();
- }
- else if (req == WR_RESETPLAYER)
- {
- self.campingrifle_accumulator = time - autocvar_g_balance_campingrifle_bursttime;
- self.campingrifle_bulletcounter = autocvar_g_balance_campingrifle_magazinecapacity;
- W_CampingRifle_CheckMaxBullets(FALSE);
- }
- return TRUE;
-};
-#endif
-#ifdef CSQC
-float w_campingrifle(float req)
-{
- if(req == WR_IMPACTEFFECT)
- {
- vector org2;
- org2 = w_org + w_backoff * 2;
- pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
- if(!w_issilent)
- {
- if(w_random < 0.2)
- sound(self, CHAN_PROJECTILE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
- else if(w_random < 0.4)
- sound(self, CHAN_PROJECTILE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
- else if(w_random < 0.5)
- sound(self, CHAN_PROJECTILE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
- }
- }
- else if(req == WR_PRECACHE)
- {
- precache_sound("weapons/ric1.wav");
- precache_sound("weapons/ric2.wav");
- precache_sound("weapons/ric3.wav");
- }
- else if (req == WR_SUICIDEMESSAGE)
- {
- if(w_deathtype & HITTYPE_SECONDARY)
- w_deathtypestring = "%s shot themself automatically";
- else
- w_deathtypestring = "%s sniped themself somehow";
- }
- else if (req == WR_KILLMESSAGE)
- {
- if(w_deathtype & HITTYPE_SECONDARY)
- {
- if(w_deathtype & HITTYPE_BOUNCE)
- w_deathtypestring = "%s failed to hide from %s's bullet hail";
- else
- w_deathtypestring = "%s died in %s's bullet hail";
- }
- else
- {
- if(w_deathtype & HITTYPE_BOUNCE)
- {
- // TODO special headshot message here too?
- w_deathtypestring = "%s failed to hide from %s's rifle";
- }
- else
- {
- if(w_deathtype & HITTYPE_HEADSHOT)
- w_deathtypestring = "%s got hit in the head by %s";
- else
- w_deathtypestring = "%s was sniped by %s";
- }
- }
- }
- return TRUE;
-}
-#endif
-#endif
}
.float railgundistance;
+.vector railgunforce;
void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype)
{
local vector hitloc, force, endpoint, dir;
trace_ent.railgunhitloc = end;
trace_ent.railgunhitsolidbackup = trace_ent.solid;
trace_ent.railgundistance = vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - start);
+ trace_ent.railgunforce = WarpZone_TransformVelocity(WarpZone_trace_transform, force);
// stop if this is a wall
if (trace_ent.solid == SOLID_BSP)
// apply the damage
if (ent.takedamage)
- Damage (ent, self, self, bdamage * f, deathtype, hitloc, force * ffs);
+ Damage (ent, self, self, bdamage * f, deathtype, hitloc, ent.railgunforce * ffs);
// create a small explosion to throw gibs around (if applicable)
//setorigin (explosion, hitloc);
if(headshot)
f *= q;
- if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_CAMPINGRIFLE)
+ if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_SNIPERRIFLE)
{
if(headshot)
AnnounceTo(self.owner, "headshot");
proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_other_fadetime;
proj.nextthink = time + autocvar_g_balance_crylink_primary_other_lifetime + autocvar_g_balance_crylink_primary_other_fadetime;
}
+ proj.teleport_time = time + autocvar_g_balance_crylink_primary_joindelay;
proj.cnt = autocvar_g_balance_crylink_primary_bounces;
//proj.scale = 1 + 1 * proj.cnt;
proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_line_fadetime;
proj.nextthink = time + autocvar_g_balance_crylink_secondary_line_lifetime + autocvar_g_balance_crylink_secondary_line_fadetime;
}
+ proj.teleport_time = time + autocvar_g_balance_crylink_secondary_joindelay;
proj.cnt = autocvar_g_balance_crylink_secondary_bounces;
//proj.scale = 1 + 1 * proj.cnt;
}
else
{
- if (self.crylink_waitrelease)
+ if (self.crylink_waitrelease && (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time))
{
// fired and released now!
if(self.crylink_lastgroup)
vector pos;
entity linkjoineffect;
-
if(self.crylink_waitrelease == 1)
{
pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
linkjoineffect.owner = self;
setorigin(linkjoineffect, pos);
-
-
}
self.crylink_waitrelease = 0;
if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
remove(self);
return;
}
- if (self.owner.weaponentity.state != WS_INUSE || (self.owner.ammo_cells <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK || (g_freezetag && self.owner.freezetag_frozen))
+ if (self.owner.weaponentity.state != WS_INUSE || (self.owner.ammo_cells <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK || self.owner.freezetag_frozen)
{
if(self == self.owner.lgbeam)
self.owner.lgbeam = world;
entity beam, oldself;
self.lgbeam = beam = spawn();
+ beam.classname = "lgbeam";
beam.solid = SOLID_NOT;
beam.think = lgbeam_think;
beam.owner = self;
{
if (self.BUTTON_ATCK)
{
+ if(autocvar_g_balance_electro_lightning)
+ if(self.BUTTON_ATCK_prev)
+ {
+ // prolong the animtime while the gun is being fired
+ if(self.animstate_startframe == self.anim_shoot_x && self.animstate_numframes == self.anim_shoot_y)
+ weapon_thinkf(WFRAME_DONTCHANGE, autocvar_g_balance_electro_primary_animtime, w_ready);
+ else
+ weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
+ }
if (weapon_prepareattack(0, (autocvar_g_balance_electro_lightning ? 0 : autocvar_g_balance_electro_primary_refire)))
{
if(autocvar_g_balance_electro_lightning)
{
W_Electro_Attack3();
}
- self.BUTTON_ATCK_prev = 1;
+ if(!self.BUTTON_ATCK_prev)
+ {
+ weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
+ self.BUTTON_ATCK_prev = 1;
+ }
}
else
{
W_Electro_Attack();
+ weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
}
- weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
}
} else {
if(autocvar_g_balance_electro_lightning)
{
if (self.BUTTON_ATCK_prev != 0)
{
+ weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_electro_primary_animtime, w_ready);
ATTACK_FINISHED(self) = time + autocvar_g_balance_electro_primary_refire * W_WeaponRateFactor();
}
self.BUTTON_ATCK_prev = 0;
W_Electro_Attack2();
self.electro_count = autocvar_g_balance_electro_secondary_count;
weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_electro_secondary_animtime, w_electro_checkattack);
- self.electro_secondarytime = time + autocvar_g_balance_electro_secondary_refire2;
+ self.electro_secondarytime = time + autocvar_g_balance_electro_secondary_refire2 * W_WeaponRateFactor();
}
}
else if (req == WR_PRECACHE)
REGISTER_WEAPON(HLAC, w_hlac, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hlac", "hlac", "Heavy Laser Assault Cannon");
#else
#ifdef SVQC
-.float HLAC_bulletcounter;
-void W_HLAC_Touch (void)
-{
- PROJECTILE_TOUCH;
- self.event_damage = SUB_Null;
-
- RadiusDamage (self, self.owner, autocvar_g_balance_hlac_primary_damage, autocvar_g_balance_hlac_primary_edgedamage, autocvar_g_balance_hlac_primary_radius, world, autocvar_g_balance_hlac_primary_force, self.projectiledeathtype, other);
-
- remove (self);
-}
-
-void W_HLAC_Touch2 (void)
+void W_HLAC_Touch (void)
{
PROJECTILE_TOUCH;
self.event_damage = SUB_Null;
-
- RadiusDamage (self, self.owner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
+
+ if(self.projectiledeathtype & HITTYPE_SECONDARY)
+ RadiusDamage (self, self.owner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
+ else
+ RadiusDamage (self, self.owner, autocvar_g_balance_hlac_primary_damage, autocvar_g_balance_hlac_primary_edgedamage, autocvar_g_balance_hlac_primary_radius, world, autocvar_g_balance_hlac_primary_force, self.projectiledeathtype, other);
remove (self);
}
self.ammo_cells = self.ammo_cells - autocvar_g_balance_hlac_primary_ammo;
}
- spread = autocvar_g_balance_hlac_primary_spread_min + (autocvar_g_balance_hlac_primary_spread_add * self.HLAC_bulletcounter);
+ spread = autocvar_g_balance_hlac_primary_spread_min + (autocvar_g_balance_hlac_primary_spread_add * self.misc_bulletcounter);
spread = min(spread,autocvar_g_balance_hlac_primary_spread_max);
if(self.crouch)
spread = spread * autocvar_g_balance_hlac_primary_spread_crouchmod;
missile = spawn ();
missile.owner = self;
missile.classname = "hlacbolt";
- // missile.dmg = issecondary;
missile.bot_dodge = TRUE;
missile.bot_dodgerating = autocvar_g_balance_hlac_primary_damage;
setsize(missile, '0 0 0', '0 0 0');
W_SetupProjectileVelocity(missile, autocvar_g_balance_hlac_primary_speed, spread);
- missile.angles = vectoangles (missile.velocity);
+ //missile.angles = vectoangles (missile.velocity); // csqc
missile.touch = W_HLAC_Touch;
missile.think = SUB_Remove;
missile = spawn ();
missile.owner = self;
missile.classname = "hlacbolt";
- // missile.dmg = issecondary;
missile.bot_dodge = TRUE;
missile.bot_dodgerating = autocvar_g_balance_hlac_secondary_damage;
setsize(missile, '0 0 0', '0 0 0');
W_SetupProjectileVelocity(missile, autocvar_g_balance_hlac_secondary_speed, spread);
- missile.angles = vectoangles (missile.velocity);
+ //missile.angles = vectoangles (missile.velocity); // csqc
- missile.touch = W_HLAC_Touch2;
+ missile.touch = W_HLAC_Touch;
missile.think = SUB_Remove;
missile.nextthink = time + autocvar_g_balance_hlac_secondary_lifetime;
ATTACK_FINISHED(self) = time + autocvar_g_balance_hlac_primary_refire * W_WeaponRateFactor();
W_HLAC_Attack();
- self.HLAC_bulletcounter = self.HLAC_bulletcounter + 1;
+ self.misc_bulletcounter = self.misc_bulletcounter + 1;
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hlac_primary_refire, HLAC_fire1_02);
}
else
if (self.BUTTON_ATCK)
if (weapon_prepareattack(0, autocvar_g_balance_hlac_primary_refire))
{
- self.HLAC_bulletcounter = 0;
+ self.misc_bulletcounter = 0;
W_HLAC_Attack();
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hlac_primary_refire, HLAC_fire1_02);
}
#ifdef REGISTER_WEAPON
-REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "minelayer", "minelayer", "Mine Layer");
+REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "minelayer", "minelayer", "Mine Layer");
#else
#ifdef SVQC
void W_Mine_Think (void);
{
charge = autocvar_g_balance_nex_charge_mindmg / mydmg + (1 - autocvar_g_balance_nex_charge_mindmg / mydmg) * self.nex_charge;
self.nex_charge *= autocvar_g_balance_nex_charge_shot_multiplier; // do this AFTER setting mydmg/myforce
- // O RLY? -- divVerent
- // YA RLY -- FruitieX
+ // O RLY? -- divVerent
+ // YA RLY -- FruitieX
}
else
charge = 1;
myforce *= charge;
W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
- if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
- {
- sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
- }
+ if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
+ {
+ sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
+ }
yoda = 0;
FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
//beam and muzzle flash done on client
SendCSQCNexBeamParticle(charge);
-
+
// flash and burn the wall
if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
Damage_DamageInfo(trace_endpos, mydmg, 0, 0, myforce * w_shotdir, WEP_NEX, self);
if(autocvar_g_balance_nex_charge && self.nex_charge < autocvar_g_balance_nex_charge_limit)
self.nex_charge = min(1, self.nex_charge + autocvar_g_balance_nex_charge_rate * frametime / W_TICSPERFRAME);
- if(autocvar_g_balance_nex_charge)
- {
- self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
- self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
- self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-
- if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
- {
- self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
- self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
- self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
- }
- }
-
if(autocvar_g_balance_nex_secondary_chargepool)
- if(self.nex_chargepool_ammo < 1)
- {
- if(self.nex_chargepool_pauseregen_finished < time)
- self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME);
- self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen);
- }
+ if(self.nex_chargepool_ammo < 1)
+ {
+ if(self.nex_chargepool_pauseregen_finished < time)
+ self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME);
+ self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen);
+ }
if (self.BUTTON_ATCK)
{
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_nex_primary_animtime, w_ready);
}
}
- if (self.BUTTON_ATCK2)
+ if ((autocvar_g_balance_nex_secondary_charge && !autocvar_g_balance_nex_secondary) ? self.BUTTON_ZOOM : self.BUTTON_ATCK2)
{
if(autocvar_g_balance_nex_secondary_charge)
{
self.nex_charge_rottime = time + autocvar_g_balance_nex_charge_rot_pause;
dt = frametime / W_TICSPERFRAME;
- if(autocvar_g_balance_nex_secondary_chargepool)
+ if(self.nex_charge < 1)
{
- if(autocvar_g_balance_nex_secondary_ammo)
+ if(autocvar_g_balance_nex_secondary_chargepool)
{
- // always deplete if secondary is held
- self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - autocvar_g_balance_nex_secondary_ammo * dt);
+ if(autocvar_g_balance_nex_secondary_ammo)
+ {
+ // always deplete if secondary is held
+ self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - autocvar_g_balance_nex_secondary_ammo * dt);
- dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
- self.nex_chargepool_pauseregen_finished = time + autocvar_g_balance_nex_secondary_chargepool_pause_regen;
- dt = min(dt, self.nex_chargepool_ammo);
- dt = max(0, dt);
+ dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
+ self.nex_chargepool_pauseregen_finished = time + autocvar_g_balance_nex_secondary_chargepool_pause_regen;
+ dt = min(dt, self.nex_chargepool_ammo);
+ dt = max(0, dt);
- self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
+ self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
+ }
}
- }
- else if(autocvar_g_balance_nex_secondary_ammo)
- {
- if(self.nex_charge < 1)
+ else if(autocvar_g_balance_nex_secondary_ammo)
{
- dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed
{
- dt = min(dt, (self.ammo_cells - autocvar_g_balance_nex_primary_ammo) / autocvar_g_balance_nex_secondary_ammo);
- dt = max(0, dt);
- if(dt > 0)
+ dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
- self.ammo_cells = max(autocvar_g_balance_nex_secondary_ammo, self.ammo_cells - autocvar_g_balance_nex_secondary_ammo * dt);
+ dt = min(dt, (self.ammo_cells - autocvar_g_balance_nex_primary_ammo) / autocvar_g_balance_nex_secondary_ammo);
+ dt = max(0, dt);
+ if(dt > 0)
+ {
+ self.ammo_cells = max(autocvar_g_balance_nex_secondary_ammo, self.ammo_cells - autocvar_g_balance_nex_secondary_ammo * dt);
+ }
}
+ self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
}
+ }
+
+ else
+ {
+ dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
}
}
}
}
}
+
+ if(autocvar_g_balance_nex_charge)
+ {
+ self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+ self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+ self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+
+ if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
+ {
+ self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+ self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+ self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+ }
+ }
}
else if (req == WR_PRECACHE)
{
vector angle;
angle = v_forward;
+ float meleetime;
+ meleetime = autocvar_g_balance_shotgun_secondary_melee_time * W_WeaponRateFactor();
+
// perform trace
float f;
- f = (self.cnt + autocvar_g_balance_shotgun_secondary_melee_time - time) / autocvar_g_balance_shotgun_secondary_melee_time * 2 - 1;
+ f = (self.cnt + meleetime - time) / meleetime * 2 - 1;
vector targpos;
targpos = self.owner.origin + self.owner.view_ofs + angle * autocvar_g_balance_shotgun_secondary_melee_range + v_right * f * autocvar_g_balance_shotgun_secondary_melee_swing + v_up * f * autocvar_g_balance_shotgun_secondary_melee_swing;
Damage (trace_ent, self.owner, self.owner, autocvar_g_balance_shotgun_secondary_damage * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
remove(self);
}
- else if(time >= self.cnt + autocvar_g_balance_shotgun_secondary_melee_time) // missed, remove ent
+ else if(time >= self.cnt + meleetime) // missed, remove ent
remove(self);
else // continue swinging the weapon in hope of hitting someone :)
self.nextthink = time;
--- /dev/null
+#ifdef REGISTER_WEAPON
+REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "sniperrifle", "Sniper Rifle");
+#else
+#ifdef SVQC
+//Sniper rifle Primary mode: manually operated bolt*, Secondary: full automatic**
+//* Manually operating the bolt means that all the power of the gas is used to propell the bullet. In this mode the bolt is prevented from moving backwards in response to the firing of the bullet.
+//** In fully automatic mode some of the gas is used to extract and reload the next cartrige, thus there is less power and range.
+
+.float sniperrifle_accumulator;
+
+float W_SniperRifle_CheckMaxBullets(float checkammo)
+{
+ float maxbulls;
+ maxbulls = autocvar_g_balance_sniperrifle_magazinecapacity;
+ if(!maxbulls)
+ maxbulls = 8; // match HUD
+ if(checkammo)
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ maxbulls = min(maxbulls, floor(self.ammo_nails / min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo)));
+ if(self.sniperrifle_bulletcounter > maxbulls || !autocvar_g_balance_sniperrifle_magazinecapacity)
+ self.sniperrifle_bulletcounter = maxbulls;
+ return (self.sniperrifle_bulletcounter == maxbulls);
+}
+
+void W_SniperRifle_ReloadedAndReady()
+{
+ float t;
+ self.sniperrifle_bulletcounter = autocvar_g_balance_sniperrifle_magazinecapacity;
+ W_SniperRifle_CheckMaxBullets(TRUE);
+ t = ATTACK_FINISHED(self) - autocvar_g_balance_sniperrifle_reloadtime - 1;
+ ATTACK_FINISHED(self) = t;
+ w_ready();
+}
+
+float W_SniperRifle_Reload()
+{
+ float t;
+
+ W_SniperRifle_CheckMaxBullets(TRUE);
+
+ if(self.ammo_nails < min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo)) // when we get here, bulletcounter must be 0 or -1
+ {
+ print("cannot reload... not enough bullets\n");
+ self.sniperrifle_bulletcounter = -1; // reload later
+ W_SwitchToOtherWeapon(self);
+ return 0;
+ }
+
+ if (self.sniperrifle_bulletcounter >= autocvar_g_balance_sniperrifle_magazinecapacity)
+ return 0;
+
+ if (self.weaponentity)
+ {
+ if (self.weaponentity.wframe == WFRAME_RELOAD)
+ return 0;
+
+ // allow to switch away while reloading, but this will cause a new reload!
+ self.weaponentity.state = WS_READY;
+ }
+
+ sound (self, CHAN_WEAPON2, "weapons/campingrifle_reload.wav", VOL_BASE, ATTN_NORM);
+
+ t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_sniperrifle_reloadtime + 1;
+ ATTACK_FINISHED(self) = t;
+
+ weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_sniperrifle_reloadtime, W_SniperRifle_ReloadedAndReady);
+
+ self.sniperrifle_bulletcounter = -1;
+
+ return 1;
+}
+
+void W_SniperRifle_CheckReloadAndReady()
+{
+ w_ready();
+ if(self.sniperrifle_bulletcounter <= 0)
+ if(W_SniperRifle_Reload())
+ return;
+}
+
+void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant)
+{
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ self.ammo_nails -= pAmmo;
+
+ if(deathtype & HITTYPE_SECONDARY)
+ W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, autocvar_g_balance_sniperrifle_secondary_damage + autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage);
+ else
+ W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, autocvar_g_balance_sniperrifle_primary_damage + autocvar_g_balance_sniperrifle_primary_headshotaddeddamage);
+
+ pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
+
+ if(self.BUTTON_ZOOM) // if zoomed, shoot from the eye
+ {
+ w_shotdir = v_forward;
+ w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
+ }
+
+ if(deathtype & HITTYPE_SECONDARY)
+ fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_sniperrifle_secondary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
+ else
+ fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (autocvar_g_balance_sniperrifle_primary_tracer ? EF_RED : EF_BLUE), 1, pBulletConstant);
+ endFireBallisticBullet();
+
+ 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);
+
+ self.sniperrifle_bulletcounter = self.sniperrifle_bulletcounter - 1;
+ W_SniperRifle_CheckMaxBullets(TRUE);
+}
+
+void W_SniperRifle_Attack()
+{
+ W_SniperRifle_FireBullet(autocvar_g_balance_sniperrifle_primary_spread, autocvar_g_balance_sniperrifle_primary_damage, autocvar_g_balance_sniperrifle_primary_headshotaddeddamage, autocvar_g_balance_sniperrifle_primary_force, autocvar_g_balance_sniperrifle_primary_speed, autocvar_g_balance_sniperrifle_primary_lifetime, autocvar_g_balance_sniperrifle_primary_ammo, WEP_SNIPERRIFLE, autocvar_g_balance_sniperrifle_primary_bulletconstant);
+}
+
+void W_SniperRifle_Attack2()
+{
+ W_SniperRifle_FireBullet(autocvar_g_balance_sniperrifle_secondary_spread, autocvar_g_balance_sniperrifle_secondary_damage, autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage, autocvar_g_balance_sniperrifle_secondary_force, autocvar_g_balance_sniperrifle_secondary_speed, autocvar_g_balance_sniperrifle_secondary_lifetime, autocvar_g_balance_sniperrifle_secondary_ammo, WEP_SNIPERRIFLE | HITTYPE_SECONDARY, autocvar_g_balance_sniperrifle_secondary_bulletconstant);
+}
+
+void spawnfunc_weapon_sniperrifle (void)
+{
+ weapon_defaultspawnfunc(WEP_SNIPERRIFLE);
+}
+
+// compatibility alias
+void spawnfunc_weapon_campingrifle (void)
+{
+ spawnfunc_weapon_sniperrifle();
+}
+
+.void(void) sniperrifle_bullethail_attackfunc;
+.float sniperrifle_bullethail_frame;
+.float sniperrifle_bullethail_animtime;
+.float sniperrifle_bullethail_refire;
+void W_SniperRifle_BulletHail_Continue()
+{
+ float r, sw, af;
+ W_SniperRifle_CheckReloadAndReady();
+ if(self.sniperrifle_bulletcounter < 0)
+ return; // reloading, so we are done
+ sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing
+ af = ATTACK_FINISHED(self);
+ self.switchweapon = self.weapon;
+ ATTACK_FINISHED(self) = time;
+ print(ftos(self.ammo_nails), "\n");
+ r = weapon_prepareattack(self.sniperrifle_bullethail_frame == WFRAME_FIRE2, self.sniperrifle_bullethail_refire);
+ if(self.switchweapon == self.weapon)
+ self.switchweapon = sw;
+ if(r)
+ {
+ self.sniperrifle_bullethail_attackfunc();
+ weapon_thinkf(self.sniperrifle_bullethail_frame, self.sniperrifle_bullethail_animtime, W_SniperRifle_BulletHail_Continue);
+ print("thinkf set\n");
+ }
+ else
+ {
+ ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time
+ print("out of ammo... ", ftos(self.weaponentity.state), "\n");
+ }
+}
+
+void W_SniperRifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire)
+{
+ // if we get here, we have at least one bullet to fire
+ AttackFunc();
+ if(mode)
+ {
+ // continue hail
+ self.sniperrifle_bullethail_attackfunc = AttackFunc;
+ self.sniperrifle_bullethail_frame = fr;
+ self.sniperrifle_bullethail_animtime = animtime;
+ self.sniperrifle_bullethail_refire = refire;
+ weapon_thinkf(fr, animtime, W_SniperRifle_BulletHail_Continue);
+ }
+ else
+ {
+ // just one shot
+ weapon_thinkf(fr, animtime, W_SniperRifle_CheckReloadAndReady);
+ }
+}
+
+.float bot_secondary_sniperriflemooth;
+float w_sniperrifle(float req)
+{
+ float full;
+ if (req == WR_AIM)
+ {
+ self.BUTTON_ATCK=FALSE;
+ self.BUTTON_ATCK2=FALSE;
+ if(vlen(self.origin-self.enemy.origin) > 1000)
+ self.bot_secondary_sniperriflemooth = 0;
+ if(self.bot_secondary_sniperriflemooth == 0)
+ {
+ if(bot_aim(autocvar_g_balance_sniperrifle_primary_speed, 0, autocvar_g_balance_sniperrifle_primary_lifetime, TRUE))
+ {
+ self.BUTTON_ATCK = TRUE;
+ if(random() < 0.01) self.bot_secondary_sniperriflemooth = 1;
+ }
+ }
+ else
+ {
+ if(bot_aim(autocvar_g_balance_sniperrifle_secondary_speed, 0, autocvar_g_balance_sniperrifle_secondary_lifetime, TRUE))
+ {
+ self.BUTTON_ATCK2 = TRUE;
+ if(random() < 0.03) self.bot_secondary_sniperriflemooth = 0;
+ }
+ }
+ }
+ else if (req == WR_THINK)
+ {
+ if(self.sniperrifle_bulletcounter < 0) // forced reload (e.g. because interrupted)
+ {
+ self.wish_reload = 1;
+ }
+ else
+ {
+ self.sniperrifle_accumulator = bound(time - autocvar_g_balance_sniperrifle_bursttime, self.sniperrifle_accumulator, time);
+ if (self.BUTTON_ATCK)
+ if (weapon_prepareattack_check(0, autocvar_g_balance_sniperrifle_primary_refire))
+ if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_primary_burstcost)
+ {
+ weapon_prepareattack_do(0, autocvar_g_balance_sniperrifle_primary_refire);
+ W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_primary_bullethail, W_SniperRifle_Attack, WFRAME_FIRE1, autocvar_g_balance_sniperrifle_primary_animtime, autocvar_g_balance_sniperrifle_primary_refire);
+ self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_primary_burstcost;
+ }
+ if (self.BUTTON_ATCK2)
+ {
+ if (autocvar_g_balance_sniperrifle_secondary)
+ {
+ if(autocvar_g_balance_sniperrifle_secondary_reload)
+ self.wish_reload = 1;
+ else
+ {
+ if (weapon_prepareattack_check(1, autocvar_g_balance_sniperrifle_secondary_refire))
+ if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_secondary_burstcost)
+ {
+ weapon_prepareattack_do(1, autocvar_g_balance_sniperrifle_secondary_refire);
+ W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_secondary_bullethail, W_SniperRifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_sniperrifle_secondary_animtime, autocvar_g_balance_sniperrifle_primary_refire);
+ self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_secondary_burstcost;
+ }
+ }
+ }
+ }
+ }
+ if(self.wish_reload)
+ {
+ if(self.switchweapon == self.weapon)
+ {
+ if(self.weaponentity.state == WS_READY)
+ {
+ self.wish_reload = 0;
+ W_SniperRifle_Reload();
+ }
+ }
+ }
+ }
+ else if (req == WR_PRECACHE)
+ {
+ precache_model ("models/weapons/g_campingrifle.md3");
+ precache_model ("models/weapons/v_campingrifle.md3");
+ precache_model ("models/weapons/h_campingrifle.iqm");
+ precache_sound ("weapons/campingrifle_reload.wav");
+ precache_sound ("weapons/campingrifle_fire.wav");
+ precache_sound ("weapons/campingrifle_fire2.wav");
+ }
+ else if (req == WR_SETUP)
+ {
+ weapon_setup(WEP_SNIPERRIFLE);
+
+ full = W_SniperRifle_CheckMaxBullets(TRUE);
+ if(autocvar_g_balance_sniperrifle_auto_reload_on_switch)
+ if(!full)
+ self.sniperrifle_bulletcounter = -1;
+ }
+ else if (req == WR_CHECKAMMO1)
+ return self.ammo_nails >= autocvar_g_balance_sniperrifle_primary_ammo;
+ else if (req == WR_CHECKAMMO2)
+ return self.ammo_nails >= autocvar_g_balance_sniperrifle_secondary_ammo;
+ else if (req == WR_RELOAD)
+ {
+ self.wish_reload = 1;
+ }
+ else if (req == WR_RESETPLAYER)
+ {
+ self.sniperrifle_accumulator = time - autocvar_g_balance_sniperrifle_bursttime;
+ self.sniperrifle_bulletcounter = autocvar_g_balance_sniperrifle_magazinecapacity;
+ W_SniperRifle_CheckMaxBullets(FALSE);
+ }
+ return TRUE;
+};
+#endif
+#ifdef CSQC
+float w_sniperrifle(float req)
+{
+ if(req == WR_IMPACTEFFECT)
+ {
+ vector org2;
+ org2 = w_org + w_backoff * 2;
+ pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+ if(!w_issilent)
+ {
+ if(w_random < 0.2)
+ sound(self, CHAN_PROJECTILE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+ else if(w_random < 0.4)
+ sound(self, CHAN_PROJECTILE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+ else if(w_random < 0.5)
+ sound(self, CHAN_PROJECTILE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+ }
+ }
+ else if(req == WR_PRECACHE)
+ {
+ precache_sound("weapons/ric1.wav");
+ precache_sound("weapons/ric2.wav");
+ precache_sound("weapons/ric3.wav");
+ }
+ else if (req == WR_SUICIDEMESSAGE)
+ {
+ if(w_deathtype & HITTYPE_SECONDARY)
+ w_deathtypestring = "%s shot themself automatically";
+ else
+ w_deathtypestring = "%s sniped themself somehow";
+ }
+ else if (req == WR_KILLMESSAGE)
+ {
+ if(w_deathtype & HITTYPE_SECONDARY)
+ {
+ if(w_deathtype & HITTYPE_BOUNCE)
+ w_deathtypestring = "%s failed to hide from %s's bullet hail";
+ else
+ w_deathtypestring = "%s died in %s's bullet hail";
+ }
+ else
+ {
+ if(w_deathtype & HITTYPE_BOUNCE)
+ {
+ // TODO special headshot message here too?
+ w_deathtypestring = "%s failed to hide from %s's rifle";
+ }
+ else
+ {
+ if(w_deathtype & HITTYPE_HEADSHOT)
+ w_deathtypestring = "%s got hit in the head by %s";
+ else
+ w_deathtypestring = "%s was sniped by %s";
+ }
+ }
+ }
+ return TRUE;
+}
+#endif
+#endif
REGISTER_WEAPON(UZI, w_uzi, IT_NAILS, 3, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "uzi", "uzi", "Machine Gun");
#else
#ifdef SVQC
-.entity muzzle_flash;
// leilei's fancy muzzleflash stuff
void Uzi_Flash_Go()
self.muzzle_flash.owner = self;
}
-.float uzi_bulletcounter;
void W_Uzi_Attack (float deathtype)
{
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
{
- if (self.uzi_bulletcounter == 1)
+ if (self.misc_bulletcounter == 1)
self.ammo_nails = self.ammo_nails - autocvar_g_balance_uzi_first_ammo;
else
self.ammo_nails = self.ammo_nails - autocvar_g_balance_uzi_sustained_ammo;
}
- W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.uzi_bulletcounter == 1) ? autocvar_g_balance_uzi_first_damage : autocvar_g_balance_uzi_sustained_damage));
+ W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.misc_bulletcounter == 1) ? autocvar_g_balance_uzi_first_damage : autocvar_g_balance_uzi_sustained_damage));
if (!g_norecoil)
{
self.punchangle_x = random () - 0.5;
// this attack_finished just enforces a cooldown at the end of a burst
ATTACK_FINISHED(self) = time + autocvar_g_balance_uzi_first_refire * W_WeaponRateFactor();
- if (self.uzi_bulletcounter == 1)
+ 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, 0, autocvar_g_balance_uzi_first_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
else
fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, 0, autocvar_g_balance_uzi_sustained_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant);
w_ready();
return;
}
- self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+ self.misc_bulletcounter = self.misc_bulletcounter + 1;
W_Uzi_Attack(WEP_UZI);
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_uzi_sustained_refire, uzi_fire1_02);
}
self.punchangle_y = random () - 0.5;
}
- uzi_spread = bound(autocvar_g_balance_uzi_spread_min, autocvar_g_balance_uzi_spread_min + (autocvar_g_balance_uzi_spread_add * self.uzi_bulletcounter), autocvar_g_balance_uzi_spread_max);
+ 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, 0, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant);
endFireBallisticBullet();
- self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+ self.misc_bulletcounter = self.misc_bulletcounter + 1;
pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
if (autocvar_g_casings >= 2) // casing code
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);
- self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
- if (self.uzi_bulletcounter == 0)
- weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_burst_refire2, w_ready);
+ self.misc_bulletcounter = self.misc_bulletcounter + 1;
+ if (self.misc_bulletcounter == 0)
+ {
+ ATTACK_FINISHED(self) = time + autocvar_g_balance_uzi_burst_refire2 * W_WeaponRateFactor();
+ weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_burst_animtime, w_ready);
+ }
else
{
weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_burst_refire, uzi_mode1_fire_burst);
- dprint("bullets:", ftos(self.uzi_bulletcounter),"\n");
}
}
if (self.BUTTON_ATCK)
if (weapon_prepareattack(0, 0))
{
- self.uzi_bulletcounter = 0;
+ self.misc_bulletcounter = 0;
uzi_mode1_fire_auto();
}
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_nails = self.ammo_nails - autocvar_g_balance_uzi_burst_ammo;
- self.uzi_bulletcounter = autocvar_g_balance_uzi_burst * -1;
+ self.misc_bulletcounter = autocvar_g_balance_uzi_burst * -1;
uzi_mode1_fire_burst();
}
}
if (self.BUTTON_ATCK)
if (weapon_prepareattack(0, 0))
{
- self.uzi_bulletcounter = 1;
+ self.misc_bulletcounter = 1;
W_Uzi_Attack(WEP_UZI); // sets attack_finished
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_uzi_sustained_refire, uzi_fire1_02);
}
if (self.BUTTON_ATCK2 && autocvar_g_balance_uzi_first)
if (weapon_prepareattack(1, 0))
{
- self.uzi_bulletcounter = 1;
+ self.misc_bulletcounter = 1;
W_Uzi_Attack(WEP_UZI | HITTYPE_SECONDARY); // sets attack_finished
weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_uzi_first_refire, w_ready);
}
e.SendFlags |= 32;
}
+.float waypointsprite_pingtime;
void WaypointSprite_Ping(entity e)
{
+ // anti spam
+ if(time < e.waypointsprite_pingtime)
+ return;
+ e.waypointsprite_pingtime = time + 0.3;
// ALWAYS sends (this causes a radar circle), thus no check
e.cnt |= 0x80;
e.SendFlags |= 32;
awk '/^seta? g_/ { print $2; }' "$b" | sort -u | tr -d '\r' > "$B"
diff "$A" "$B" | grep '^[<>]' | sort
rm -f "$A" "$B"
- exit 1
+ echo "Please wait for 30 seconds, so you have had enough time to read this..."
+ sleep 30
fi
done
kojn
Maik "SavageX" Merten
MrBougo
+Ruszkai "C.Brutail" Ákos
Samual Lenks
Stephan "esteel" Stahl
Wolfgang "Blub\0" Bumiller