seta hud_contents_fadeouttime 0.1 "factor of time it takes for the alpha level to reach normal value when leaving the liquid"
seta hud_contents_lava_alpha 0.7 "alpha of the lava"
seta hud_contents_lava_color "0.8 0.1 0" "color blend when inside lava"
-seta hud_contents_slime_alpha 0.7 "alpha of the slime"
+seta hud_contents_slime_alpha 0.7 "alpha of the slime"
seta hud_contents_slime_color "0 0.4 0.1" "color blend when inside slime"
seta hud_contents_water_alpha 0.5 "alpha of the water"
seta hud_contents_water_color "0.4 0.3 0.3" "color blend when inside water"
seta hud_panel_score_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
seta hud_panel_score_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_score_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
-seta hud_panel_score_rankings "" "show rankings: 1 always show my own score; 2 pure rankings"
+seta hud_panel_score_rankings "" "show rankings: 1 always show my own score; 2 pure rankings"
seta hud_panel_racetimer "" "enable/disable this panel"
seta hud_panel_racetimer_pos "" "position of this base of the panel"
// possible values:
// -2: absolutely no damage to projectiles (no exceptions)
// -1: no damage other than the exceptions (electro combo, hagar join explode, ML mines)
-// 0: only damage from contents (lava/slime) or exceptions
+// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
set g_projectiles_keep_owner 0
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_damage 18
set g_balance_uzi_burst_force 50
set g_balance_uzi_burst_ammo 3
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_primary_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_edgedamage 0
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_crylink_secondary_joinexplode_damage 0
+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_joinexplode_radius 0
set g_balance_crylink_secondary_joinexplode_force 0
// possible values:
// -2: absolutely no damage to projectiles (no exceptions)
// -1: no damage other than the exceptions (electro combo, hagar join explode, ML mines)
-// 0: only damage from contents (lava/slime) or exceptions
+// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
set g_projectiles_keep_owner 0
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_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_edgedamage 0
set g_balance_crylink_secondary_bouncedamagefactor 0.4 // LOG: 0.2 -> 0.4
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 0
+set g_balance_crylink_secondary_joinexplode_damage 0
set g_balance_crylink_secondary_joinexplode_edgedamage 0
set g_balance_crylink_secondary_joinexplode_radius 0
set g_balance_crylink_secondary_joinexplode_force 0
// possible values:
// -2: absolutely no damage to projectiles (no exceptions)
// -1: no damage other than the exceptions (electro combo, hagar join explode, ML mines)
-// 0: only damage from contents (lava/slime) or exceptions
+// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
set g_projectiles_keep_owner 0
set g_balance_uzi_burst_refire 0.06 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.45 // refire after burst
set g_balance_uzi_burst_spread 0.03
-set g_balance_uzi_burst_damage 25
+set g_balance_uzi_burst_damage 25
set g_balance_uzi_burst_force 20
set g_balance_uzi_burst_ammo 3
set g_balance_electro_reload_ammo 0 //default: 20
set g_balance_electro_reload_time 2
// }}}
-// {{{ crylink
+// {{{ crylink
set g_balance_crylink_primary_damage 12
set g_balance_crylink_primary_edgedamage 6
set g_balance_crylink_primary_force -50
set g_balance_crylink_primary_bouncedamagefactor 0.5
set g_balance_crylink_primary_joindelay 0.1
set g_balance_crylink_primary_joinspread 0.2
-set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 1
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_edgedamage 0
set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_other_lifetime 5
+set g_balance_crylink_primary_other_lifetime 5
set g_balance_crylink_primary_other_fadetime 5
set g_balance_crylink_secondary 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_crylink_secondary_joinexplode_damage 0
+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_joinexplode_radius 0
set g_balance_crylink_secondary_joinexplode_force 0
set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 5
+set g_balance_crylink_secondary_line_lifetime 5
set g_balance_crylink_secondary_line_fadetime 5
set g_balance_crylink_switchdelay_drop 0
set g_balance_tuba_switchdelay_drop 0
set g_balance_tuba_switchdelay_raise 0
// }}}
-// {{{ fireball // this is a superweapon -- lets make it behave as one.
+// {{{ fireball // this is a superweapon -- lets make it behave as one.
set g_balance_fireball_primary_animtime 0.2
set g_balance_fireball_primary_bfgdamage 100
set g_balance_fireball_primary_bfgforce 0
// possible values:
// -2: absolutely no damage to projectiles (no exceptions)
// -1: no damage other than the exceptions (electro combo, hagar join explode, ML mines)
-// 0: only damage from contents (lava/slime) or exceptions
+// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
set g_projectiles_keep_owner 0
set g_balance_uzi_burst_refire 0.06 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.45 // refire after burst
set g_balance_uzi_burst_spread 0.02
-set g_balance_uzi_burst_damage 25
+set g_balance_uzi_burst_damage 25
set g_balance_uzi_burst_force 20
set g_balance_uzi_burst_ammo 3
set g_balance_electro_reload_ammo 0 //default: 20
set g_balance_electro_reload_time 2
// }}}
-// {{{ crylink
+// {{{ crylink
set g_balance_crylink_primary_damage 12
set g_balance_crylink_primary_edgedamage 6
set g_balance_crylink_primary_force -50
set g_balance_crylink_primary_bouncedamagefactor 0.5
set g_balance_crylink_primary_joindelay 0.1
set g_balance_crylink_primary_joinspread 0.2
-set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 1
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_edgedamage 0
set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_other_lifetime 5
+set g_balance_crylink_primary_other_lifetime 5
set g_balance_crylink_primary_other_fadetime 5
set g_balance_crylink_secondary 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_crylink_secondary_joinexplode_damage 0
+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_joinexplode_radius 0
set g_balance_crylink_secondary_joinexplode_force 0
set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 5
+set g_balance_crylink_secondary_line_lifetime 5
set g_balance_crylink_secondary_line_fadetime 5
set g_balance_crylink_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_raise 0.2
// }}}
-// {{{ fireball // this is a superweapon -- lets make it behave as one.
+// {{{ fireball // this is a superweapon -- lets make it behave as one.
set g_balance_fireball_primary_animtime 0.2
set g_balance_fireball_primary_bfgdamage 100
set g_balance_fireball_primary_bfgforce 0
// possible values:
// -2: absolutely no damage to projectiles (no exceptions)
// -1: no damage other than the exceptions (electro combo, hagar join explode, ML mines)
-// 0: only damage from contents (lava/slime) or exceptions
+// 0: only damage from contents (lava/slime) or exceptions
// 1: only self damage or damage from contents or exceptions
// 2: allow all damage to projectiles normally
set g_projectiles_keep_owner 0
set g_balance_uzi_burst_refire 0.06 // refire between burst bullets
set g_balance_uzi_burst_refire2 0.45 // refire after burst
set g_balance_uzi_burst_spread 0.02
-set g_balance_uzi_burst_damage 25
+set g_balance_uzi_burst_damage 25
set g_balance_uzi_burst_force 20
set g_balance_uzi_burst_ammo 3
set g_balance_electro_reload_ammo 0 //default: 20
set g_balance_electro_reload_time 2
// }}}
-// {{{ crylink
+// {{{ crylink
set g_balance_crylink_primary_damage 12
set g_balance_crylink_primary_edgedamage 6
set g_balance_crylink_primary_force -50
set g_balance_crylink_primary_bouncedamagefactor 0.5
set g_balance_crylink_primary_joindelay 0.1
set g_balance_crylink_primary_joinspread 0.2
-set g_balance_crylink_primary_jointime 0
set g_balance_crylink_primary_joinexplode 1
set g_balance_crylink_primary_joinexplode_damage 0
set g_balance_crylink_primary_joinexplode_edgedamage 0
set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_other_lifetime 5
+set g_balance_crylink_primary_other_lifetime 5
set g_balance_crylink_primary_other_fadetime 5
set g_balance_crylink_secondary 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_crylink_secondary_joinexplode_damage 0
+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_joinexplode_radius 0
set g_balance_crylink_secondary_joinexplode_force 0
set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_crylink_secondary_middle_fadetime 5
-set g_balance_crylink_secondary_line_lifetime 5
+set g_balance_crylink_secondary_line_lifetime 5
set g_balance_crylink_secondary_line_fadetime 5
set g_balance_crylink_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_drop 0.2
set g_balance_tuba_switchdelay_raise 0.2
// }}}
-// {{{ fireball // this is a superweapon -- lets make it behave as one.
+// {{{ fireball // this is a superweapon -- lets make it behave as one.
set g_balance_fireball_primary_animtime 0.2
set g_balance_fireball_primary_bfgdamage 100
set g_balance_fireball_primary_bfgforce 0
// =======================================================
-// Aliases for settemp subsystem. Warning: Do not touch.
+// Aliases for settemp subsystem. Warning: Do not touch.
// Usage: settemp variable value, next map resets it.
// =======================================================
alias settemp "qc_cmd_svcl settemp $*"
alias _dont ""
alias _do "$*"
-
+
set _ifstack ""
alias # "$_ifstack $*"
seta crosshair_size 0.3
// crosshair dot settings
-seta crosshair_dot 0
+seta crosshair_dot 0
seta crosshair_dot_alpha 1
seta crosshair_dot_size 0.600000
-seta crosshair_dot_color "1 0 0"
+seta crosshair_dot_color "1 0 0"
seta crosshair_dot_color_custom 1 "use a custom color for the crosshair dot"
// smooth transitions for crosshair changes
// general gameplay
set g_jump_grunt 1 // make enemies even easier to hear when they're jumping around
set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
-set g_balance_kill_antispam 0
+set g_balance_kill_antispam 0
set g_forced_respawn 1
set g_jump_grunt 1
// g_playerclip_collisions 0 // do not check playerclips
exec balanceXPM.cfg
// general gameplay
-set g_norecoil 1
+set g_norecoil 1
set g_shootfromcenter 1 // hit where you point at with the crosshair (almost so, no shooteye because it's really ugly)
set g_balance_kill_antispam 0
set g_forced_respawn 1
set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
-// fragmessage: This allows extra information to be displayed with the frag centerprints.
+// fragmessage: This allows extra information to be displayed with the frag centerprints.
set sv_fraginfo 1 "Enable extra frag message information, 0 = Never display, 1 = Display only in warmup mode; 2 = Always display"
set sv_fraginfo_ping 1 "Enable ping display information, 0 = Never display, 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
set sv_fraginfo_handicap 1 "Enable handicap display information, 0 = Never display, 1 = Only when the player has handicap on, 2 = Always display (Displays Off if disabled)"
set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
-set g_minstagib 0 "enable minstagib"
-set g_minstagib_extralives 1 "how many extra lives you will get per powerup"
-set g_minstagib_ammo_start 10 "starting ammo"
-set g_minstagib_ammo_drop 5 "how much ammo you'll get for weapons or cells"
-set g_minstagib_invis_alpha 0.15
-set g_minstagib_speed_highspeed 1.5 "speed-multiplier that applies while you carry the invincibility powerup"
-set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
set g_weaponarena "0" "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
set g_weaponarena_random "0" "if set to a number, only that weapon count is given on every spawn (randomly)"
set g_weaponarena_random_with_laser "1" "additionally, always provide the laser in random weapon arena games"
set g_player_brightness 0 "set to 2 for brighter players"
seta g_balance_cloaked_alpha 0.25
-set g_sandbox 0 "allow players to spawn and edit objects around the map"
-set g_sandbox_info 1 "print object information to the server. 1 prints info about spawned / removed objects, 2 also prints info about edited objects"
-set g_sandbox_readonly 0 "when this mode is active, players cannot modify objects or use any sandbox commands"
-set g_sandbox_storage_name default "name of the selected storage to use"
-set g_sandbox_storage_autosave 5 "storage is automatically saved every specified number of seconds"
-set g_sandbox_storage_autoload 1 "if a storage file exists for the given map, automatically load it at startup"
-set g_sandbox_editor_flood 1 "players must wait this many seconds between spawning objects"
-set g_sandbox_editor_maxobjects 1000 "maximum number of objects that may exist at a time"
-set g_sandbox_editor_free 1 "0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object"
-set g_sandbox_editor_distance_spawn 200 "distance at which objects spawn in front of the player"
-set g_sandbox_editor_distance_edit 300 "distance at which players can edit or remove objects they are looking at"
-set g_sandbox_object_scale_min 0.1 "minimum scale that objects can be set to"
-set g_sandbox_object_scale_max 2 "maximum scale that objects can be set to"
-set g_sandbox_object_material_velocity_min 100 "velocity objects must have while colliding for material effects to be applied"
-set g_sandbox_object_material_velocity_factor 0.002 "velocity range which decides the intensity of material effects"
-set cl_sandbox_clipboard ""
-
seta menu_sandbox_spawn_model ""
seta menu_sandbox_attach_bone ""
seta menu_sandbox_edit_skin 0
set g_grappling_hook 0 "let players spawn with the grappling hook which allows them to pull themselves up"
-set g_invincible_projectiles 0 "set to 1 to disable any damage to projectiles in all balance configs, regardless of g_projectiles_damage"
-set g_dodging 0 "set to 1 to enable dodging in games"
-set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
-
-seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
-
-set sv_dodging_wall_dodging 0 "set to 1 to allow dodging off walls. 0 to disable"
-set sv_dodging_delay 0.5 "determines how long a player has to wait to be able to dodge again after dodging"
-set sv_dodging_up_speed 200 "the jump velocity of the dodge"
-set sv_dodging_horiz_speed 400 "the horizontal velocity of the dodge"
-set sv_dodging_ramp_time 0.1 "a ramp so that the horizontal part of the dodge is added smoothly (seconds)"
-set sv_dodging_height_threshold 10 "the maximum height above ground where to allow dodging"
-set sv_dodging_wall_distance_threshold 10 "the maximum distance from a wall that still allows dodging"
-set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent"
-
set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
set g_spawn_furthest 1 "this amount of the spawns shall be far away from any players"
set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
-set g_spawn_near_teammate 0 "if set, players prefer spawns near a team mate"
-set g_spawn_near_teammate_distance 640 "max distance to consider a spawn to be near a team mate"
// respawn delay
set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
//used for spectate/observer mode
bind F3 spec
-// NIX (No Items Xonotic) - at each time, everyone uses the same weapon,
-// and in regular intervals, this weapon is cycled
-set g_nix 0 "No Items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on"
-set g_nix_with_laser 0 "always carry the laser as an additional weapon in NIX"
-set g_nix_with_healtharmor 0 "when 1, health and armor still show up in NIX"
-set g_nix_with_powerups 0 "when 1, powerups still show up in NIX"
-
// score log
set sv_logscores_console 0 "print scores to server console"
set sv_logscores_file 0 "print scores to file"
seta scoreboard_alpha_bg 0.6 "scoreboard background alpha"
seta scoreboard_alpha_fg 1 "scoreboard foreground alpha"
seta scoreboard_alpha_name 0.9 "alpha of player text in scoreboard list other than self"
-seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
+seta scoreboard_alpha_name_self 1 "alpha of player text in scoreboard list of self"
seta scoreboard_fadeinspeed 10 "speed at which scoreboard fades in, higher is faster (0 = instant)"
seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is faster (0 = instant)"
seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
set sv_foginterval 1 "force enable fog in regular intervals"
-set g_physical_items 0 "1 uses ODE physics for dropped weapons, 2 for all items, requires physics_ode to be enabled"
-set g_physical_items_damageforcescale 3 "how affected physical weapons are by damage"
-set g_physical_items_reset 1 "return map items to their original lotation after being picked up"
-
// Audio track names (for old-style "cd loop NUMBER" usage)
set _cdtrack_first "1"
alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\""
set cl_handicap 1 "the higher, the more damage you will receive (client setting) NOTE: reconnect or use sendcvar command to update the choice."
-seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
+seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
seta cl_autoscreenshot 1 "Take a screenshot upon the end of a match... 0 = Disable completely, 1 = Allow sv_autoscreenshot to take a screenshot when requested, 2 = Always take an autoscreenshot anyway."
set g_bugrigs_speed_pow 2 "reference power for accel and steer responsiveness"
set g_bugrigs_steer 1 "steering amount"
-set g_touchexplode 0
-set g_touchexplode_radius 50
-set g_touchexplode_damage 10
-set g_touchexplode_edgedamage 0
-set g_touchexplode_force 150
-
set g_ban_sync_uri "" "sync using this ban list provider (empty string to disable)"
set g_ban_sync_interval 5 "sync every 5 minutes"
set g_ban_sync_trusted_servers "" "request ban lists from these xonotic servers (do not include your own server there, or unbanning may fail)"
seta cl_gibs_maxcount 100 "maximum amount of gibs (must be at least 1)"
seta cl_vehicle_spiderbot_cross_alpha 0.6
seta cl_vehicle_spiderbot_cross_size 1
-seta cl_vehicles_hudscale 0.5
+seta cl_vehicles_hudscale 0.5
seta cl_vehicles_hudalpha 0.75
seta cl_vehicles_hud_tactical 1
seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"
seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce preceived lag"
-// debug cvars for keyhunt attaching
-set _angles "0 0 0"
-set _origin "0 0 0"
-
// campaign internal, set when loading a campaign map1G
set _campaign_index ""
set _campaign_name ""
exec vehicles.cfg
exec crosshairs.cfg
exec gamemodes.cfg
+exec mutators.cfg
exec notifications.cfg
// load console command aliases and settings
exec hud_luminos.cfg
-// ... and now that everything is configured/aliased, we can do some things:
+// ... and now that everything is configured/aliased, we can do some things:
// Change g_start_delay based upon if the server is local or not.
if_client set g_start_delay 0 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
set cl_fullbright_items 0 "enable fullbright items (if server allows, controled by g_fullbrightitems)"
set cl_weapon_stay_color "2 0.5 0.5" "Color of picked up weapons when g_weapon_stay > 0"
set cl_weapon_stay_alpha 0.75 "Alpha of picked up weapons when g_weapon_stay > 0"
-
-seta g_superspectate 0 "server side, allows extended spectator functions through the cmd interface. followpowerup, followstrength, followstshield or followfc [red|blue] will transfer spectation to the relevent player, if any"
alpha 190 190 180
sizeincrease -80
color 0xFFFFFF 0xFFFFFF
+
+
+// nade effects
+effect nade_blue
+trailspacing 1
+type smoke
+color 0x006cff 0x0600ff
+tex 65 65
+size 3 3
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_blue
+notunderwater
+trailspacing 8
+type smoke
+color 0x0600ff 0x9794ff
+tex 65 65
+size 15 25
+sizeincrease -10
+alpha 30 30 150
+// bubbles
+effect nade_blue
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0x006cff 0x0600ff
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+
+effect nade_red
+trailspacing 1
+type smoke
+color 0xff0000 0xff3c00
+tex 65 65
+size 3 3
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_red
+notunderwater
+trailspacing 8
+type smoke
+color 0xff0000 0xffa2a2
+tex 65 65
+size 15 25
+sizeincrease -10
+alpha 30 30 150
+// bubbles
+effect nade_red
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xff0000 0xff3c00
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+
+effect nade_yellow
+trailspacing 1
+type smoke
+color 0xFFFF0F 0xFFFF0F
+tex 65 65
+size 3 3
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_yellow
+notunderwater
+trailspacing 8
+type smoke
+color 0xFFFF0F 0xFFFF0F
+tex 65 65
+size 15 25
+sizeincrease -10
+alpha 30 30 150
+// bubbles
+effect nade_yellow
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xFFFF0F 0xFFFF0F
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+
+effect nade_pink
+trailspacing 1
+type smoke
+color 0xFF0FFF 0xFF0FFF
+tex 65 65
+size 3 3
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_pink
+notunderwater
+trailspacing 8
+type smoke
+color 0xFF0FFF 0xFF0FFF
+tex 65 65
+size 15 25
+sizeincrease -10
+alpha 30 30 150
+// bubbles
+effect nade_pink
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xFF0FFF 0xFF0FFF
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+
+effect nade
+trailspacing 1
+type smoke
+color 0xFFFFFF 0xFFFFFF
+tex 65 65
+size 3 3
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade
+notunderwater
+trailspacing 8
+type smoke
+color 0xFFFFFF 0xFFFFFF
+tex 65 65
+size 15 25
+sizeincrease -10
+alpha 30 30 150
+// bubbles
+effect nade
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xFFFFFF 0xFFFFFF
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+
+effect nade_red_burn
+trailspacing 1
+type smoke
+color 0xff0000 0xff3c00
+tex 65 65
+size 5 5
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_red_burn
+notunderwater
+trailspacing 64
+type smoke
+color 0xff0000 0xffa2a2
+tex 65 65
+size 45 25
+sizeincrease -30
+alpha 200 200 1000
+// bubbles
+effect nade_red_burn
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xff0000 0xff3c00
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+effect nade_red_burn
+trailspacing 16
+type smoke
+color 0xff0000 0xff3c00
+tex 71 73
+size 15 25
+sizeincrease -40
+rotate -180 180 20 -20
+originjitter 2 2 2
+velocityjitter 10 10 10
+alpha 300 900 1500
+
+effect nade_blue_burn
+trailspacing 1
+type smoke
+color 0x006cff 0x0600ff
+tex 65 65
+size 5 5
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_blue_burn
+notunderwater
+trailspacing 64
+type smoke
+color 0x0600ff 0x9794ff
+tex 65 65
+size 45 25
+sizeincrease -30
+alpha 200 200 1000
+// bubbles
+effect nade_blue_burn
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0x006cff 0x0600ff
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+effect nade_blue_burn
+trailspacing 16
+type smoke
+color 0x006cff 0x0600ff
+tex 33 33
+size 25 25
+sizeincrease -30
+
+effect nade_yellow_burn
+trailspacing 1
+type smoke
+color 0xFFFF0F 0xFFFF0F
+tex 65 65
+size 5 5
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_yellow_burn
+notunderwater
+trailspacing 64
+type smoke
+color 0xFFFF0F 0xFFFF0F
+tex 65 65
+size 45 25
+sizeincrease -30
+alpha 200 200 1000
+// bubbles
+effect nade_yellow_burn
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xFFFF0F 0xFFFF0F
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+effect nade_yellow_burn
+trailspacing 16
+type smoke
+color 0xFFFF0F 0xFFFF0F
+tex 33 33
+size 25 25
+sizeincrease -30
+
+effect nade_pink_burn
+trailspacing 1
+type smoke
+color 0xFF0FFF 0xFF0FFF
+tex 65 65
+size 5 5
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_pink_burn
+notunderwater
+trailspacing 64
+type smoke
+color 0xFF0FFF 0xFF0FFF
+tex 65 65
+size 45 25
+sizeincrease -30
+alpha 200 200 1000
+// bubbles
+effect nade_pink_burn
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xFF0FFF 0xFF0FFF
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+effect nade_pink_burn
+trailspacing 16
+type smoke
+color 0xFF0FFF 0xFF0FFF
+tex 33 33
+size 25 25
+sizeincrease -30
+
+effect nade_burn
+trailspacing 1
+type smoke
+color 0xFFFFFF 0xFFFFFF
+tex 65 65
+size 5 5
+sizeincrease -1
+alpha 100 100 250
+//gravity -0.11
+// fire
+effect nade_burn
+notunderwater
+trailspacing 64
+type smoke
+color 0xFFFFFF 0xFFFFFF
+tex 65 65
+size 45 25
+sizeincrease -30
+alpha 200 200 1000
+// bubbles
+effect nade_burn
+underwater
+trailspacing 16
+type bubble
+tex 62 62
+color 0xFFFFFF 0xFFFFFF
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16
+effect nade_burn
+trailspacing 16
+type smoke
+color 0xFFFFFF 0xFFFFFF
+tex 33 33
+size 25 25
+sizeincrease -30
+
+effect nade_blue_explode
+countabsolute 1
+type decal
+tex 8 16
+size 88 88
+alpha 256 256 0
+originjitter 26 26 26
+lightradius 300
+lightradiusfade 1500
+lightcolor 20 20 100
+// shockwave
+effect nade_blue_explode
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 1800
+color 0x80C0FF 0x80C0FF
+alpha 80 80 650
+velocitymultiplier 44
+// fire
+effect nade_blue_explode
+notunderwater
+count 16
+type smoke
+color 0x629dff 0x0018ff
+tex 48 55
+size 20 24
+sizeincrease 555
+alpha 400 656 2000
+airfriction 30
+originjitter 50 50 50
+velocityjitter 320 320 320
+rotate -180 180 -9 9
+// fire streched
+effect nade_blue_explode
+count 8
+type spark
+tex 48 55
+color 0x629dff 0x0018ff
+size 60 90
+alpha 1500 3000 13000
+stretchfactor 80
+sizeincrease 40
+velocityjitter 30 30 30
+airfriction -9
+//smoke
+effect nade_blue_explode
+type smoke
+count 32
+blend alpha
+tex 0 7
+size 60 30
+color 0x222222 0x000000
+alpha 128 328 390
+rotate -180 180 2 -2
+velocityjitter 200 200 200
+velocityoffset 0 0 180
+originjitter 50 50 10
+sizeincrease 50
+airfriction 0.04
+gravity 0.4
+// underwater bubbles
+effect nade_blue_explode
+underwater
+count 32
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 3 6
+alpha 128 256 64
+gravity -0.125
+bounce 1.5
+liquidfriction 0.25
+originjitter 16 16 16
+velocityjitter 196 196 196
+rotate 0 0 0 0
+// bouncing sparks
+effect nade_blue_explode
+notunderwater
+count 8
+type spark
+tex 40 40
+color 0x006cff 0x0600ff
+size 1 2
+alpha 644 956 484
+gravity 1
+airfriction 1
+bounce 1.6
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// notbouncing sparks
+effect nade_blue_explode
+count 16
+type spark
+tex 40 40
+color 0x006cff 0x0600ff
+size 1 2
+alpha 644 956 684
+gravity 0.5
+airfriction 0.7
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// derbis
+effect nade_blue_explode
+notunderwater
+count 12
+type alphastatic
+tex 66 68
+color 0x6a3d25 0xcac5b4
+size 2 6
+alpha 644 956 684
+gravity 1.3
+airfriction 0.5
+bounce 1.6
+velocityjitter 324 324 524
+rotate -180 180 -1000 1000
+
+effect nade_red_explode
+countabsolute 1
+type decal
+tex 8 16
+size 88 88
+alpha 256 256 0
+originjitter 26 26 26
+lightradius 300
+lightradiusfade 1500
+lightcolor 100 20 20
+// shockwave
+effect nade_red_explode
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 2200
+color 0xff0000 0xffa2a2
+alpha 80 80 650
+velocitymultiplier 44
+// fire
+effect nade_red_explode
+notunderwater
+count 16
+type smoke
+color 0xff0000 0xff4200
+tex 48 55
+size 20 24
+sizeincrease 555
+alpha 400 656 2000
+airfriction 30
+originjitter 50 50 50
+velocityjitter 320 320 320
+rotate -180 180 -9 9
+// fire streched
+effect nade_red_explode
+count 8
+type spark
+tex 48 55
+color 0xff0000 0xff4200
+size 60 90
+alpha 1500 3000 13000
+stretchfactor 80
+sizeincrease 40
+velocityjitter 30 30 30
+airfriction -9
+//smoke
+effect nade_red_explode
+type smoke
+count 32
+blend alpha
+tex 0 7
+size 60 30
+color 0x222222 0x000000
+alpha 128 328 390
+rotate -180 180 2 -2
+velocityjitter 200 200 200
+velocityoffset 0 0 180
+originjitter 50 50 10
+sizeincrease 50
+airfriction 0.04
+gravity 0.4
+// underwater bubbles
+effect nade_red_explode
+underwater
+count 32
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 3 6
+alpha 128 256 64
+gravity -0.125
+bounce 1.5
+liquidfriction 0.25
+originjitter 16 16 16
+velocityjitter 196 196 196
+rotate 0 0 0 0
+// bouncing sparks
+effect nade_red_explode
+notunderwater
+count 8
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 484
+gravity 1
+airfriction 1
+bounce 1.6
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// notbouncing sparks
+effect nade_red_explode
+count 16
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 684
+gravity 0.5
+airfriction 0.7
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// derbis
+effect nade_red_explode
+notunderwater
+count 8
+type smoke
+tex 71 73
+color 0xff0000 0xffa2a2
+size 20 40
+alpha 644 956 2500
+originjitter 64 64 64
+velocityjitter 324 324 324
+rotate -180 180 -100 100
+
+effect nade_yellow_explode
+countabsolute 1
+type decal
+tex 8 16
+size 88 88
+alpha 256 256 0
+originjitter 26 26 26
+lightradius 300
+lightradiusfade 1500
+lightcolor 100 20 20
+// shockwave
+effect nade_yellow_explode
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 2200
+color 0xff0000 0xffa2a2
+alpha 80 80 650
+velocitymultiplier 44
+// fire
+effect nade_yellow_explode
+notunderwater
+count 16
+type smoke
+color 0xFFFF0F 0xFFFF0F
+tex 48 55
+size 20 24
+sizeincrease 555
+alpha 400 656 2000
+airfriction 30
+originjitter 50 50 50
+velocityjitter 320 320 320
+rotate -180 180 -9 9
+// fire streched
+effect nade_yellow_explode
+count 8
+type spark
+tex 48 55
+color 0xFFFF0F 0xFFFF0F
+size 60 90
+alpha 1500 3000 13000
+stretchfactor 80
+sizeincrease 40
+velocityjitter 30 30 30
+airfriction -9
+//smoke
+effect nade_yellow_explode
+type smoke
+count 32
+blend alpha
+tex 0 7
+size 60 30
+color 0x222222 0x000000
+alpha 128 328 390
+rotate -180 180 2 -2
+velocityjitter 200 200 200
+velocityoffset 0 0 180
+originjitter 50 50 10
+sizeincrease 50
+airfriction 0.04
+gravity 0.4
+// underwater bubbles
+effect nade_yellow_explode
+underwater
+count 32
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 3 6
+alpha 128 256 64
+gravity -0.125
+bounce 1.5
+liquidfriction 0.25
+originjitter 16 16 16
+velocityjitter 196 196 196
+rotate 0 0 0 0
+// bouncing sparks
+effect nade_yellow_explode
+notunderwater
+count 8
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 484
+gravity 1
+airfriction 1
+bounce 1.6
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// notbouncing sparks
+effect nade_yellow_explode
+count 16
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 684
+gravity 0.5
+airfriction 0.7
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// derbis
+effect nade_yellow_explode
+notunderwater
+count 8
+type smoke
+tex 71 73
+color 0xff0000 0xffa2a2
+size 20 40
+alpha 644 956 2500
+originjitter 64 64 64
+velocityjitter 324 324 324
+rotate -180 180 -100 100
+
+effect nade_pink_explode
+countabsolute 1
+type decal
+tex 8 16
+size 88 88
+alpha 256 256 0
+originjitter 26 26 26
+lightradius 300
+lightradiusfade 1500
+lightcolor 100 20 20
+// shockwave
+effect nade_pink_explode
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 2200
+color 0xff0000 0xffa2a2
+alpha 80 80 650
+velocitymultiplier 44
+// fire
+effect nade_pink_explode
+notunderwater
+count 16
+type smoke
+color 0xFF0FFF 0xFF0FFF
+tex 48 55
+size 20 24
+sizeincrease 555
+alpha 400 656 2000
+airfriction 30
+originjitter 50 50 50
+velocityjitter 320 320 320
+rotate -180 180 -9 9
+// fire streched
+effect nade_pink_explode
+count 8
+type spark
+tex 48 55
+color 0xFF0FFF 0xFF0FFF
+size 60 90
+alpha 1500 3000 13000
+stretchfactor 80
+sizeincrease 40
+velocityjitter 30 30 30
+airfriction -9
+//smoke
+effect nade_pink_explode
+type smoke
+count 32
+blend alpha
+tex 0 7
+size 60 30
+color 0x222222 0x000000
+alpha 128 328 390
+rotate -180 180 2 -2
+velocityjitter 200 200 200
+velocityoffset 0 0 180
+originjitter 50 50 10
+sizeincrease 50
+airfriction 0.04
+gravity 0.4
+// underwater bubbles
+effect nade_pink_explode
+underwater
+count 32
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 3 6
+alpha 128 256 64
+gravity -0.125
+bounce 1.5
+liquidfriction 0.25
+originjitter 16 16 16
+velocityjitter 196 196 196
+rotate 0 0 0 0
+// bouncing sparks
+effect nade_pink_explode
+notunderwater
+count 8
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 484
+gravity 1
+airfriction 1
+bounce 1.6
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// notbouncing sparks
+effect nade_pink_explode
+count 16
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 684
+gravity 0.5
+airfriction 0.7
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// derbis
+effect nade_pink_explode
+notunderwater
+count 8
+type smoke
+tex 71 73
+color 0xff0000 0xffa2a2
+size 20 40
+alpha 644 956 2500
+originjitter 64 64 64
+velocityjitter 324 324 324
+rotate -180 180 -100 100
+
+effect nade_explode
+countabsolute 1
+type decal
+tex 8 16
+size 88 88
+alpha 256 256 0
+originjitter 26 26 26
+lightradius 300
+lightradiusfade 1500
+lightcolor 100 20 20
+// shockwave
+effect nade_explode
+type smoke
+countabsolute 1
+tex 33 33
+size 32 32
+sizeincrease 2200
+color 0xff0000 0xffa2a2
+alpha 80 80 650
+velocitymultiplier 44
+// fire
+effect nade_explode
+notunderwater
+count 16
+type smoke
+color 0xFFFFFF 0xFFFFFF
+tex 48 55
+size 20 24
+sizeincrease 555
+alpha 400 656 2000
+airfriction 30
+originjitter 50 50 50
+velocityjitter 320 320 320
+rotate -180 180 -9 9
+// fire streched
+effect nade_explode
+count 8
+type spark
+tex 48 55
+color 0xFFFFFF 0xFFFFFF
+size 60 90
+alpha 1500 3000 13000
+stretchfactor 80
+sizeincrease 40
+velocityjitter 30 30 30
+airfriction -9
+//smoke
+effect nade_explode
+type smoke
+count 32
+blend alpha
+tex 0 7
+size 60 30
+color 0x222222 0x000000
+alpha 128 328 390
+rotate -180 180 2 -2
+velocityjitter 200 200 200
+velocityoffset 0 0 180
+originjitter 50 50 10
+sizeincrease 50
+airfriction 0.04
+gravity 0.4
+// underwater bubbles
+effect nade_explode
+underwater
+count 32
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 3 6
+alpha 128 256 64
+gravity -0.125
+bounce 1.5
+liquidfriction 0.25
+originjitter 16 16 16
+velocityjitter 196 196 196
+rotate 0 0 0 0
+// bouncing sparks
+effect nade_explode
+notunderwater
+count 8
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 484
+gravity 1
+airfriction 1
+bounce 1.6
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// notbouncing sparks
+effect nade_explode
+count 16
+type spark
+tex 40 40
+color 0xff0000 0xffa2a2
+size 1 2
+alpha 644 956 684
+gravity 0.5
+airfriction 0.7
+liquidfriction 0.8
+velocityoffset 0 0 80
+originjitter 16 16 16
+velocityjitter 424 424 624
+// derbis
+effect nade_explode
+notunderwater
+count 8
+type smoke
+tex 71 73
+color 0xff0000 0xffa2a2
+size 20 40
+alpha 644 956 2500
+originjitter 64 64 64
+velocityjitter 324 324 324
+rotate -180 180 -100 100
set g_freezetag_revive_speed 0.4 "Speed for reviving a frozen teammate"
set g_freezetag_revive_clearspeed 1.6 "Speed at which reviving progress gets lost when out of range"
set g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
+set g_freezetag_revive_falldamage 0 "Enable reviving from this amount of fall damage"
+set g_freezetag_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
set g_freezetag_round_timelimit 180
set g_freezetag_frozen_force 0.6 "How much to multiply the force on a frozen player with"
set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds"
set g_lms_lives_override -1
set g_lms_extra_lives 0
set g_lms_regenerate 0
-set g_lms_campcheck_interval 10
-set g_lms_campcheck_damage 100
-set g_lms_campcheck_distance 1800
set g_lms_last_join 3 "if g_lms_join_anytime is false, new players can only join if the worst active player has more than (fraglimit - g_lms_last_join) lives"
set g_lms_join_anytime 1 "if true, new players can join, but get same amount of lives as the worst player"
COLOR_DIALOG_CROSSHAIR '1 1 1'
COLOR_DIALOG_HUD '1 1 1'
COLOR_DIALOG_SERVERINFO '1 1 1'
+COLOR_DIALOG_SCREENSHOTVIEWER '1 1 1'
COLOR_DIALOG_CVARS '1 0 0'
COLOR_DIALOG_HUDCONFIRM '1 0 0'
COLOR_DIALOG_CROSSHAIR '1 1 1'
COLOR_DIALOG_HUD '1 1 1'
COLOR_DIALOG_SERVERINFO '1 1 1'
+COLOR_DIALOG_SCREENSHOTVIEWER '1 1 1'
COLOR_DIALOG_CVARS '1 0 0'
COLOR_DIALOG_HUDCONFIRM '1 0 0'
COLOR_DIALOG_CROSSHAIR '1 1 1'
COLOR_DIALOG_HUD '1 1 1'
COLOR_DIALOG_SERVERINFO '1 1 1'
+COLOR_DIALOG_SCREENSHOTVIEWER '1 1 1'
COLOR_DIALOG_CVARS '1 0 0'
COLOR_DIALOG_HUDCONFIRM '1 0 0'
seta hud_progressbar_armor_color "0 0.6 0"
seta hud_progressbar_fuel_color "0.6 0.6 0"
seta hud_progressbar_nexball_color "0.7 0.1 0"
-seta hud_progressbar_speed_color "1 0.75 0"
-seta hud_progressbar_acceleration_color "0.5 0.75 1"
-seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
+seta hud_progressbar_speed_color "1 0.75 0"
+seta hud_progressbar_acceleration_color "0.5 0.75 1"
+seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
seta _hud_panelorder "15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 "
seta hud_panel_weapons_aspect "2"
seta hud_panel_weapons_timeout "1"
seta hud_panel_weapons_timeout_effect "1"
-seta hud_panel_weapons_timeout_fadebgmin "0.4"
+seta hud_panel_weapons_timeout_fadebgmin "0.4"
seta hud_panel_weapons_timeout_fadefgmin "0.4"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
-seta hud_panel_centerprint_fade_subsequent_passtwo "10"
+seta hud_panel_centerprint_fade_subsequent_passtwo "10"
seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
seta hud_progressbar_armor_color "0 0.6 0"
seta hud_progressbar_fuel_color "0.6 0.6 0"
seta hud_progressbar_nexball_color "0.7 0.1 0"
-seta hud_progressbar_speed_color "1 0.75 0"
-seta hud_progressbar_acceleration_color "0.5 0.75 1"
-seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
+seta hud_progressbar_speed_color "1 0.75 0"
+seta hud_progressbar_acceleration_color "0.5 0.75 1"
+seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
seta _hud_panelorder "10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 "
seta hud_panel_weapons_aspect "2"
seta hud_panel_weapons_timeout "0"
seta hud_panel_weapons_timeout_effect "0"
-seta hud_panel_weapons_timeout_fadebgmin "0"
+seta hud_panel_weapons_timeout_fadebgmin "0"
seta hud_panel_weapons_timeout_fadefgmin "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
-seta hud_panel_centerprint_fade_subsequent_passtwo "10"
+seta hud_panel_centerprint_fade_subsequent_passtwo "10"
seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
seta hud_progressbar_armor_color "0 0.6 0"
seta hud_progressbar_fuel_color "0.6 0.6 0"
seta hud_progressbar_nexball_color "0.7 0.1 0"
-seta hud_progressbar_speed_color "1 0.75 0"
-seta hud_progressbar_acceleration_color "0.5 0.75 1"
-seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
+seta hud_progressbar_speed_color "1 0.75 0"
+seta hud_progressbar_acceleration_color "0.5 0.75 1"
+seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
seta _hud_panelorder "15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 "
seta hud_panel_weapons_aspect "2"
seta hud_panel_weapons_timeout "0"
seta hud_panel_weapons_timeout_effect "0"
-seta hud_panel_weapons_timeout_fadebgmin "0"
+seta hud_panel_weapons_timeout_fadebgmin "0"
seta hud_panel_weapons_timeout_fadefgmin "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
-seta hud_panel_centerprint_fade_subsequent_passtwo "10"
+seta hud_panel_centerprint_fade_subsequent_passtwo "10"
seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
seta hud_progressbar_armor_color "0 0.6 0"
seta hud_progressbar_fuel_color "0.6 0.6 0"
seta hud_progressbar_nexball_color "0.7 0.1 0"
-seta hud_progressbar_speed_color "1 0.75 0"
-seta hud_progressbar_acceleration_color "0.5 0.75 1"
-seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
+seta hud_progressbar_speed_color "1 0.75 0"
+seta hud_progressbar_acceleration_color "0.5 0.75 1"
+seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
seta _hud_panelorder "15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 "
seta hud_panel_weapons_aspect "2"
seta hud_panel_weapons_timeout "3"
seta hud_panel_weapons_timeout_effect "1"
-seta hud_panel_weapons_timeout_fadebgmin "0"
+seta hud_panel_weapons_timeout_fadebgmin "0"
seta hud_panel_weapons_timeout_fadefgmin "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
-seta hud_panel_centerprint_fade_subsequent_passtwo "10"
+seta hud_panel_centerprint_fade_subsequent_passtwo "10"
seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
seta hud_progressbar_armor_color "0 0.6 0"
seta hud_progressbar_fuel_color "0.6 0.6 0"
seta hud_progressbar_nexball_color "0.7 0.1 0"
-seta hud_progressbar_speed_color "1 0.75 0"
-seta hud_progressbar_acceleration_color "0.5 0.75 1"
-seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
+seta hud_progressbar_speed_color "1 0.75 0"
+seta hud_progressbar_acceleration_color "0.5 0.75 1"
+seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
seta _hud_panelorder "15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 "
seta hud_panel_weapons_aspect "2"
seta hud_panel_weapons_timeout "0"
seta hud_panel_weapons_timeout_effect "0"
-seta hud_panel_weapons_timeout_fadebgmin "0"
+seta hud_panel_weapons_timeout_fadebgmin "0"
seta hud_panel_weapons_timeout_fadefgmin "0"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
-seta hud_panel_centerprint_fade_subsequent_passtwo "10"
+seta hud_panel_centerprint_fade_subsequent_passtwo "10"
seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
// small big dark bright -red +red -green +green -blue +blue higher
// 1 2 3 4 5 6 7 8 9 0 Page ^
-//
+//
// spawn ^ remove static style style style style style style lower
// Q W E R T Y U I O P Page v
-//
+//
// < v > style style style style style style save north
// A S D F G H J K L ENTER ^
-//
+//
// copy paste fine coarse west south east
// Z X C V B N M , . < v >
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_01
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_02
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_03
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_04
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_05
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_06
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_07
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_08
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_09
\ No newline at end of file
--- /dev/null
+sprite,models/ok_nade_counter/ok_nade_counter_10
\ No newline at end of file
--- /dev/null
+// =========================
+// Config for all mutators
+// =========================
+
+
+// =========
+// dodging
+// =========
+set g_dodging 0 "set to 1 to enable dodging in games"
+
+seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
+
+set sv_dodging_wall_dodging 0 "set to 1 to allow dodging off walls. 0 to disable"
+set sv_dodging_delay 0.7 "determines how long a player has to wait to be able to dodge again after dodging"
+set sv_dodging_up_speed 200 "the jump velocity of the dodge"
+set sv_dodging_horiz_speed 400 "the horizontal velocity of the dodge"
+set sv_dodging_horiz_speed_frozen 200 "the horizontal velocity of the dodge while frozen"
+set sv_dodging_ramp_time 0.1 "a ramp so that the horizontal part of the dodge is added smoothly (seconds)"
+set sv_dodging_height_threshold 10 "the maximum height above ground where to allow dodging"
+set sv_dodging_wall_distance_threshold 10 "the maximum distance from a wall that still allows dodging"
+set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent"
+set sv_dodging_frozen 0 "allow dodging while frozen"
+
+
+// ===========
+// minstagib
+// ===========
+set g_minstagib 0 "enable minstagib"
+set g_minstagib_extralives 1 "how many extra lives you will get per powerup"
+set g_minstagib_ammo_start 10 "starting ammo"
+set g_minstagib_ammo_drop 5 "how much ammo you'll get for weapons or cells"
+set g_minstagib_invis_alpha 0.15
+set g_minstagib_speed_highspeed 1.5 "speed-multiplier that applies while you carry the invincibility powerup"
+
+
+// =========
+// vampire
+// =========
+set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
+
+
+// =========
+// sandbox
+// =========
+set g_sandbox 0 "allow players to spawn and edit objects around the map"
+set g_sandbox_info 1 "print object information to the server. 1 prints info about spawned / removed objects, 2 also prints info about edited objects"
+set g_sandbox_readonly 0 "when this mode is active, players cannot modify objects or use any sandbox commands"
+set g_sandbox_storage_name default "name of the selected storage to use"
+set g_sandbox_storage_autosave 5 "storage is automatically saved every specified number of seconds"
+set g_sandbox_storage_autoload 1 "if a storage file exists for the given map, automatically load it at startup"
+set g_sandbox_editor_flood 1 "players must wait this many seconds between spawning objects"
+set g_sandbox_editor_maxobjects 1000 "maximum number of objects that may exist at a time"
+set g_sandbox_editor_free 1 "0 = players can only copy or edit their own objects, 1 = players can copy but not edit other objects, 2 = players can copy and edit all object"
+set g_sandbox_editor_distance_spawn 200 "distance at which objects spawn in front of the player"
+set g_sandbox_editor_distance_edit 300 "distance at which players can edit or remove objects they are looking at"
+set g_sandbox_object_scale_min 0.1 "minimum scale that objects can be set to"
+set g_sandbox_object_scale_max 2 "maximum scale that objects can be set to"
+set g_sandbox_object_material_velocity_min 100 "velocity objects must have while colliding for material effects to be applied"
+set g_sandbox_object_material_velocity_factor 0.002 "velocity range which decides the intensity of material effects"
+set cl_sandbox_clipboard ""
+
+
+// ========================
+// invincible projectiles
+// ========================
+set g_invincible_projectiles 0 "set to 1 to disable any damage to projectiles in all balance configs, regardless of g_projectiles_damage"
+
+
+// ===============
+// rocket flying
+// ===============
+set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
+
+
+// =====================
+// spawn near teammate
+// =====================
+set g_spawn_near_teammate 0 "if set, players prefer spawns near a team mate"
+set g_spawn_near_teammate_distance 640 "max distance to consider a spawn to be near a team mate"
+
+
+// ========================
+// NIX (No Items Xonotic)
+// ========================
+// at each time, everyone uses the same weapon,
+// and in regular intervals, this weapon is cycled
+set g_nix 0 "No Items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon, and so on"
+set g_nix_with_laser 0 "always carry the laser as an additional weapon in NIX"
+set g_nix_with_healtharmor 0 "when 1, health and armor still show up in NIX"
+set g_nix_with_powerups 0 "when 1, powerups still show up in NIX"
+
+
+// ================
+// physical items
+// ================
+set g_physical_items 0 "1 uses ODE physics for dropped weapons, 2 for all items, requires physics_ode to be enabled"
+set g_physical_items_damageforcescale 3 "how affected physical weapons are by damage"
+set g_physical_items_reset 1 "return map items to their original lotation after being picked up"
+
+
+// ===============
+// touch explode
+// ===============
+set g_touchexplode 0 "touching other players causes an explosion"
+set g_touchexplode_radius 50
+set g_touchexplode_damage 10
+set g_touchexplode_edgedamage 0
+set g_touchexplode_force 150
+
+
+// ================
+// super spectate
+// ================
+set g_superspectate 0 "server side, allows extended spectator functions through the cmd interface. followpowerup, followstrength, followstshield or followfc [red|blue] will transfer spectation to the relevent player, if any"
+
+
+// ==================
+// melee only arena
+// ==================
+set g_melee_only 0 "enable melee only arena"
+
+
+// ================
+// random gravity
+// ================
+set g_random_gravity 0 "enable random gravity mutator"
+set g_random_gravity_delay 3 "delay between gravity changes"
+set g_random_gravity_negative_chance 0.5 "chance of gravity being a negative value"
+set g_random_gravity_min -2000 "minimum gravity"
+set g_random_gravity_max 2000 "maximum gravity"
+set g_random_gravity_positive 1000 "positive gravity multiplier"
+set g_random_gravity_negative 1000 "negative gravity multiplier"
+
+
+// =======
+// nades
+// =======
+set g_nades 0 "enable off-hand grenades"
+set g_nades_spawn 1 "give nades right away when player spawns rather than delaying entire refire"
+set g_nades_nade_lifetime 3.5
+set g_nades_nade_minforce 400
+set g_nades_nade_maxforce 2000
+set g_nades_nade_health 25
+set g_nades_nade_refire 6
+set g_nades_nade_damage 225
+set g_nades_nade_edgedamage 90
+set g_nades_nade_radius 300
+set g_nades_nade_force 650
+set g_nades_nade_newton_style 0
+
+
+// ============
+// camp check
+// ============
+set g_campcheck 0 "damages campers every few seconds"
+set g_campcheck_interval 10
+set g_campcheck_damage 100
+set g_campcheck_distance 1800
g_mod_physics Xonotic
// current Xonotic physics
-sv_gravity 800
+sv_gravity 700
sv_maxspeed 360
sv_maxairspeed 360
sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 2
-sv_friction 8
+sv_friction 6
edgefriction 1
-sv_stepheight 26
+sv_stepheight 31
// Q1: 16+2
// Nex: 32+2
-// we try: 24+2
+// Xon 0.7: 24+2
+// Samual: 31 (just below 32, keeping things smooth without allowing 32qu steps)
-// actually, what we want is 266.6666 for 180bpm
-// but 260 takes same amount of frames and is nicer to mappers
// jump height == sv_jumpvelocity^2 / (2*sv_gravity)
-// in this case: 42.25 qu
+// in this case: 42.87 qu
// player: 24+45 qu
-// total: 111.25qu
+// total: 111.87qu
// this is smaller than 112 qu, so a 112 qu high corridor (7 of 8 grid units in
// the 16 grid, and the 8th unit used for wall/floor) just lets a player jump!
-sv_jumpvelocity 260
+sv_jumpvelocity 245
sv_wateraccelerate -1
sv_waterfriction -1
sv_airaccel_sideways_friction 0
sv_airaccel_qw_stretchfactor 2
sv_airstopaccelerate 3
-sv_airstrafeaccelerate 24
+sv_airstrafeaccelerate 18
sv_maxairstrafespeed 100
sv_airstrafeaccel_qw -0.95
-sv_aircontrol 125
-sv_aircontrol_penalty 180
+sv_aircontrol 100
+sv_aircontrol_penalty 0
sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 800
+sv_airspeedlimit_nonqw 900
sv_warsowbunny_turnaccel 0
sv_warsowbunny_accel 0.1593
sv_warsowbunny_topspeed 925
--- /dev/null
+g_mod_physics Xonotic
+// current Xonotic physics
+
+sv_gravity 800
+sv_maxspeed 360
+sv_maxairspeed 360
+
+sv_stopspeed 100
+sv_accelerate 15
+sv_airaccelerate 2
+sv_friction 8
+edgefriction 1
+sv_stepheight 26
+// Q1: 16+2
+// Nex: 32+2
+// we try: 24+2
+
+// actually, what we want is 266.6666 for 180bpm
+// but 260 takes same amount of frames and is nicer to mappers
+// jump height == sv_jumpvelocity^2 / (2*sv_gravity)
+// in this case: 42.25 qu
+// player: 24+45 qu
+// total: 111.25qu
+// this is smaller than 112 qu, so a 112 qu high corridor (7 of 8 grid units in
+// the 16 grid, and the 8th unit used for wall/floor) just lets a player jump!
+sv_jumpvelocity 260
+sv_wateraccelerate -1
+sv_waterfriction -1
+sv_airaccel_sideways_friction 0
+sv_airaccel_qw -0.8
+sv_airaccel_qw_stretchfactor 2
+
+sv_airstopaccelerate 3
+sv_airstrafeaccelerate 24
+sv_maxairstrafespeed 100
+sv_airstrafeaccel_qw -0.95
+sv_aircontrol 125
+sv_aircontrol_penalty 180
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 800
+sv_warsowbunny_turnaccel 0
+sv_warsowbunny_accel 0.1593
+sv_warsowbunny_topspeed 925
+sv_warsowbunny_backtosideratio 0.8
+sv_friction_on_land 0
+sv_doublejump 0
+sv_jumpspeedcap_min ""
+sv_jumpspeedcap_max ""
+sv_jumpspeedcap_max_disable_on_ramps 1
+g_teleport_maxspeed 0
+++ /dev/null
-g_mod_physics Xonotic
-// current Xonotic physics
-
-sv_gravity 700
-sv_maxspeed 360
-sv_maxairspeed 360
-
-sv_stopspeed 100
-sv_accelerate 15
-sv_airaccelerate 2
-sv_friction 6
-edgefriction 1
-sv_stepheight 34
-// Q1: 16+2
-// Nex: 32+2
-// we try: 24+2
-// samual: 32+2
-
-// jump height == sv_jumpvelocity^2 / (2*sv_gravity)
-// in this case: 42.87 qu
-// player: 24+45 qu
-// total: 111.87qu
-// this is smaller than 112 qu, so a 112 qu high corridor (7 of 8 grid units in
-// the 16 grid, and the 8th unit used for wall/floor) just lets a player jump!
-sv_jumpvelocity 245
-sv_wateraccelerate -1
-sv_waterfriction -1
-sv_airaccel_sideways_friction 0
-sv_airaccel_qw -0.8
-sv_airaccel_qw_stretchfactor 2
-
-sv_airstopaccelerate 3
-sv_airstrafeaccelerate 18
-sv_maxairstrafespeed 100
-sv_airstrafeaccel_qw -0.95
-sv_aircontrol 100
-sv_aircontrol_penalty 0
-sv_aircontrol_power 2
-sv_airspeedlimit_nonqw 900
-sv_warsowbunny_turnaccel 0
-sv_warsowbunny_accel 0.1593
-sv_warsowbunny_topspeed 925
-sv_warsowbunny_backtosideratio 0.8
-sv_friction_on_land 0
-sv_doublejump 0
-sv_jumpspeedcap_min ""
-sv_jumpspeedcap_max ""
-sv_jumpspeedcap_max_disable_on_ramps 1
-g_teleport_maxspeed 0
if(spectatee_status >= 0 && (autocvar_cl_eventchase_death && is_dead) || intermission)
{
// make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.)
- vector current_view_origin = ((csqcplayer ? csqcplayer.origin : pmove_org) + autocvar_cl_eventchase_viewoffset);
+ vector current_view_origin = (csqcplayer ? csqcplayer.origin : pmove_org);
+
+ // detect maximum viewoffset and use it
+ if(autocvar_cl_eventchase_viewoffset)
+ {
+ WarpZone_TraceLine(current_view_origin, current_view_origin + autocvar_cl_eventchase_viewoffset + ('0 0 1' * autocvar_cl_eventchase_maxs_z), MOVE_WORLDONLY, self);
+ if(trace_fraction == 1) { current_view_origin += autocvar_cl_eventchase_viewoffset; }
+ else { current_view_origin_z += max(0, (trace_endpos_z - current_view_origin_z) - autocvar_cl_eventchase_maxs_z); }
+ }
// We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
// Ideally, there should be another way to enable third person cameras, such as through setproperty()
{
// Simple command to work with postprocessing temporarily... possibly completely pointless, the glsl shader is used for a real feature now...
// Anyway, to enable it, just compile the client with -DBLURTEST and then you can use the command.
-
+
#ifdef BLURTEST
switch(request)
{
#endif
}
+void LocalCommand_boxparticles(float request, float argc)
+{
+ switch(request)
+ {
+ case CMD_REQUEST_COMMAND:
+ {
+ if (argc == 9)
+ {
+ float effect = particleeffectnum(argv(1));
+ if (effect >= 0)
+ {
+ float index = stof(argv(2));
+ entity own;
+ if(index <= 0)
+ own = entitybyindex(-index);
+ else
+ own = findfloat(world, entnum, index);
+ vector org_from = stov(argv(3));
+ vector org_to = stov(argv(4));
+ vector dir_from = stov(argv(5));
+ vector dir_to = stov(argv(6));
+ float countmultiplier = stof(argv(7));
+ float flags = stof(argv(8));
+ boxparticles(effect, own, org_from, org_to, dir_from, dir_to, countmultiplier, flags);
+ return;
+ }
+ }
+ }
+
+ default:
+ print("Incorrect parameters for ^2boxparticles^7\n");
+ case CMD_REQUEST_USAGE:
+ {
+ print("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
+ print(" 'effectname' is the name of a particle effect in effectinfo.txt\n");
+ print(" 'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
+ print(" 'org_from' is the starting origin of the box\n");
+ print(" 'org_to' is the ending origin of the box\n");
+ print(" 'dir_from' is the minimum velocity\n");
+ print(" 'dir_to' is the maximum velocity\n");
+ print(" 'countmultiplier' defines a multiplier for the particle count (affects count only, not countabsolute or trailspacing)\n");
+ print(" 'flags' can contain:\n");
+ print(" 1 to respect globals particles_alphamin, particles_alphamax (set right before via prvm_globalset client)\n");
+ print(" 2 to respect globals particles_colormin, particles_colormax (set right before via prvm_globalset client)\n");
+ print(" 4 to respect globals particles_fade (set right before via prvm_globalset client)\n");
+ print(" 128 to draw a trail, not a box\n");
+ return;
+ }
+ }
+}
+
void LocalCommand_create_scrshot_ent(float request)
{
switch(request)
// Normally do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
#define CLIENT_COMMANDS(request,arguments) \
CLIENT_COMMAND("blurtest", LocalCommand_blurtest(request), "Feature for testing blur postprocessing") \
+ CLIENT_COMMAND("boxparticles", LocalCommand_boxparticles(request, arguments), "Spawn particles manually") \
CLIENT_COMMAND("create_scrshot_ent", LocalCommand_create_scrshot_ent(request), "Create an entity at this location for automatic screenshots") \
CLIENT_COMMAND("debugmodel", LocalCommand_debugmodel(request, arguments), "Spawn a debug model manually") \
CLIENT_COMMAND("handlevote", LocalCommand_handlevote(request, arguments), "System to handle selecting a vote or option") \
case PROJECTILE_GRENADE_BOUNCING:
rot = '0 -1000 0'; // sideways
break;
+ case PROJECTILE_NADE_RED_BURN:
+ case PROJECTILE_NADE_RED:
+ case PROJECTILE_NADE_BLUE_BURN:
+ case PROJECTILE_NADE_BLUE:
+ case PROJECTILE_NADE_YELLOW_BURN:
+ case PROJECTILE_NADE_YELLOW:
+ case PROJECTILE_NADE_PINK_BURN:
+ case PROJECTILE_NADE_PINK:
+ case PROJECTILE_NADE_BURN:
+ case PROJECTILE_NADE:
+ rot = self.avelocity;
+ break;
case PROJECTILE_HOOKBOMB:
rot = '1000 0 0'; // forward
break;
trailorigin = self.origin;
switch(self.cnt)
{
+ case PROJECTILE_NADE_RED_BURN:
+ case PROJECTILE_NADE_RED:
+ case PROJECTILE_NADE_BLUE_BURN:
+ case PROJECTILE_NADE_BLUE:
+ case PROJECTILE_NADE_YELLOW_BURN:
+ case PROJECTILE_NADE_YELLOW:
+ case PROJECTILE_NADE_PINK_BURN:
+ case PROJECTILE_NADE_PINK:
+ case PROJECTILE_NADE_BURN:
+ case PROJECTILE_NADE:
+ trailorigin += v_up * 4;
+ break;
case PROJECTILE_GRENADE:
case PROJECTILE_GRENADE_BOUNCING:
trailorigin += v_right * 1 + v_forward * -10;
case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
+
+ case PROJECTILE_NADE_RED: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_red"); break;
+ case PROJECTILE_NADE_RED_BURN: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_red_burn"); break;
+ case PROJECTILE_NADE_BLUE: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_blue"); break;
+ case PROJECTILE_NADE_BLUE_BURN: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_blue_burn"); break;
+ case PROJECTILE_NADE_YELLOW: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_yellow"); break;
+ case PROJECTILE_NADE_YELLOW_BURN: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_yellow_burn"); break;
+ case PROJECTILE_NADE_PINK: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_pink"); break;
+ case PROJECTILE_NADE_PINK_BURN: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_pink_burn"); break;
+ case PROJECTILE_NADE: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade"); break;
+ case PROJECTILE_NADE_BURN: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_burn"); break;
default:
error("Received invalid CSQC projectile, can't work with this!");
self.mins = '-3 -3 -3';
self.maxs = '3 3 3';
break;
+ case PROJECTILE_NADE_RED_BURN:
+ case PROJECTILE_NADE_RED:
+ case PROJECTILE_NADE_BLUE_BURN:
+ case PROJECTILE_NADE_BLUE:
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
+ self.move_movetype = MOVETYPE_BOUNCE;
+ self.move_touch = func_null;
+ self.scale = 1.5;
+ self.avelocity = randomvec() * 720;
+ break;
case PROJECTILE_GRENADE_BOUNCING:
self.mins = '-3 -3 -3';
self.maxs = '3 3 3';
self.move_bounce_factor = g_balance_grenadelauncher_bouncefactor;
self.move_bounce_stopspeed = g_balance_grenadelauncher_bouncestop;
break;
+ case PROJECTILE_NADE_RED_BURN:
+ case PROJECTILE_NADE_RED:
+ case PROJECTILE_NADE_BLUE_BURN:
+ case PROJECTILE_NADE_BLUE:
+ case PROJECTILE_NADE_YELLOW_BURN:
+ case PROJECTILE_NADE_YELLOW:
+ case PROJECTILE_NADE_PINK_BURN:
+ case PROJECTILE_NADE_PINK:
+ case PROJECTILE_NADE_BURN:
+ case PROJECTILE_NADE:
+ self.mins = '-16 -16 -16';
+ self.maxs = '16 16 16';
+ self.move_movetype = MOVETYPE_BOUNCE;
+ self.move_touch = func_null;
+ self.scale = 1.5;
+ self.avelocity = randomvec() * 720;
+ break;
case PROJECTILE_MINE:
self.mins = '-4 -4 -4';
self.maxs = '4 4 4';
precache_model("models/rocket.md3");
precache_model("models/tagrocket.md3");
precache_model("models/tracer.mdl");
+
+ precache_model("models/weapons/v_ok_grenade.md3");
precache_sound("weapons/electro_fly.wav");
precache_sound("weapons/rocket_fly.wav");
float PROJECTILE_BUMBLE_GUN = 30;
float PROJECTILE_BUMBLE_BEAM = 31;
+float PROJECTILE_NADE_RED = 50;
+float PROJECTILE_NADE_RED_BURN = 51;
+float PROJECTILE_NADE_BLUE = 52;
+float PROJECTILE_NADE_BLUE_BURN = 53;
+float PROJECTILE_NADE_YELLOW = 54;
+float PROJECTILE_NADE_YELLOW_BURN = 55;
+float PROJECTILE_NADE_PINK = 56;
+float PROJECTILE_NADE_PINK_BURN = 57;
+float PROJECTILE_NADE = 58;
+float PROJECTILE_NADE_BURN = 59;
+
float SPECIES_HUMAN = 0;
float SPECIES_ROBOT_SOLID = 1;
float SPECIES_ALIEN = 2;
DEATHTYPE(DEATH_KILL, DEATH_SELF_SUICIDE, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_LAVA, DEATH_SELF_LAVA, DEATH_MURDER_LAVA, NORMAL_POS) \
DEATHTYPE(DEATH_MIRRORDAMAGE, DEATH_SELF_BETRAYAL, NO_MSG, NORMAL_POS) \
+ DEATHTYPE(DEATH_NADE, DEATH_SELF_NADE, DEATH_MURDER_NADE, NORMAL_POS) \
DEATHTYPE(DEATH_NOAMMO, DEATH_SELF_NOAMMO, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_ROT, DEATH_SELF_ROT, NO_MSG, NORMAL_POS) \
DEATHTYPE(DEATH_SHOOTING_STAR, DEATH_SELF_SHOOTING_STAR, DEATH_MURDER_SHOOTING_STAR, NORMAL_POS) \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FALL, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_fall", _("^BG%s%s^K1 was grounded by ^BG%s^K1%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FIRE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was burnt up into a crisp by ^BG%s^K1%s%s\n"), _("^BG%s%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s%s\n")) \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_LAVA, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_lava", _("^BG%s%s^K1 was cooked by ^BG%s^K1%s%s\n"), "") \
+ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was blown up by ^BG%s^K1's Nade%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SHOOTING_STAR, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_shootingstar", _("^BG%s%s^K1 was shot into space by ^BG%s^K1%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SLIME, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_slime", _("^BG%s%s^K1 was slimed by ^BG%s^K1%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SWAMP, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_slime", _("^BG%s%s^K1 was preserved by ^BG%s^K1%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_FIRE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 became a bit too crispy%s%s\n"), _("^BG%s^K1 felt a little hot%s%s\n")) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_GENERIC, 2, 1, "s1 s2loc spree_lost", "s1", "notify_selfkill", _("^BG%s^K1 died%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_LAVA, 2, 1, "s1 s2loc spree_lost", "s1", "notify_lava", _("^BG%s^K1 turned into hot slag%s%s\n"), _("^BG%s^K1 found a hot place%s%s\n")) \
+ MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NADE, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 mastered the art of self-nading%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_NOAMMO, 2, 1, "s1 s2loc spree_lost", "s1", "notify_outofammo", _("^BG%s^K1 died%s%s. What's the point of living without ammo?\n"), _("^BG%s^K1 ran out of ammo%s%s\n")) \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_ROT, 2, 1, "s1 s2loc spree_lost", "s1", "notify_death", _("^BG%s^K1 rotted away%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_SELF_SHOOTING_STAR, 2, 1, "s1 s2loc spree_lost", "s1", "notify_shootingstar", _("^BG%s^K1 became a shooting star%s%s\n"), "") \
MULTITEAM_INFO(1, INFO_DEATH_TEAMKILL_, 4, 3, 1, "s1 s2 s3loc spree_end", "s2 s1", "notify_teamkill_%s", _("^BG%s^K1 was betrayed by ^BG%s^K1%s%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_FREEZETAG_FREEZE, 2, 0, "s1 s2", "", "", _("^BG%s^K1 was frozen by ^BG%s\n"), "") \
MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED, 2, 0, "s1 s2", "", "", _("^BG%s^K3 was revived by ^BG%s\n"), "") \
+ MSG_INFO_NOTIF(1, INFO_FREEZETAG_REVIVED_FALL, 1, 0, "s1", "", "", _("^BG%s^K3 was revived by falling\n"), "") \
MSG_INFO_NOTIF(1, INFO_FREEZETAG_AUTO_REVIVED, 1, 1, "s1 f1", "", "", _("^BG%s^K3 was automatically revived after %s second(s)\n"), "") \
MULTITEAM_INFO(1, INFO_ROUND_TEAM_WIN_, 4, 0, 0, "", "", "", _("^TC^TT^BG team wins the round\n"), "") \
MSG_INFO_NOTIF(1, INFO_ROUND_PLAYER_WIN, 1, 0, "s1", "", "", _("^BG%s^BG wins the round\n"), "") \
MSG_CENTER_NOTIF(1, CENTER_COUNTDOWN_ROUNDSTOP, 0, 0, "", CPID_ROUND, "2 0", _("^F4Round cannot start"), "") \
MSG_CENTER_NOTIF(1, CENTER_ROUND_TIED, 0, 0, "", CPID_ROUND, "0 0", _("^BGRound tied"), "") \
MSG_CENTER_NOTIF(1, CENTER_ROUND_OVER, 0, 0, "", CPID_ROUND, "0 0", _("^BGRound over, there's no winner"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_CAMPCHECK, 0, 0, "", CPID_CAMPCHECK, "0 0", _("^F2Don't camp!"), "") \
MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_FREE, 0, 0, "", CPID_CTF_CAPSHIELD, "0 0", _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \
MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED, 0, 0, "", CPID_CTF_CAPSHIELD, "0 0", _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
MULTITEAM_CENTER(1, CENTER_CTF_CAPTURE_, 2, 0, 0, "", CPID_CTF_LOWPRIO, "0 0", _("^BGYou captured the ^TC^TT^BG flag!"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED, 1, 1, "spree_cen s1", NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE, 1, 4, "spree_cen s1 frag_stats", NO_CPID, "0 0", _("^K1%sYou were typefragged by ^BG%s^BG%s"), _("^K1%sYou were scored against by ^BG%s^K1 while typing^BG%s")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE, 1, 2, "spree_cen s1 frag_ping", NO_CPID, "0 0", _("^K1%sYou typefragged ^BG%s^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing^BG%s")) \
+ MSG_CENTER_NOTIF(1, CENTER_NADE_THROW, 0, 0, "", CPID_NADES, "0 0", _("^BGPress ^F2DROPWEAPON^BG again to toss the nade!"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_AUTOTEAMCHANGE, 0, 1, "death_team", NO_CPID, "0 0", _("^BGYou have been moved into a different team\nYou are now on: %s"), "") \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_BETRAYAL, 0, 0, "", NO_CPID, "0 0", _("^K1Don't shoot your team mates!"), _("^K1Don't go against your team mates!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_CAMP, 0, 0, "", NO_CPID, "0 0", _("^K1Die camper!"), _("^K1Reconsider your tactics, camper!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_FIRE, 0, 0, "", NO_CPID, "0 0", _("^K1You got a little bit too crispy!"), _("^K1You felt a little too hot!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_GENERIC, 0, 0, "", NO_CPID, "0 0", _("^K1You killed your own dumb self!"), _("^K1You need to be more careful!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_LAVA, 0, 0, "", NO_CPID, "0 0", _("^K1You couldn't stand the heat!"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NADE, 0, 0, "", NO_CPID, "0 0", _("^K1You forgot to put the pin back in!"), _("^K1Tastes like chicken!")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_NOAMMO, 0, 0, "", NO_CPID, "0 0", _("^K1You were killed for running out of ammo..."), _("^K1You are respawning for running out of ammo...")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_ROT, 0, 0, "", NO_CPID, "0 0", _("^K1You grew too old without taking your medicine"), _("^K1You need to preserve your health")) \
MSG_CENTER_NOTIF(1, CENTER_DEATH_SELF_SHOOTING_STAR, 0, 0, "", NO_CPID, "0 0", _("^K1You became a shooting star!"), "") \
MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FREEZE, 1, 0, "s1", NO_CPID, "0 0", _("^K3You froze ^BG%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FROZEN, 1, 0, "s1", NO_CPID, "0 0", _("^K1You were frozen by ^BG%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE, 1, 0, "s1", NO_CPID, "0 0", _("^K3You revived ^BG%s"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE_FALL, 0, 0, "", NO_CPID, "0 0", _("^K3You revived yourself"), "") \
MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVED, 1, 0, "s1", NO_CPID, "0 0", _("^K3You were revived by ^BG%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_AUTO_REVIVED, 0, 1, "f1", NO_CPID, "0 0", _("^K3You were automatically revived after %s second(s)"), "") \
MULTITEAM_CENTER(1, CENTER_ROUND_TEAM_WIN_, 4, 0, 0, "", CPID_ROUND, "0 0", _("^TC^TT^BG team wins the round"), "") \
MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_WAIT, 0, 4, "missing_teams", CPID_KEYHUNT_OTHER, "0 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") \
MSG_CENTER_NOTIF(1, CENTER_MISSING_TEAMS, 0, 4, "missing_teams", CPID_MISSING_TEAMS, "-1 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") \
MSG_CENTER_NOTIF(1, CENTER_MISSING_PLAYERS, 0, 1, "f1", CPID_MISSING_PLAYERS, "-1 0", _("^BGWaiting for %s player(s) to join..."), "") \
- MSG_CENTER_NOTIF(1, CENTER_LMS_CAMPCHECK, 0, 0, "", CPID_LMS_CAMP, "0 0", _("^F2Don't camp!"), "") \
MSG_CENTER_NOTIF(1, CENTER_MINSTA_FINDAMMO, 0, 0, "", CPID_MINSTA_FINDAMMO, "1 9", _("^F4^COUNT^BG left to find some ammo!"), "") \
MSG_CENTER_NOTIF(1, CENTER_MINSTA_FINDAMMO_FIRST, 0, 0, "", CPID_MINSTA_FINDAMMO, "1 10", _("^BGGet some ammo or you'll be dead in ^F4^COUNT^BG!"), _("^BGGet some ammo! ^F4^COUNT^BG left!")) \
MSG_CENTER_NOTIF(1, CENTER_MINSTA_LIVES_REMAINING, 0, 1, "f1", NO_CPID, "0 0", _("^F2Extra lives remaining: ^K1%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_MOTD, 1, 0, "s1", CPID_MOTD, "-1 0", _("^BG%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_NIX_COUNTDOWN, 0, 2, "item_wepname", CPID_NIX, "1 f2", _("^F2^COUNT^BG until weapon change...\nNext weapon: ^F1%s"), "") \
MSG_CENTER_NOTIF(1, CENTER_NIX_NEWWEAPON, 0, 1, "item_wepname", CPID_NIX, "0 0", _("^F2Active weapon: ^F1%s"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_NADE, 0, 0, "", NO_CPID, "0 0", _("^BGPress ^F2DROPWEAPON^BG again to toss the grenade!"), "") \
MSG_CENTER_NOTIF(1, CENTER_OVERTIME_FRAG, 0, 0, "", CPID_OVERTIME, "0 0", _("^F2Now playing ^F4OVERTIME^F2!\nKeep fragging until we have a winner!"), _("^F2Now playing ^F4OVERTIME^F2!\nKeep scoring until we have a winner!")) \
MSG_CENTER_NOTIF(1, CENTER_OVERTIME_TIME, 0, 1, "f1time", CPID_OVERTIME, "0 0", _("^F2Now playing ^F4OVERTIME^F2!\n^BGAdded ^F4%s^BG to the game!"), "") \
MSG_CENTER_NOTIF(1, CENTER_POWERDOWN_INVISIBILITY, 0, 0, "", CPID_POWERUP, "0 0", _("^F2Invisibility has worn off"), "") \
MSG_MULTI_NOTIF(1, DEATH_MURDER_FALL, NO_MSG, INFO_DEATH_MURDER_FALL, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_MURDER_FIRE, NO_MSG, INFO_DEATH_MURDER_FIRE, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_MURDER_LAVA, NO_MSG, INFO_DEATH_MURDER_LAVA, NO_MSG) \
+ MSG_MULTI_NOTIF(1, DEATH_MURDER_NADE, NO_MSG, INFO_DEATH_MURDER_NADE, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_MURDER_SHOOTING_STAR, NO_MSG, INFO_DEATH_MURDER_SHOOTING_STAR, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_MURDER_SLIME, NO_MSG, INFO_DEATH_MURDER_SLIME, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_MURDER_SWAMP, NO_MSG, INFO_DEATH_MURDER_SWAMP, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_SELF_FIRE, NO_MSG, INFO_DEATH_SELF_FIRE, CENTER_DEATH_SELF_FIRE) \
MSG_MULTI_NOTIF(1, DEATH_SELF_GENERIC, NO_MSG, INFO_DEATH_SELF_GENERIC, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, DEATH_SELF_LAVA, NO_MSG, INFO_DEATH_SELF_LAVA, CENTER_DEATH_SELF_LAVA) \
+ MSG_MULTI_NOTIF(1, DEATH_SELF_NADE, NO_MSG, INFO_DEATH_SELF_NADE, CENTER_DEATH_SELF_NADE) \
MSG_MULTI_NOTIF(1, DEATH_SELF_NOAMMO, NO_MSG, INFO_DEATH_SELF_NOAMMO, CENTER_DEATH_SELF_NOAMMO) \
MSG_MULTI_NOTIF(1, DEATH_SELF_ROT, NO_MSG, INFO_DEATH_SELF_ROT, CENTER_DEATH_SELF_ROT) \
MSG_MULTI_NOTIF(1, DEATH_SELF_SHOOTING_STAR, NO_MSG, INFO_DEATH_SELF_SHOOTING_STAR, CENTER_DEATH_SELF_SHOOTING_STAR) \
#include "xonotic/dialog_settings_video.c"
#include "xonotic/dialog_settings_effects.c"
#include "xonotic/dialog_settings_audio.c"
+#include "xonotic/dialog_settings_game.c"
#include "xonotic/dialog_settings_user.c"
#include "xonotic/dialog_settings_misc.c"
#include "xonotic/dialog_multiplayer.c"
-#include "xonotic/dialog_multiplayer_playersetup.c"
+#include "xonotic/dialog_multiplayer_profile.c"
#include "xonotic/tabcontroller.c"
#include "xonotic/textlabel.c"
#include "xonotic/slider.c"
#include "xonotic/dialog_singleplayer_winner.c"
#include "xonotic/dialog_credits.c"
#include "xonotic/credits.c"
-#include "xonotic/dialog_multiplayer_playersetup_crosshair.c"
-#include "xonotic/dialog_multiplayer_playersetup_hud.c"
-#include "xonotic/dialog_multiplayer_playersetup_hudconfirm.c"
-#include "xonotic/dialog_multiplayer_playersetup_model.c"
-#include "xonotic/dialog_multiplayer_playersetup_view.c"
-#include "xonotic/dialog_multiplayer_playersetup_weapons.c"
+#include "xonotic/dialog_settings_game_crosshair.c"
+#include "xonotic/dialog_settings_game_hud.c"
+#include "xonotic/dialog_settings_game_hudconfirm.c"
+#include "xonotic/dialog_settings_game_model.c"
+#include "xonotic/dialog_settings_game_view.c"
+#include "xonotic/dialog_settings_game_weapons.c"
#include "xonotic/weaponslist.c"
-#include "xonotic/dialog_multiplayer_demo.c"
+#include "xonotic/dialog_multiplayer_media.c"
+#include "xonotic/dialog_multiplayer_media_demo.c"
#include "xonotic/demolist.c"
+#include "xonotic/screenshotimage.c"
+#include "xonotic/dialog_multiplayer_media_screenshot.c"
+#include "xonotic/dialog_multiplayer_media_screenshot_viewer.c"
+#include "xonotic/screenshotlist.c"
#include "xonotic/colorpicker.c"
#include "xonotic/colorpicker_string.c"
#include "xonotic/cvarlist.c"
#include "xonotic/dialog_hudpanel_physics.c"
#include "xonotic/dialog_hudpanel_centerprint.c"
#include "xonotic/slider_picmip.c"
+#include "xonotic/dialog_settings_game_notification.c"
METHOD(Image, toString, string(entity))
METHOD(Image, resizeNotify, void(entity, vector, vector, vector, vector))
METHOD(Image, updateAspect, void(entity))
+ METHOD(Image, initZoom, void(entity))
+ METHOD(Image, setZoom, void(entity, float, float))
+ METHOD(Image, drag_setStartPos, float(entity, vector))
+ METHOD(Image, drag, float(entity, vector))
ATTRIB(Image, src, string, string_null)
ATTRIB(Image, color, vector, '1 1 1')
- ATTRIB(Image, forcedAspect, float, 0)
+ ATTRIB(Image, forcedAspect, float, 0) // special values: -1 keep image aspect ratio, -2 keep image size but bound to the containing box, -3 always keep image size
+ ATTRIB(Image, zoomBox, float, 0) // used by forcedAspect -2 when the image is larger than the containing box
+ ATTRIB(Image, zoomFactor, float, 1)
+ ATTRIB(Image, zoomOffset, vector, '0.5 0.5 0')
+ ATTRIB(Image, zoomSnapToTheBox, float, 1) // snap the zoomed in image to the box borders when zooming/dragging it
+ ATTRIB(Image, zoomTime, float, 0)
+ ATTRIB(Image, zoomLimitedByTheBox, float, 0) // forbids zoom if image would be larger than the containing box
+ ATTRIB(Image, zoomMax, float, 0)
+ ATTRIB(Image, start_zoomOffset, vector, '0 0 0')
+ ATTRIB(Image, start_coords, vector, '0 0 0')
ATTRIB(Image, imgOrigin, vector, '0 0 0')
ATTRIB(Image, imgSize, vector, '0 0 0')
ENDCLASS(Image)
{
me.src = path;
}
+void Image_initZoom(entity me)
+{
+ me.zoomOffset = '0.5 0.5 0';
+ me.zoomFactor = 1;
+ if (me.forcedAspect == -2)
+ me.zoomBox = -1; // calculate zoomBox at the first updateAspect call
+ if (me.zoomLimitedByTheBox)
+ me.zoomMax = -1; // calculate zoomMax at the first updateAspect call
+}
+
void Image_draw(entity me)
{
+ if(me.imgSize_x > 1 || me.imgSize_y > 1)
+ draw_SetClip();
draw_Picture(me.imgOrigin, me.src, me.imgSize, me.color, 1);
+ if(me.imgSize_x > 1 || me.imgSize_y > 1)
+ draw_ClearClip();
SUPER(Image).draw(me);
}
void Image_updateAspect(entity me)
{
- float asp;
+ float asp = 0;
if(me.size_x <= 0 || me.size_y <= 0)
return;
if(me.forcedAspect == 0)
}
else
{
+ vector sz = '0 0 0';
if(me.forcedAspect < 0)
{
- vector sz;
sz = draw_PictureSize(me.src);
asp = sz_x / sz_y;
}
else
asp = me.forcedAspect;
- if(me.size_x > asp * me.size_y)
+
+ if(me.forcedAspect <= -2)
+ {
+ me.imgSize_x = sz_x / me.size_x;
+ me.imgSize_y = sz_y / me.size_y;
+ if(me.zoomBox < 0 && (me.imgSize_x > 1 || me.imgSize_y > 1))
+ {
+ // image larger than the containing box, zoom it out to fit into the box
+ if(me.size_x > asp * me.size_y)
+ me.zoomBox = (me.size_y * asp / me.size_x) / me.imgSize_x;
+ else
+ me.zoomBox = (me.size_x / (asp * me.size_y)) / me.imgSize_y;
+ me.zoomFactor = me.zoomBox;
+ }
+ }
+ else
+ {
+ if(me.size_x > asp * me.size_y)
+ {
+ // x too large, so center x-wise
+ me.imgSize = eY + eX * (me.size_y * asp / me.size_x);
+ }
+ else
+ {
+ // y too large, so center y-wise
+ me.imgSize = eX + eY * (me.size_x / (asp * me.size_y));
+ }
+ }
+ }
+
+ if (me.zoomMax < 0)
+ {
+ if(me.zoomBox > 0)
+ me.zoomMax = me.zoomBox;
+ else
+ {
+ if(me.size_x > asp * me.size_y)
+ me.zoomMax = (me.size_y * asp / me.size_x) / me.imgSize_x;
+ else
+ me.zoomMax = (me.size_x / (asp * me.size_y)) / me.imgSize_y;
+ }
+ }
+
+ if (me.zoomMax > 0 && me.zoomFactor > me.zoomMax)
+ me.zoomFactor = me.zoomMax;
+ if (me.zoomFactor)
+ me.imgSize = me.imgSize * me.zoomFactor;
+
+ if(me.imgSize_x > 1 || me.imgSize_y > 1)
+ {
+ if(me.zoomSnapToTheBox)
+ {
+ if(me.imgSize_x > 1)
+ me.zoomOffset_x = bound(0.5/me.imgSize_x, me.zoomOffset_x, 1 - 0.5/me.imgSize_x);
+ else
+ me.zoomOffset_x = bound(1 - 0.5/me.imgSize_x, me.zoomOffset_x, 0.5/me.imgSize_x);
+
+ if(me.imgSize_y > 1)
+ me.zoomOffset_y = bound(0.5/me.imgSize_y, me.zoomOffset_y, 1 - 0.5/me.imgSize_y);
+ else
+ me.zoomOffset_y = bound(1 - 0.5/me.imgSize_y, me.zoomOffset_y, 0.5/me.imgSize_y);
+ }
+ else
+ {
+ me.zoomOffset_x = bound(0, me.zoomOffset_x, 1);
+ me.zoomOffset_y = bound(0, me.zoomOffset_y, 1);
+ }
+ }
+ else
+ me.zoomOffset = '0.5 0.5 0';
+
+ me.imgOrigin_x = 0.5 - me.zoomOffset_x * me.imgSize_x;
+ me.imgOrigin_y = 0.5 - me.zoomOffset_y * me.imgSize_y;
+}
+float Image_drag_setStartPos(entity me, vector coords)
+{
+ //if(me.imgSize_x > 1 || me.imgSize_y > 1) // check disabled: mousewheel zoom may start from a non-zoomed-in image
+ {
+ me.start_zoomOffset = me.zoomOffset;
+ me.start_coords = coords;
+ }
+ return 1;
+}
+float Image_drag(entity me, vector coords)
+{
+ if(me.imgSize_x > 1 || me.imgSize_y > 1)
+ {
+ me.zoomOffset_x = me.start_zoomOffset_x + (me.start_coords_x - coords_x) / me.imgSize_x;
+ me.zoomOffset_y = me.start_zoomOffset_y + (me.start_coords_y - coords_y) / me.imgSize_y;
+ me.updateAspect(me);
+ }
+ return 1;
+}
+void Image_setZoom(entity me, float z, float atMousePosition)
+{
+ float prev_zoomFactor;
+ prev_zoomFactor = me.zoomFactor;
+ if (z < 0) // multiply by the current zoomFactor (but can also snap to real dimensions or to box)
+ {
+ me.zoomFactor *= -z;
+ float realSize_in_the_middle, boxSize_in_the_middle;
+ realSize_in_the_middle = ((prev_zoomFactor - 1) * (me.zoomFactor - 1) < 0);
+ boxSize_in_the_middle = (me.zoomBox > 0 && (prev_zoomFactor - me.zoomBox) * (me.zoomFactor - me.zoomBox) < 0);
+ if (realSize_in_the_middle && boxSize_in_the_middle)
{
- // x too large, so center x-wise
- me.imgSize = eY + eX * (me.size_y * asp / me.size_x);
+ // snap to real dimensions or to box
+ if (prev_zoomFactor < me.zoomFactor)
+ me.zoomFactor = min(1, me.zoomBox);
+ else
+ me.zoomFactor = max(1, me.zoomBox);
}
+ else if (realSize_in_the_middle)
+ me.zoomFactor = 1; // snap to real dimensions
+ else if (boxSize_in_the_middle)
+ me.zoomFactor = me.zoomBox; // snap to box
+ }
+ else if (z == 0) // reset (no zoom)
+ {
+ if (me.zoomBox > 0)
+ me.zoomFactor = me.zoomBox;
else
+ me.zoomFactor = 1;
+ }
+ else // directly set
+ me.zoomFactor = z;
+ me.zoomFactor = bound(1/16, me.zoomFactor, 16);
+ if (me.zoomMax > 0 && me.zoomFactor > me.zoomMax)
+ me.zoomFactor = me.zoomMax;
+ if (prev_zoomFactor != me.zoomFactor)
+ {
+ me.zoomTime = time;
+ if (atMousePosition)
{
- // y too large, so center y-wise
- me.imgSize = eX + eY * (me.size_x / (asp * me.size_y));
+ me.zoomOffset_x = me.start_zoomOffset_x + (me.start_coords_x - 0.5) / me.imgSize_x;
+ me.zoomOffset_y = me.start_zoomOffset_y + (me.start_coords_y - 0.5) / me.imgSize_y;
+ // updateAspect will reset zoomOffset to '0.5 0.5 0' if
+ // with this zoomFactor the image will not be zoomed in
+ // (updateAspect will check the new values of imgSize).
}
- me.imgOrigin = '0.5 0.5 0' - 0.5 * me.imgSize;
}
+ me.updateAspect(me);
}
void Image_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
return;
if(!Menu_Active)
return;
+
+ if(menuMouseMode)
+ if(key >= K_MOUSE1 && key <= K_MOUSE3)
+ {
+ // detect a click outside of the game window
+ vector p = getmousepos();
+ if(p_x < 0 || p_x > realconwidth || p_y < 0 || p_y > realconheight)
+ {
+ ++mouseButtonsPressed;
+ return;
+ }
+ }
+
if(keyGrabber)
{
entity e;
SKINVECTOR(COLOR_DIALOG_HUD, '1 0.7 0.7');
SKINVECTOR(COLOR_DIALOG_SERVERINFO, '0.7 0.7 1');
SKINVECTOR(COLOR_DIALOG_CVARS, '1 0 0');
+ SKINVECTOR(COLOR_DIALOG_SCREENSHOTVIEWER, '0.7 0.7 1');
SKINVECTOR(COLOR_DIALOG_HUDCONFIRM, '1 0 0');
// nexposee positions of windows (they are the scale transformation
void XonoticMultiplayerDialog_fill(entity me)
{
entity mc, e;
- mc = makeXonoticTabController(me.rows - 2);
+ mc = makeXonoticTabController(me.rows - 1);
me.TR(me);
me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Servers"), makeXonoticServerListTab()));
me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Create"), makeXonoticServerCreateTab()));
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab()));
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Player Setup"), makeXonoticPlayerSettingsTab()));
+ //me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab()));
+ //me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Screenshots"), makeXonoticScreenshotBrowserTab()));
+ //me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Players"), makeXonoticDemoBrowserTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Media"), makeXonoticMediaTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Profile"), makeXonoticProfileTab()));
me.TR(me);
- me.TR(me);
- me.TD(me, me.rows - 2, me.columns, mc);
+ me.TD(me, me.rows - 1, me.columns, mc);
}
#endif
METHOD(XonoticServerCreateTab, gameTypeChangeNotify, void(entity))
ATTRIB(XonoticServerCreateTab, title, string, _("Create"))
ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
- ATTRIB(XonoticServerCreateTab, rows, float, 22)
+ ATTRIB(XonoticServerCreateTab, rows, float, 23)
ATTRIB(XonoticServerCreateTab, columns, float, 6.2) // added extra .2 for center space
ATTRIB(XonoticServerCreateTab, mapListBox, entity, NULL)
{
entity e, e0;
+ me.TR(me);
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Game type:")));
me.TR(me);
e.onClickEntity = main.advancedDialog;
main.advancedDialog.refilterEntity = me.mapListBox;
- me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
+ me.gotoRC(me, 1, 3.2); 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.TD(me, me.rows - 5, 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'));
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
- METHOD(XonoticDemoBrowserTab, fill, void(entity))
- ATTRIB(XonoticDemoBrowserTab, title, string, _("Demo"))
- ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
- ATTRIB(XonoticDemoBrowserTab, rows, float, 22)
- ATTRIB(XonoticDemoBrowserTab, columns, float, 4)
- ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBrowser")
-ENDCLASS(XonoticDemoBrowserTab)
-entity makeXonoticDemoBrowserTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeXonoticDemoBrowserTab()
-{
- entity me;
- me = spawnXonoticDemoBrowserTab();
- me.configureDialog(me);
- return me;
-}
-void XonoticDemoBrowserTab_fill(entity me)
-{
- entity e, dlist;
-
- me.TR(me);
- me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "cl_autodemo", _("Automatically record demos while playing")));
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
- me.TD(me, 1, 3.5, e = makeXonoticInputBox(0, string_null));
- dlist = makeXonoticDemoList();
- e.onChange = DemoList_Filter_Change;
- e.onChangeEntity = dlist;
- dlist.controlledTextbox = e;
-
- 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'));
- e.onClick = TimeDemo_Click;
- e.onClickEntity = dlist;
- me.TD(me, 1, me.columns / 2, e = makeXonoticButton(ZCTX(_("DEMO^Play")), '0 0 0'));
- e.onClick = StartDemo_Click;
- e.onClickEntity = dlist;
-}
-#endif
METHOD(XonoticServerListTab, fill, void(entity))
ATTRIB(XonoticServerListTab, title, string, _("Join"))
ATTRIB(XonoticServerListTab, intendedWidth, float, 0.9)
- ATTRIB(XonoticServerListTab, rows, float, 22)
+ ATTRIB(XonoticServerListTab, rows, float, 23)
ATTRIB(XonoticServerListTab, columns, float, 6.5)
ENDCLASS(XonoticServerListTab)
entity makeXonoticServerListTab();
slist = makeXonoticServerList();
me.TR(me);
- me.TD(me, 1, 0.4, e = makeXonoticTextLabel(0, _("Filter:")));
- me.TD(me, 1, me.columns - 0.6 * 3 - 0.4, e = makeXonoticInputBox(0, string_null));
+ me.TR(me);
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
+ me.TD(me, 1, me.columns - 0.6 * 3 - 0.5, e = makeXonoticInputBox(0, string_null));
e.onChange = ServerList_Filter_Change;
e.onChangeEntity = slist;
slist.controlledTextbox = e;
me.TD(me, 1, 1, slist.sortButton4 = makeXonoticButton(string_null, '0 0 0'));
me.TD(me, 1, 1, slist.sortButton5 = makeXonoticButton(string_null, '0 0 0'));
me.TR(me);
- me.TD(me, me.rows - 4, me.columns, slist);
+ me.TD(me, me.rows - 5, me.columns, slist);
me.gotoRC(me, me.rows - 2, 0);
me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Address:")));
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticMediaTab) EXTENDS(XonoticTab)
+ METHOD(XonoticMediaTab, fill, void(entity))
+ ATTRIB(XonoticMediaTab, title, string, _("Demo"))
+ ATTRIB(XonoticMediaTab, intendedWidth, float, 0.9)
+ ATTRIB(XonoticMediaTab, rows, float, 23)
+ ATTRIB(XonoticMediaTab, columns, float, 2)
+ ATTRIB(XonoticMediaTab, name, string, "Media")
+ENDCLASS(XonoticMediaTab)
+entity makeXonoticMediaTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticMediaTab()
+{
+ entity me;
+ me = spawnXonoticMediaTab();
+ me.configureDialog(me);
+ return me;
+}
+void XonoticMediaTab_fill(entity me)
+{
+ entity mc, e;
+ mc = makeXonoticTabController(me.rows - 2);
+ me.TR(me);
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Screenshots"), makeXonoticScreenshotBrowserTab()));
+
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, me.rows - 2, me.columns, mc);
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
+ METHOD(XonoticDemoBrowserTab, fill, void(entity))
+ ATTRIB(XonoticDemoBrowserTab, title, string, _("Demo"))
+ ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
+ ATTRIB(XonoticDemoBrowserTab, rows, float, 21)
+ ATTRIB(XonoticDemoBrowserTab, columns, float, 6.5)
+ ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBrowser")
+ENDCLASS(XonoticDemoBrowserTab)
+entity makeXonoticDemoBrowserTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticDemoBrowserTab()
+{
+ entity me;
+ me = spawnXonoticDemoBrowserTab();
+ me.configureDialog(me);
+ return me;
+}
+void XonoticDemoBrowserTab_fill(entity me)
+{
+ entity e, dlist;
+
+ me.TR(me);
+ me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "cl_autodemo", _("Automatically record demos while playing")));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
+ me.TD(me, 1, 6, e = makeXonoticInputBox(0, string_null));
+ dlist = makeXonoticDemoList();
+ e.onChange = DemoList_Filter_Change;
+ e.onChangeEntity = dlist;
+ dlist.controlledTextbox = e;
+
+ 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'));
+ e.onClick = TimeDemo_Click;
+ e.onClickEntity = dlist;
+ me.TD(me, 1, me.columns / 2, e = makeXonoticButton(ZCTX(_("DEMO^Play")), '0 0 0'));
+ e.onClick = StartDemo_Click;
+ e.onClickEntity = dlist;
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticScreenshotBrowserTab) EXTENDS(XonoticTab)
+ METHOD(XonoticScreenshotBrowserTab, fill, void(entity))
+ ATTRIB(XonoticScreenshotBrowserTab, title, string, "Screenshot")
+ ATTRIB(XonoticScreenshotBrowserTab, intendedWidth, float, 1)
+ ATTRIB(XonoticScreenshotBrowserTab, rows, float, 21)
+ ATTRIB(XonoticScreenshotBrowserTab, columns, float, 6.5)
+ ATTRIB(XonoticScreenshotBrowserTab, name, string, "ScreenshotBrowser")
+
+ METHOD(XonoticScreenshotBrowserTab, loadPreviewScreenshot, void(entity, string))
+ ATTRIB(XonoticScreenshotBrowserTab, screenshotImage, entity, NULL)
+ ATTRIB(XonoticScreenshotBrowserTab, currentScrPath, string, string_null)
+ENDCLASS(XonoticScreenshotBrowserTab)
+entity makeXonoticScreenshotBrowserTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticScreenshotBrowserTab()
+{
+ entity me;
+ me = spawnXonoticScreenshotBrowserTab();
+ me.configureDialog(me);
+ return me;
+}
+void XonoticScreenshotBrowserTab_loadPreviewScreenshot(entity me, string scrImage)
+{
+ if (me.currentScrPath == scrImage)
+ return;
+ if (me.currentScrPath)
+ strunzone(me.currentScrPath);
+ me.currentScrPath = strzone(scrImage);
+ me.screenshotImage.load(me.screenshotImage, me.currentScrPath);
+}
+void XonoticScreenshotBrowserTab_fill(entity me)
+{
+ entity e, slist;
+ slist = makeXonoticScreenshotList();
+ float slist_height = me.rows - 2;
+ me.TR(me);
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Filter:"));
+ me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
+ e.onChange = ScreenshotList_Filter_Would_Change;
+ e.onChangeEntity = slist;
+ slist.screenshotViewerDialog = main.screenshotViewerDialog;
+ main.screenshotViewerDialog.scrList = slist;
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Refresh"), '0 0 0'));
+ e.onClick = ScreenshotList_Refresh_Click;
+ e.onClickEntity = slist;
+ me.TR(me);
+ me.TD(me, slist_height, me.columns, slist);
+
+ me.gotoRC(me, slist_height + 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("Open in the viewer"), '0 0 0'));
+ e.onClick = StartScreenshot_Click;
+ e.onClickEntity = slist;
+/*
+ me.TR(me);
+ me.TD(me, me.rows - me.currentRow, me.columns, e = makeXonoticScreenshotImage());
+ e.showTitle = 0;
+ me.screenshotImage = e;
+ slist.screenshotPreview = e;
+ slist.screenshotBrowserDialog = me;
+*/
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticScreenshotViewerDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticScreenshotViewerDialog, fill, void(entity))
+ METHOD(XonoticScreenshotViewerDialog, keyDown, float(entity, float, float, float))
+ METHOD(XonoticScreenshotViewerDialog, loadScreenshot, void(entity, string))
+ METHOD(XonoticScreenshotViewerDialog, close, void(entity))
+ ATTRIB(XonoticScreenshotViewerDialog, title, string, "Screenshot Viewer")
+ ATTRIB(XonoticScreenshotViewerDialog, name, string, "ScreenshotViewer")
+ ATTRIB(XonoticScreenshotViewerDialog, intendedWidth, float, 1)
+ ATTRIB(XonoticScreenshotViewerDialog, rows, float, 25)
+ ATTRIB(XonoticScreenshotViewerDialog, columns, float, 4)
+ ATTRIB(XonoticScreenshotViewerDialog, color, vector, SKINCOLOR_DIALOG_SCREENSHOTVIEWER)
+ ATTRIB(XonoticScreenshotViewerDialog, scrList, entity, NULL)
+ ATTRIB(XonoticScreenshotViewerDialog, screenshotImage, entity, NULL)
+ ATTRIB(XonoticScreenshotViewerDialog, slideShowButton, entity, NULL)
+ ATTRIB(XonoticScreenshotViewerDialog, currentScrPath, string, string_null)
+ENDCLASS(XonoticScreenshotViewerDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+float music_playlist_index_backup;
+void XonoticScreenshotViewerDialog_loadScreenshot(entity me, string scrImage)
+{
+ // disable music as it can lag depending on image loading time
+ if(!cvar("menu_screenshotviewer_enablemusic"))
+ if(cvar("music_playlist_index") != 999) // if the playlist isn't paused
+ {
+ // pause music
+ if(cvar("music_playlist_index") != -1)
+ {
+ music_playlist_index_backup = cvar("music_playlist_index");
+ cvar_set("music_playlist_sampleposition0", "0");
+ cvar_set("music_playlist_index", "999");
+ }
+ else
+ localcmd("\ncd pause\n");
+ }
+
+ if (me.currentScrPath == scrImage)
+ return;
+ if (me.currentScrPath)
+ strunzone(me.currentScrPath);
+ me.currentScrPath = strzone(scrImage);
+ me.screenshotImage.load(me.screenshotImage, me.currentScrPath);
+ me.frame.setText(me.frame, me.screenshotImage.screenshotTitle);
+}
+void prevScreenshot_Click(entity btn, entity me)
+{
+ me.scrList.goScreenshot(me.scrList, -1);
+}
+void nextScreenshot_Click(entity btn, entity me)
+{
+ me.scrList.goScreenshot(me.scrList, +1);
+}
+void increaseZoom_Click(entity btn, entity me)
+{
+ me.screenshotImage.setZoom(me.screenshotImage, -2, FALSE);
+}
+void decreaseZoom_Click(entity btn, entity me)
+{
+ me.screenshotImage.setZoom(me.screenshotImage, -1/2, FALSE);
+}
+void resetZoom_Click(entity btn, entity me)
+{
+ me.screenshotImage.setZoom(me.screenshotImage, 0, FALSE);
+}
+void toggleSlideShow_Click(entity btn, entity me)
+{
+ if (me.slideShowButton.forcePressed)
+ {
+ me.scrList.stopSlideShow(me.scrList);
+ me.slideShowButton.forcePressed = 0;
+ }
+ else
+ {
+ me.scrList.startSlideShow(me.scrList);
+ me.slideShowButton.forcePressed = 1;
+ }
+}
+float XonoticScreenshotViewerDialog_keyDown(entity me, float key, float ascii, float shift)
+{
+ switch(key)
+ {
+ case K_KP_LEFTARROW:
+ case K_LEFTARROW:
+ me.scrList.goScreenshot(me.scrList, -1);
+ return 1;
+ case K_KP_RIGHTARROW:
+ case K_RIGHTARROW:
+ me.scrList.goScreenshot(me.scrList, +1);
+ return 1;
+ case K_KP_ENTER:
+ case K_ENTER:
+ case K_SPACE:
+ // we cannot use SPACE/ENTER directly, as in a dialog they are needed
+ // to press buttons while browsing with only the keyboard
+ if (shift & S_CTRL)
+ {
+ toggleSlideShow_Click(world, me);
+ return 1;
+ }
+ return SUPER(XonoticScreenshotViewerDialog).keyDown(me, key, ascii, shift);
+ default:
+ if (key == K_MWHEELUP || ascii == '+')
+ {
+ me.screenshotImage.setZoom(me.screenshotImage, -2, (key == K_MWHEELUP));
+ return 1;
+ }
+ else if (key == K_MWHEELDOWN || ascii == '-')
+ {
+ me.screenshotImage.setZoom(me.screenshotImage, -1/2, (key == K_MWHEELDOWN));
+ return 1;
+ }
+ if (me.scrList.keyDown(me.scrList, key, ascii, shift))
+ {
+ // keyDown has already changed the selected item
+ me.scrList.goScreenshot(me.scrList, 0);
+ return 1;
+ }
+ return SUPER(XonoticScreenshotViewerDialog).keyDown(me, key, ascii, shift);
+ }
+}
+void XonoticScreenshotViewerDialog_close(entity me)
+{
+ // resume music
+ if(!cvar("menu_screenshotviewer_enablemusic"))
+ if(cvar("music_playlist_index") == 999)
+ {
+ cvar_set("music_playlist_index", ftos(music_playlist_index_backup));
+ }
+ else
+ localcmd("\ncd resume\n");
+
+ me.scrList.stopSlideShow(me.scrList);
+ me.slideShowButton.forcePressed = 0;
+ SUPER(XonoticScreenshotViewerDialog).close(me);
+}
+void XonoticScreenshotViewerDialog_fill(entity me)
+{
+ entity e;
+ me.TR(me);
+ me.TD(me, me.rows - 1, me.columns, e = makeXonoticScreenshotImage());
+ e.showTitle = 0; // dialog title is enough
+ me.screenshotImage = e;
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TDempty(me, 1/20 * me.columns);
+ me.TD(me, 1, 1/20 * me.columns, e = makeXonoticButton("-", '0 0 0'));
+ e.onClick = decreaseZoom_Click;
+ e.onClickEntity = me;
+ me.TD(me, 1, 1/20 * me.columns, e = makeXonoticButton("+", '0 0 0'));
+ e.onClick = increaseZoom_Click;
+ e.onClickEntity = me;
+ me.TD(me, 1, 2/20 * me.columns, e = makeXonoticButton(_("Reset"), '0 0 0'));
+ e.onClick = resetZoom_Click;
+ e.onClickEntity = me;
+
+ me.TDempty(me, 2/20 * me.columns);
+ me.TD(me, 1, 3/20 * me.columns, e = makeXonoticButton(_("Previous"), '0 0 0'));
+ e.onClick = prevScreenshot_Click;
+ e.onClickEntity = me;
+ me.TD(me, 1, 3/20 * me.columns, e = makeXonoticButton(_("Next"), '0 0 0'));
+ e.onClick = nextScreenshot_Click;
+ e.onClickEntity = me;
+
+ me.TDempty(me, 2/20 * me.columns);
+ me.TD(me, 1, 4/20 * me.columns, e = makeXonoticButton(_("Slide show"), '0 0 0'));
+ e.onClick = toggleSlideShow_Click;
+ e.onClickEntity = me;
+ me.slideShowButton = e;
+}
+#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab)
- METHOD(XonoticPlayerSettingsTab, fill, void(entity))
- METHOD(XonoticPlayerSettingsTab, draw, void(entity))
- ATTRIB(XonoticPlayerSettingsTab, title, string, _("Player Setup"))
- ATTRIB(XonoticPlayerSettingsTab, intendedWidth, float, 0.9)
- ATTRIB(XonoticPlayerSettingsTab, rows, float, 22)
- ATTRIB(XonoticPlayerSettingsTab, columns, float, 6.2) // added extra .2 for center space
- ATTRIB(XonoticPlayerSettingsTab, playerNameLabel, entity, NULL)
- ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0)
-ENDCLASS(XonoticPlayerSettingsTab)
-entity makeXonoticPlayerSettingsTab();
-#endif
-
-#ifdef IMPLEMENTATION
-entity makeXonoticPlayerSettingsTab()
-{
- entity me;
- me = spawnXonoticPlayerSettingsTab();
- me.configureDialog(me);
- return me;
-}
-void XonoticPlayerSettingsTab_draw(entity me)
-{
- if(cvar_string("_cl_name") == "Player")
- me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
- else
- me.playerNameLabel.alpha = me.playerNameLabelAlpha;
- SUPER(XonoticPlayerSettingsTab).draw(me);
-}
-void XonoticPlayerSettingsTab_fill(entity me)
-{
- entity e, pms, label, box;
- float i;
-
- me.TR(me);
- 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;
- label.allowColors = 1;
- label.alpha = 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 = -127; // negative means encoded length in bytes
- box.saveImmediately = 1;
- box.enableClearButton = 0;
- label.textEntity = box;
- me.TR(me);
- me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
- me.TD(me, 5, 2, e = makeXonoticCharmap(box));
- me.TR(me);
- me.TR(me);
- me.TR(me);
- me.TR(me);
- me.TR(me);
-
- me.TR(me);
- me.TDempty(me, 1);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Model:")));
- me.TR(me);
- me.TDempty(me, 1);
- pms = makeXonoticPlayerModelSelector();
- me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0'));
- e.onClick = PlayerModelSelector_Prev_Click;
- e.onClickEntity = pms;
- me.TD(me, me.rows - (me.currentRow + 2), 1.4, pms);
- me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0'));
- e.onClick = PlayerModelSelector_Next_Click;
- e.onClickEntity = pms;
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color:")));
- for(i = 0; i < 15; ++i)
- {
- if(mod(i, 5) == 0)
- me.TR(me);
- me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0');
- }
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color:")));
- for(i = 0; i < 15; ++i)
- {
- if(mod(i, 5) == 0)
- me.TR(me);
- me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0');
- }
-
- // crosshair_enabled: 0 = no crosshair options, 1 = no crosshair selection, but everything else enabled, 2 = all crosshair options enabled
- // FIXME: In the future, perhaps make one global crosshair_type cvar which has 0 for disabled, 1 for custom, 2 for per weapon, etc?
- me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "0", _("No crosshair")));
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_per_weapon", string_null, _("Per weapon crosshair")));
- makeMulti(e, "crosshair_enabled");
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "2", _("Custom crosshair")));
- me.TR(me);
- me.TDempty(me, 0.1);
- for(i = 1; i <= 14; ++i) {
- me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
- setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
- }
- // show a larger preview of the selected crosshair
- me.TDempty(me, 0.1);
- me.TDNoMargin(me, 3, 0.8, e = makeXonoticCrosshairButton(7, -1), '1 1 0'); // crosshair -1 makes this a preview
- setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TDempty(me, 0.1);
- for(i = 15; i <= 28; ++i) {
- me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
- setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
- }
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair size:")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1.0, 0.01, "crosshair_size"));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair alpha:")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair color:")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "1", _("Per weapon")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "2", _("By health")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TDempty(me, 0.1);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(5, "crosshair_color_special", "0", _("Custom")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
- setDependentAND(e, "crosshair_color_special", 0, 0, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton(_("Other crosshair settings"), '0 0 0'));
- e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.crosshairDialog;
- setDependent(e, "crosshair_enabled", 1, 2);
- // TODO: show status of crosshair dot and hittest and pickups and such here with text
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton(_("Model settings"), '0 0 0'));
- e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.modelDialog;
- // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton(_("View settings"), '0 0 0'));
- e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.viewDialog;
- // TODO: show fov and other settings with text here
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton(_("Weapon settings"), '0 0 0'));
- e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.weaponsDialog;
- // I don't really think this is useful as is, and especially it doesn't look very clean...
- // In the future, if ALL of these buttons had some information, then it would be justified/clean
- //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null));
- // e0.textEntity = main.weaponsDialog;
- // e0.allowCut = 1;
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0'));
- e.onClick = DialogOpenButton_Click;
- e.onClickEntity = main.hudDialog;
- // TODO: show hud config name with text here
-
- 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\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
-}
-#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticCrosshairDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticCrosshairDialog, toString, string(entity))
- METHOD(XonoticCrosshairDialog, fill, void(entity))
- METHOD(XonoticCrosshairDialog, showNotify, void(entity))
- ATTRIB(XonoticCrosshairDialog, title, string, _("Crosshair settings"))
- ATTRIB(XonoticCrosshairDialog, color, vector, SKINCOLOR_DIALOG_CROSSHAIR)
- ATTRIB(XonoticCrosshairDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticCrosshairDialog, rows, float, 18)
- ATTRIB(XonoticCrosshairDialog, columns, float, 3)
-ENDCLASS(XonoticCrosshairDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void XonoticCrosshairDialog_showNotify(entity me)
-{
- loadAllCvars(me);
-}
-string XonoticCrosshairDialog_toString(entity me)
-{
- return "hi"; // TODO: show status of crosshair dot and hittest and pickups and such here with text
-}
-void XonoticCrosshairDialog_fill(entity me)
-{
- entity e;
-
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot size:")));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size"));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot alpha:")));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.1, "crosshair_dot_alpha"));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot color:")));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "0", _("Use normal crosshair color")));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TDempty(me, 0.1);
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "1", _("Custom")));
- setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
- me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_dot_color", "crosshair_dot_color"));
- setDependentAND3(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2, "crosshair_dot_color_custom", 1, 1);
- me.TR(me);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Crosshair animations:")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_effect_scalefade", _("Smooth effects of crosshairs")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_ring", _("Use rings to indicate weapon status")));
- makeMulti(e, "crosshair_ring_reload");
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Hit testing:")));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("crosshair_hittest"));
- e.addValue(e, ZCTX(_("HTTST^Disabled")), "0");
- e.addValue(e, ZCTX(_("HTTST^TrueAim")), "1");
- e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25");
- e.configureXonoticTextSliderValues(e);
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_hittest_blur", _("Blur crosshair if the shot is obstructed")));
- setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.5, 0, "crosshair_hitindication", _("Animate when hitting an enemy")));
- setDependent(e, "crosshair_enabled", 1, 2);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 0, "crosshair_pickup", _("Animate when picking up an item")));
- setDependent(e, "crosshair_enabled", 1, 2);
-
- me.TR(me);
-
- me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticHUDDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticHUDDialog, toString, string(entity))
- METHOD(XonoticHUDDialog, fill, void(entity))
- METHOD(XonoticHUDDialog, showNotify, void(entity))
- ATTRIB(XonoticHUDDialog, title, string, _("HUD settings"))
- ATTRIB(XonoticHUDDialog, color, vector, SKINCOLOR_DIALOG_HUD)
- ATTRIB(XonoticHUDDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticHUDDialog, rows, float, 18)
- ATTRIB(XonoticHUDDialog, columns, float, 3)
-ENDCLASS(XonoticHUDDialog)
-void HUDSetup_Start(entity me, entity btn);
-#endif
-
-#ifdef IMPLEMENTATION
-void HUDSetup_Check_Gamestatus(entity me, entity btn)
-{
- if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) // we're not in a match, ask the player if they want to start one anyway
- {
- DialogOpenButton_Click(me, main.hudconfirmDialog);
- }
- else // already in a match, lets just cut to the point and open up the hud editor directly
- {
- HUDSetup_Start(me, btn);
- }
-}
-void XonoticHUDDialog_showNotify(entity me)
-{
- loadAllCvars(me);
-}
-string XonoticHUDDialog_toString(entity me)
-{
- return "hi"; // TODO: show hud config name with text here
-}
-void XonoticHUDDialog_fill(entity me)
-{
- entity e;
-
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Damage:")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Overlay:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Factor:")));
- setDependent(e, "hud_damage", 0.001, 100);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.025, 0.1, 0.025, "hud_damage_factor"));
- setDependent(e, "hud_damage", 0.001, 100);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Fade rate:")));
- setDependent(e, "hud_damage", 0.001, 100);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.25, 1, 0.05, "hud_damage_fade_rate"));
- setDependent(e, "hud_damage", 0.001, 100);
- me.TR(me);
-
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Waypoints")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Scale:")));
- setDependent(e, "cl_hidewaypoints", 0, 0);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "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, _("Alpha:")));
- setDependent(e, "cl_hidewaypoints", 0, 0);
- me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "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, _("Edge offset:")));
- setDependent(e, "cl_hidewaypoints", 0, 0);
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.3, 0.01, "g_waypointsprite_edgeoffset_bottom"));
- makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right");
- setDependent(e, "cl_hidewaypoints", 0, 0);
- me.TR(me);
-
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(25, 0, "hud_shownames_crosshairdistance", _("Only when near crosshair")));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "hud_shownames_status", _("Display health and armor")));
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
- e.onClick = HUDSetup_Check_Gamestatus;
- e.onClickEntity = me;
- // TODO: show hud config name with text here
-
- me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-#endif
\ No newline at end of file
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticHUDConfirmDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticHUDConfirmDialog, fill, void(entity))
- ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor"))
- ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
- ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticHUDConfirmDialog, rows, float, 4)
- ATTRIB(XonoticHUDConfirmDialog, columns, float, 2)
-ENDCLASS(XonoticHUDConfirmDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void HUDSetup_Start(entity me, entity btn)
-{
- if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
- localcmd("map hudsetup/hudsetup", "\n");
- else
- localcmd("togglemenu 0\n");
-
- localcmd("_hud_configure 1", "\n");
-}
-
-void XonoticHUDConfirmDialog_fill(entity me)
-{
- entity e;
-
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game.")));
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?")));
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^Yes")), '1 0 0'));
- e.onClick = HUDSetup_Start;
- e.onClickEntity = me;
- me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^No")), '0 1 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticModelDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticModelDialog, toString, string(entity))
- METHOD(XonoticModelDialog, fill, void(entity))
- METHOD(XonoticModelDialog, showNotify, void(entity))
- ATTRIB(XonoticModelDialog, title, string, _("Model settings"))
- ATTRIB(XonoticModelDialog, color, vector, SKINCOLOR_DIALOG_MODEL)
- ATTRIB(XonoticModelDialog, intendedWidth, float, 0.5)
- ATTRIB(XonoticModelDialog, rows, float, 7)
- ATTRIB(XonoticModelDialog, columns, float, 3)
-ENDCLASS(XonoticModelDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void XonoticModelDialog_showNotify(entity me)
-{
- loadAllCvars(me);
-}
-string XonoticModelDialog_toString(entity me)
-{
- return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
-}
-void XonoticModelDialog_fill(entity me)
-{
- entity e;
-
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow"));
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:")));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs"));
- e.addValue(e, ZCTX(_("GIBS^None")), "1");
- e.addValue(e, ZCTX(_("GIBS^Few")), "0.75");
- e.addValue(e, ZCTX(_("GIBS^Many")), "0.5");
- e.addValue(e, ZCTX(_("GIBS^Lots")), "0");
- e.configureXonoticTextSliderValues(e);
- setDependent(e, "cl_gentle", 0, 0);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine")));
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine")));
- me.TR(me);
-
- me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticViewDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticViewDialog, toString, string(entity))
- METHOD(XonoticViewDialog, fill, void(entity))
- METHOD(XonoticViewDialog, showNotify, void(entity))
- ATTRIB(XonoticViewDialog, title, string, _("View settings"))
- ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW)
- ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9)
- ATTRIB(XonoticViewDialog, rows, float, 11)
- ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space
-ENDCLASS(XonoticViewDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void XonoticViewDialog_showNotify(entity me)
-{
- loadAllCvars(me);
-}
-string XonoticViewDialog_toString(entity me)
-{
- return "hi"; // TODO: show fov and other settings with text here
-}
-void XonoticViewDialog_fill(entity me)
-{
- entity e;
-
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov"));
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom:")));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_reticle"));
- e.addValue(e, ZCTX(_("RETICLE^Fullscreen")), "0");
- e.addValue(e, ZCTX(_("RETICLE^With reticle")), "1");
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Factor:"))));
- me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Speed:"))));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed"));
- e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense.
- e.addValue(e, "2", "2");
- e.addValue(e, "3", "3");
- e.addValue(e, "4", "4");
- e.addValue(e, "5", "5");
- e.addValue(e, "6", "6");
- e.addValue(e, "7", "7");
- e.addValue(e, "8", "8");
- e.addValue(e, ZCTX(_("ZOOM^Instant")), "-1");
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Sensitivity:"))));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity"));
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Velocity zoom:")));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_velocityzoom_type"));
- e.addValue(e, ZCTX(_("VZOOM^Disabled")), "0");
- e.addValue(e, ZCTX(_("VZOOM^Forward only")), "2");
- e.addValue(e, ZCTX(_("VZOOM^All directions")), "1");
- e.configureXonoticTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Speed"))));
- me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.2, "cl_velocityzoom"));
- setDependent(e, "cl_velocityzoom_type", 1, 3);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
-
- me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
- makeMulti(e, "crosshair_hittest_showimpact");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump")));
- setDependent(e, "chase_active", -1, 0);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching")));
- setDependent(e, "chase_active", -1, 0);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(1, 0, "v_idlescale", _("View waving while idle")));
- setDependent(e, "chase_active", -1, 0);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.01, 0, "cl_bob", _("View bobbing while walking around")));
- makeMulti(e, "cl_bob2");
- setDependent(e, "chase_active", -1, 0);
- me.TR(me);
- me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
- makeMulti(e, "crosshair_hittest_showimpact");
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance")));
- setDependent(e, "chase_active", 1, 1);
- me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back"));
- setDependent(e, "chase_active", 1, 1);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance")));
- setDependent(e, "chase_active", 1, 1);
- me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
- setDependent(e, "chase_active", 1, 1);
- me.TR(me);
-
- me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-#endif
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticWeaponsDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticWeaponsDialog, toString, string(entity))
- METHOD(XonoticWeaponsDialog, fill, void(entity))
- METHOD(XonoticWeaponsDialog, showNotify, void(entity))
- ATTRIB(XonoticWeaponsDialog, title, string, _("Weapon settings"))
- ATTRIB(XonoticWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
- ATTRIB(XonoticWeaponsDialog, intendedWidth, float, 0.7)
- ATTRIB(XonoticWeaponsDialog, rows, float, 12)
- ATTRIB(XonoticWeaponsDialog, columns, float, 5.2)
- ATTRIB(XonoticWeaponsDialog, weaponsList, entity, NULL)
-ENDCLASS(XonoticWeaponsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void XonoticWeaponsDialog_showNotify(entity me)
-{
- loadAllCvars(me);
-}
-string XonoticWeaponsDialog_toString(entity me)
-{
- return me.weaponsList.toString(me.weaponsList);
-}
-void XonoticWeaponsDialog_fill(entity me)
-{
- entity e;
-
- me.TR(me);
- me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon priority list:")));
- me.TR(me);
- me.TD(me, 8, 2, e = me.weaponsList = makeXonoticWeaponsList());
- me.gotoRC(me, 9, 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'));
- e.onClick = WeaponsList_MoveDown_Click;
- e.onClickEntity = me.weaponsList;
-
- me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn);
- 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.TR(me);
- me.TR(me);
- 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, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align")));
- setDependent(e, "r_drawviewmodel", 1, 1);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center")));
- setDependent(e, "r_drawviewmodel", 1, 1);
- me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align")));
- setDependent(e, "r_drawviewmodel", 1, 1);
- me.TR(me);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_followmodel", _("Gun model swaying")));
- makeMulti(e, "cl_leanmodel");
- setDependent(e, "r_drawviewmodel", 1, 1);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_bobmodel", _("Gun model bobbing")));
- setDependent(e, "r_drawviewmodel", 1, 1);
- //me.TR(me);
- //me.TR(me);
- // me.TDempty(me, 0.2);
- // me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VWMDL^Scale"))));
- // setDependent(e, "r_drawviewmodel", 1, 1);
- // me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 2, 0.1, "cl_viewmodel_scale"));
- // setDependent(e, "r_drawviewmodel", 1, 1);
-
- me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
-}
-#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticProfileTab) EXTENDS(XonoticTab)
+ METHOD(XonoticProfileTab, fill, void(entity))
+ METHOD(XonoticProfileTab, draw, void(entity))
+ ATTRIB(XonoticProfileTab, title, string, _("Profile"))
+ ATTRIB(XonoticProfileTab, intendedWidth, float, 0.9)
+ ATTRIB(XonoticProfileTab, rows, float, 23)
+ ATTRIB(XonoticProfileTab, columns, float, 6.2) // added extra .2 for center space
+ ATTRIB(XonoticProfileTab, playerNameLabel, entity, NULL)
+ ATTRIB(XonoticProfileTab, playerNameLabelAlpha, float, 0)
+ENDCLASS(XonoticProfileTab)
+entity makeXonoticProfileTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticProfileTab()
+{
+ entity me;
+ me = spawnXonoticProfileTab();
+ me.configureDialog(me);
+ return me;
+}
+void XonoticProfileTab_draw(entity me)
+{
+ if(cvar_string("_cl_name") == "Player")
+ me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
+ else
+ me.playerNameLabel.alpha = me.playerNameLabelAlpha;
+ SUPER(XonoticProfileTab).draw(me);
+}
+void XonoticProfileTab_fill(entity me)
+{
+ entity e, pms, label, box;
+ float i;
+
+ me.TR(me);
+ me.TR(me);
+ 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;
+ label.allowColors = 1;
+ label.alpha = 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 = -127; // negative means encoded length in bytes
+ box.saveImmediately = 1;
+ box.enableClearButton = 0;
+ label.textEntity = box;
+ me.TR(me);
+ me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
+ me.TD(me, 5, 2, e = makeXonoticCharmap(box));
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+
+ // Statistic Stuff -Debugger
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Player Statistics:")));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Join time:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Total playing time:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Last played:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Games played:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Win / Losses:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Kills / Deaths:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("CTF elo:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("DM elo:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("TDM elo:")));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("DUEL elo:")));
+ me.TR(me);
+
+
+ me.gotoRC(me, 1, 3.2); me.setFirstColumn(me, me.currentColumn);
+ me.TDempty(me, 1);
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0.5, _("Model:")));
+ me.TR(me);
+ pms = makeXonoticPlayerModelSelector();
+ me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '0 0 0'));
+ e.onClick = PlayerModelSelector_Prev_Click;
+ e.onClickEntity = pms;
+ me.TD(me, 13, 2.4, pms);
+ me.TD(me, 1, 0.3, e = makeXonoticButton(">>", '0 0 0'));
+ e.onClick = PlayerModelSelector_Next_Click;
+ e.onClickEntity = pms;
+
+ me.gotoRC(me, 15, 3.533); me.setFirstColumn(me, me.currentColumn);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Glowing color:")));
+ for(i = 0; i < 15; ++i)
+ {
+ if(mod(i, 5) == 0)
+ me.TR(me);
+ me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(1, 0, i), '0 1 0');
+ }
+ me.gotoRC(me, 15, 4.866); me.setFirstColumn(me, me.currentColumn);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0.5, _("Detail color:")));
+ for(i = 0; i < 15; ++i)
+ {
+ if(mod(i, 5) == 0)
+ me.TR(me);
+ me.TDNoMargin(me, 1, 0.2, e = makeXonoticColorButton(2, 1, i), '0 1 0');
+ }
+
+ /*
+ // crosshair_enabled: 0 = no crosshair options, 1 = no crosshair selection, but everything else enabled, 2 = all crosshair options enabled
+ // FIXME: In the future, perhaps make one global crosshair_type cvar which has 0 for disabled, 1 for custom, 2 for per weapon, etc?
+ me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "0", _("No crosshair")));
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_per_weapon", string_null, _("Per weapon crosshair")));
+ makeMulti(e, "crosshair_enabled");
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(3, "crosshair_enabled", "2", _("Custom crosshair")));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ for(i = 1; i <= 14; ++i) {
+ me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
+ }
+ // show a larger preview of the selected crosshair
+ me.TDempty(me, 0.1);
+ me.TDNoMargin(me, 3, 0.8, e = makeXonoticCrosshairButton(7, -1), '1 1 0'); // crosshair -1 makes this a preview
+ setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ for(i = 15; i <= 28; ++i) {
+ me.TDNoMargin(me, 1, 2 / 14, e = makeXonoticCrosshairButton(4, i), '1 1 0');
+ setDependentAND(e, "crosshair_per_weapon", 0, 0, "crosshair_enabled", 1, 2);
+ }
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair size:")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1.0, 0.01, "crosshair_size"));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair alpha:")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair color:")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "1", _("Per weapon")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 1, e = makeXonoticRadioButton(5, "crosshair_color_special", "2", _("By health")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(5, "crosshair_color_special", "0", _("Custom")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
+ setDependentAND(e, "crosshair_color_special", 0, 0, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Other crosshair settings"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.crosshairDialog;
+ setDependent(e, "crosshair_enabled", 1, 2);
+ // TODO: show status of crosshair dot and hittest and pickups and such here with text
+ me.TR(me);
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Model settings"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.modelDialog;
+ // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("View settings"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.viewDialog;
+ // TODO: show fov and other settings with text here
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Weapon settings"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.weaponsDialog;
+ // I don't really think this is useful as is, and especially it doesn't look very clean...
+ // In the future, if ALL of these buttons had some information, then it would be justified/clean
+ //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null));
+ // e0.textEntity = main.weaponsDialog;
+ // e0.allowCut = 1;
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.hudDialog;
+ // TODO: show hud config name with text here
+
+ */
+ 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\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
+}
+#endif
ATTRIB(XonoticSettingsDialog, title, string, _("Settings"))
ATTRIB(XonoticSettingsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
ATTRIB(XonoticSettingsDialog, intendedWidth, float, 0.96)
- ATTRIB(XonoticSettingsDialog, rows, float, 19)
+ ATTRIB(XonoticSettingsDialog, rows, float, 20)
ATTRIB(XonoticSettingsDialog, columns, float, 6)
ENDCLASS(XonoticSettingsDialog)
#endif
void XonoticSettingsDialog_fill(entity me)
{
entity mc;
- mc = makeXonoticTabController(me.rows - 2);
+ mc = makeXonoticTabController(me.rows - 3);
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, _("User"), makeXonoticUserSettingsTab()));
- me.TD(me, 1, 1, mc.makeTabButton(mc, _("Misc"), makeXonoticMiscSettingsTab()));
+ me.TD(me, 1, 2, mc.makeTabButton(mc, _("Video"), makeXonoticVideoSettingsTab()));
+ me.TD(me, 1, 2, mc.makeTabButton(mc, _("Effects"), makeXonoticEffectsSettingsTab()));
+ me.TD(me, 1, 2, mc.makeTabButton(mc, _("Audio"), makeXonoticAudioSettingsTab()));
me.TR(me);
+ me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("Game"), makeXonoticGameSettingsTab()));
+ me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("Input"), makeXonoticInputSettingsTab()));
+ me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("User"), makeXonoticUserSettingsTab()));
+ me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("Misc"), makeXonoticMiscSettingsTab()));
me.TR(me);
- me.TD(me, me.rows - 2, me.columns, mc);
+ me.TR(me);
+ me.TD(me, me.rows - 3, me.columns, mc);
}
#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticGameSettingsTab) EXTENDS(XonoticTab)
+ METHOD(XonoticGameSettingsTab, fill, void(entity))
+ ATTRIB(XonoticGameSettingsTab, title, string, _("Game"))
+ ATTRIB(XonoticGameSettingsTab, intendedWidth, float, 0.9)
+ ATTRIB(XonoticGameSettingsTab, rows, float, 17)
+ ATTRIB(XonoticGameSettingsTab, columns, float, 6)
+ENDCLASS(XonoticGameSettingsTab)
+entity makeXonoticGameSettingsTab();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticGameSettingsTab()
+{
+ entity me;
+ me = spawnXonoticGameSettingsTab();
+ me.configureDialog(me);
+ return me;
+}
+
+void XonoticGameSettingsTab_fill(entity me)
+{
+ entity e;
+
+
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects and harsh language"))); // also set sv_gentle
+
+ me.gotoRC(me, 2, 3); me.setFirstColumn(me, me.currentColumn);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Crosshair"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.crosshairDialog;
+ setDependent(e, "crosshair_enabled", 1, 2);
+ // TODO: show status of crosshair dot and hittest and pickups and such here with text
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("HUD"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.hudDialog;
+ // TODO: show hud config name with text here
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Notification"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.notificationDialog;
+ // TODO: Show all the notification stuff here
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Playermodel"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.modelDialog;
+ // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("View"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.viewDialog;
+ // TODO: show fov and other settings with text here
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Weapon"), '0 0 0'));
+ e.onClick = DialogOpenButton_Click;
+ e.onClickEntity = main.weaponsDialog;
+ // I don't really think this is useful as is, and especially it doesn't look very clean...
+ // In the future, if ALL of these buttons had some information, then it would be justified/clean
+ //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null));
+ // e0.textEntity = main.weaponsDialog;
+ // e0.allowCut = 1;
+
+ //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\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
+
+
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle; sendcvar cl_allow_uidtracking; sendcvar cl_allow_uid2name;", COMMANDBUTTON_APPLY));
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticCrosshairDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticCrosshairDialog, toString, string(entity))
+ METHOD(XonoticCrosshairDialog, fill, void(entity))
+ METHOD(XonoticCrosshairDialog, showNotify, void(entity))
+ ATTRIB(XonoticCrosshairDialog, title, string, _("Crosshair settings"))
+ ATTRIB(XonoticCrosshairDialog, color, vector, SKINCOLOR_DIALOG_CROSSHAIR)
+ ATTRIB(XonoticCrosshairDialog, intendedWidth, float, 0.5)
+ ATTRIB(XonoticCrosshairDialog, rows, float, 18)
+ ATTRIB(XonoticCrosshairDialog, columns, float, 3)
+ENDCLASS(XonoticCrosshairDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticCrosshairDialog_showNotify(entity me)
+{
+ loadAllCvars(me);
+}
+string XonoticCrosshairDialog_toString(entity me)
+{
+ return "hi"; // TODO: show status of crosshair dot and hittest and pickups and such here with text
+}
+void XonoticCrosshairDialog_fill(entity me)
+{
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot size:")));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size"));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot alpha:")));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.1, "crosshair_dot_alpha"));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Dot color:")));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "0", _("Use normal crosshair color")));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(1, "crosshair_dot_color_custom", "1", _("Custom")));
+ setDependentAND(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2);
+ me.TD(me, 2, 2, e = makeXonoticColorpickerString("crosshair_dot_color", "crosshair_dot_color"));
+ setDependentAND3(e, "crosshair_dot", 1, 1, "crosshair_enabled", 1, 2, "crosshair_dot_color_custom", 1, 1);
+ me.TR(me);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Crosshair animations:")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_effect_scalefade", _("Smooth effects of crosshairs")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_ring", _("Use rings to indicate weapon status")));
+ makeMulti(e, "crosshair_ring_reload");
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Hit testing:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("crosshair_hittest"));
+ e.addValue(e, ZCTX(_("HTTST^Disabled")), "0");
+ e.addValue(e, ZCTX(_("HTTST^TrueAim")), "1");
+ e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25");
+ e.configureXonoticTextSliderValues(e);
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "crosshair_hittest_blur", _("Blur crosshair if the shot is obstructed")));
+ setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.5, 0, "crosshair_hitindication", _("Animate when hitting an enemy")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 0, "crosshair_pickup", _("Animate when picking up an item")));
+ setDependent(e, "crosshair_enabled", 1, 2);
+
+ me.TR(me);
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticHUDDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticHUDDialog, toString, string(entity))
+ METHOD(XonoticHUDDialog, fill, void(entity))
+ METHOD(XonoticHUDDialog, showNotify, void(entity))
+ ATTRIB(XonoticHUDDialog, title, string, _("HUD settings"))
+ ATTRIB(XonoticHUDDialog, color, vector, SKINCOLOR_DIALOG_HUD)
+ ATTRIB(XonoticHUDDialog, intendedWidth, float, 0.5)
+ ATTRIB(XonoticHUDDialog, rows, float, 18)
+ ATTRIB(XonoticHUDDialog, columns, float, 3)
+ENDCLASS(XonoticHUDDialog)
+void HUDSetup_Start(entity me, entity btn);
+#endif
+
+#ifdef IMPLEMENTATION
+void HUDSetup_Check_Gamestatus(entity me, entity btn)
+{
+ if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) // we're not in a match, ask the player if they want to start one anyway
+ {
+ DialogOpenButton_Click(me, main.hudconfirmDialog);
+ }
+ else // already in a match, lets just cut to the point and open up the hud editor directly
+ {
+ HUDSetup_Start(me, btn);
+ }
+}
+void XonoticHUDDialog_showNotify(entity me)
+{
+ loadAllCvars(me);
+}
+string XonoticHUDDialog_toString(entity me)
+{
+ return "hi"; // TODO: show hud config name with text here
+}
+void XonoticHUDDialog_fill(entity me)
+{
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Damage:")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Overlay:")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.05, "hud_damage"));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Factor:")));
+ setDependent(e, "hud_damage", 0.001, 100);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.025, 0.1, 0.025, "hud_damage_factor"));
+ setDependent(e, "hud_damage", 0.001, 100);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Fade rate:")));
+ setDependent(e, "hud_damage", 0.001, 100);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.25, 1, 0.05, "hud_damage_fade_rate"));
+ setDependent(e, "hud_damage", 0.001, 100);
+ me.TR(me);
+
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Waypoints")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Scale:")));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "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, _("Alpha:")));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "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, _("Edge offset:")));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.3, 0.01, "g_waypointsprite_edgeoffset_bottom"));
+ makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right");
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TR(me);
+
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(25, 0, "hud_shownames_crosshairdistance", _("Only when near crosshair")));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "hud_shownames_status", _("Display health and armor")));
+ me.TR(me);
+ me.TR(me);
+ me.TDempty(me, 0.5);
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
+ e.onClick = HUDSetup_Check_Gamestatus;
+ e.onClickEntity = me;
+ // TODO: show hud config name with text here
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
\ No newline at end of file
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticHUDConfirmDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticHUDConfirmDialog, fill, void(entity))
+ ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor"))
+ ATTRIB(XonoticHUDConfirmDialog, color, vector, SKINCOLOR_DIALOG_HUDCONFIRM)
+ ATTRIB(XonoticHUDConfirmDialog, intendedWidth, float, 0.5)
+ ATTRIB(XonoticHUDConfirmDialog, rows, float, 4)
+ ATTRIB(XonoticHUDConfirmDialog, columns, float, 2)
+ENDCLASS(XonoticHUDConfirmDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void HUDSetup_Start(entity me, entity btn)
+{
+ if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
+ localcmd("map hudsetup/hudsetup", "\n");
+ else
+ localcmd("togglemenu 0\n");
+
+ localcmd("_hud_configure 1", "\n");
+}
+
+void XonoticHUDConfirmDialog_fill(entity me)
+{
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("In order for the HUD editor to show, you must first be in game.")));
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Do you wish to start a local game to set up the HUD?")));
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^Yes")), '1 0 0'));
+ e.onClick = HUDSetup_Start;
+ e.onClickEntity = me;
+ me.TD(me, 1, 1, e = makeXonoticButton(ZCTX(_("HDCNFRM^No")), '0 1 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticModelDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticModelDialog, toString, string(entity))
+ METHOD(XonoticModelDialog, fill, void(entity))
+ METHOD(XonoticModelDialog, showNotify, void(entity))
+ ATTRIB(XonoticModelDialog, title, string, _("Model settings"))
+ ATTRIB(XonoticModelDialog, color, vector, SKINCOLOR_DIALOG_MODEL)
+ ATTRIB(XonoticModelDialog, intendedWidth, float, 0.5)
+ ATTRIB(XonoticModelDialog, rows, float, 7)
+ ATTRIB(XonoticModelDialog, columns, float, 3)
+ENDCLASS(XonoticModelDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticModelDialog_showNotify(entity me)
+{
+ loadAllCvars(me);
+}
+string XonoticModelDialog_toString(entity me)
+{
+ return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
+}
+void XonoticModelDialog_fill(entity me)
+{
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow"));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs"));
+ e.addValue(e, ZCTX(_("GIBS^None")), "1");
+ e.addValue(e, ZCTX(_("GIBS^Few")), "0.75");
+ e.addValue(e, ZCTX(_("GIBS^Many")), "0.5");
+ e.addValue(e, ZCTX(_("GIBS^Lots")), "0");
+ e.configureXonoticTextSliderValues(e);
+ setDependent(e, "cl_gentle", 0, 0);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayermodels", _("Force player models to mine")));
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine")));
+ me.TR(me);
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticNotificationDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticNotificationDialog, toString, string(entity))
+ METHOD(XonoticNotificationDialog, fill, void(entity))
+ METHOD(XonoticNotificationDialog, showNotify, void(entity))
+ ATTRIB(XonoticNotificationDialog, title, string, _("Notification settings"))
+ ATTRIB(XonoticNotificationDialog, color, vector, SKINCOLOR_DIALOG_MODEL)
+ ATTRIB(XonoticNotificationDialog, intendedWidth, float, 0.6)
+ ATTRIB(XonoticNotificationDialog, rows, float, 19)
+ ATTRIB(XonoticNotificationDialog, columns, float, 3)
+ENDCLASS(XonoticNotificationDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticNotificationDialog_showNotify(entity me)
+{
+ loadAllCvars(me);
+}
+string XonoticNotificationDialog_toString(entity me)
+{
+ return "hi"; // TODO: show csqc model settings like forcemyplayer and deglowing/ghosting bodies with text here
+}
+void XonoticNotificationDialog_fill(entity me)
+{
+ entity e;
+
+ // General settings for the player
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("General Settings:")));
+
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_allow_chatboxprint", _("Print all notifications into the chatbox")));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Notice connecting players:")));
+ me.TR(me);
+ me.TDempty(me, 0.3);
+ me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_INFO_QUIT_DISCONNECT"));
+ //makeMulti(me, "notification_INFO_QUIT_KICK_IDLING notification_INFO_QUIT_KICK_SPECTATING notification_INFO_JOIN_PLAY notification_INFO_JOIN_CONNECT_TEAM_BLUE notification_INFO_JOIN_CONNECT_TEAM_PINK notification_INFO_JOIN_CONNECT_TEAM_RED notification_INFO_JOIN_CONNECT_TEAM_YELLOW");
+ e.addValue(e, ZCTX(_("off")), "0");
+ e.addValue(e, ZCTX(_("only console")), "1");
+ e.addValue(e, ZCTX(_("console & chat")), "2");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_ITEM_WEAPON_DONTHAVE", _("Item notifications")));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_CENTER_POWERUP_INVISIBILITY", _("Powerup notifications")));
+ //makeMulti(e, "notification_CENTER_POWERUP_SHIELD notification_CENTER_POWERUP_SPEED notification_CENTER_POWERUP_STRENGTH notification_CENTER_POWERDOWN_INVISIBILITY notification_CENTER_POWERDOWN_SHIELD notification_CENTER_POWERDOWN_SPEED notification_CENTER_POWERDOWN_STRENGTH notification_CENTER_SUPERWEAPON_BROKEN notification_CENTER_SUPERWEAPON_LOST notification_CENTER_SUPERWEAPON_PICKUP");
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_frag_verbose", _("Additional information on frags")));
+ me.TR(me);
+ me.TR(me);
+
+ // Gamemode specific notifications
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Gamemode notifications:")));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_CENTER_ARENA_BEGIN", _("Centerprint for gamemode notifications")));
+ //makeMulti(me, "notification_CENTER_ARENA_NEEDPLAYER notification_CENTER_ARENA_ROUNDSTART notification_CENTER_ASSAULT_ATTACKING notification_CENTER_ASSAULT_DEFENDING notification_CENTER_CTF_PICKUP_BLUE notification_CENTER_CTF_PICKUP_ENEMY notification_CENTER_CTF_PICKUP_RED notification_CENTER_CTF_PICKUP_TEAM notification_CENTER_FREEZETAG_FREEZE notification_CENTER_FREEZETAG_FROZEN notification_CENTER_FREEZETAG_REVIVE notification_CENTER_FREEZETAG_REVIVED notification_CENTER_FREEZETAG_ROUND_WIN_BLUE notification_CENTER_FREEZETAG_ROUND_WIN_PINK notification_CENTER_FREEZETAG_ROUND_WIN_RED notification_CENTER_FREEZETAG_ROUND_WIN_YELLOW notification_CENTER_FREEZETAG_SELF notification_CENTER_FREEZETAG_SPAWN_LATE notification_CENTER_KEEPAWAY_DROPPED notification_CENTER_KEEPAWAY_PICKUP notification_CENTER_KEEPAWAY_WARN notification_CENTER_KEYHUNT_HELP notification_CENTER_KEYHUNT_INTERFERE_BLUE notification_CENTER_KEYHUNT_INTERFERE_PINK notification_CENTER_KEYHUNT_INTERFERE_RED notification_CENTER_KEYHUNT_INTERFERE_YELLOW notification_CENTER_KEYHUNT_MEET notification_CENTER_KEYHUNT_SCAN notification_CENTER_KEYHUNT_START_BLUE notification_CENTER_KEYHUNT_START_PINK notification_CENTER_KEYHUNT_START_RED notification_CENTER_KEYHUNT_START_YELLOW notification_CENTER_KEYHUNT_WAIT notification_CENTER_LMS_CAMPCHECK");
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "notification_ctf_capture_verbose", _("Additional information on flag captures")));
+ me.TR(me);
+
+ // Information on killingsprees
+ me.TR(me);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Information on killingsprees:")));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees", _("Print information on sprees")));
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Show spree information:")));
+ me.TR(me);
+ me.TDempty(me, 0.3);
+ me.TD(me, 1, 3, e = makeXonoticTextSlider("notification_show_sprees_info"));
+ e.addValue(e, ZCTX(_("off")), "0");
+ e.addValue(e, ZCTX(_("target")), "1");
+ e.addValue(e, ZCTX(_("attacker")), "2");
+ e.addValue(e, ZCTX(_("target & attacker")), "3");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "notification_show_sprees_info_newline", _("Print spree information in a new line")));
+
+ // Close this dialog
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
\ No newline at end of file
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticViewDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticViewDialog, toString, string(entity))
+ METHOD(XonoticViewDialog, fill, void(entity))
+ METHOD(XonoticViewDialog, showNotify, void(entity))
+ ATTRIB(XonoticViewDialog, title, string, _("View settings"))
+ ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW)
+ ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9)
+ ATTRIB(XonoticViewDialog, rows, float, 11)
+ ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space
+ENDCLASS(XonoticViewDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticViewDialog_showNotify(entity me)
+{
+ loadAllCvars(me);
+}
+string XonoticViewDialog_toString(entity me)
+{
+ return "hi"; // TODO: show fov and other settings with text here
+}
+void XonoticViewDialog_fill(entity me)
+{
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
+ me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov"));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_reticle"));
+ e.addValue(e, ZCTX(_("RETICLE^Fullscreen")), "0");
+ e.addValue(e, ZCTX(_("RETICLE^With reticle")), "1");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Factor:"))));
+ me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Speed:"))));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed"));
+ e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense.
+ e.addValue(e, "2", "2");
+ e.addValue(e, "3", "3");
+ e.addValue(e, "4", "4");
+ e.addValue(e, "5", "5");
+ e.addValue(e, "6", "6");
+ e.addValue(e, "7", "7");
+ e.addValue(e, "8", "8");
+ e.addValue(e, ZCTX(_("ZOOM^Instant")), "-1");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Sensitivity:"))));
+ me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity"));
+ me.TR(me);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Velocity zoom:")));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_velocityzoom_type"));
+ e.addValue(e, ZCTX(_("VZOOM^Disabled")), "0");
+ e.addValue(e, ZCTX(_("VZOOM^Forward only")), "2");
+ e.addValue(e, ZCTX(_("VZOOM^All directions")), "1");
+ e.configureXonoticTextSliderValues(e);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Speed"))));
+ me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.2, "cl_velocityzoom"));
+ setDependent(e, "cl_velocityzoom_type", 1, 3);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
+
+ me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
+ makeMulti(e, "crosshair_hittest_showimpact");
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump")));
+ setDependent(e, "chase_active", -1, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching")));
+ setDependent(e, "chase_active", -1, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(1, 0, "v_idlescale", _("View waving while idle")));
+ setDependent(e, "chase_active", -1, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.01, 0, "cl_bob", _("View bobbing while walking around")));
+ makeMulti(e, "cl_bob2");
+ setDependent(e, "chase_active", -1, 0);
+ me.TR(me);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
+ makeMulti(e, "crosshair_hittest_showimpact");
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance")));
+ setDependent(e, "chase_active", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back"));
+ setDependent(e, "chase_active", 1, 1);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance")));
+ setDependent(e, "chase_active", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
+ setDependent(e, "chase_active", 1, 1);
+ me.TR(me);
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticWeaponsDialog) EXTENDS(XonoticDialog)
+ METHOD(XonoticWeaponsDialog, toString, string(entity))
+ METHOD(XonoticWeaponsDialog, fill, void(entity))
+ METHOD(XonoticWeaponsDialog, showNotify, void(entity))
+ ATTRIB(XonoticWeaponsDialog, title, string, _("Weapon settings"))
+ ATTRIB(XonoticWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
+ ATTRIB(XonoticWeaponsDialog, intendedWidth, float, 0.7)
+ ATTRIB(XonoticWeaponsDialog, rows, float, 12)
+ ATTRIB(XonoticWeaponsDialog, columns, float, 5.2)
+ ATTRIB(XonoticWeaponsDialog, weaponsList, entity, NULL)
+ENDCLASS(XonoticWeaponsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticWeaponsDialog_showNotify(entity me)
+{
+ loadAllCvars(me);
+}
+string XonoticWeaponsDialog_toString(entity me)
+{
+ return me.weaponsList.toString(me.weaponsList);
+}
+void XonoticWeaponsDialog_fill(entity me)
+{
+ entity e;
+
+ me.TR(me);
+ me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon priority list:")));
+ me.TR(me);
+ me.TD(me, 8, 2, e = me.weaponsList = makeXonoticWeaponsList());
+ me.gotoRC(me, 9, 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'));
+ e.onClick = WeaponsList_MoveDown_Click;
+ e.onClickEntity = me.weaponsList;
+
+ me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn);
+ 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.TR(me);
+ me.TR(me);
+ 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, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align")));
+ setDependent(e, "r_drawviewmodel", 1, 1);
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center")));
+ setDependent(e, "r_drawviewmodel", 1, 1);
+ me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align")));
+ setDependent(e, "r_drawviewmodel", 1, 1);
+ me.TR(me);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_followmodel", _("Gun model swaying")));
+ makeMulti(e, "cl_leanmodel");
+ setDependent(e, "r_drawviewmodel", 1, 1);
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_bobmodel", _("Gun model bobbing")));
+ setDependent(e, "r_drawviewmodel", 1, 1);
+ //me.TR(me);
+ //me.TR(me);
+ // me.TDempty(me, 0.2);
+ // me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VWMDL^Scale"))));
+ // setDependent(e, "r_drawviewmodel", 1, 1);
+ // me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 2, 0.1, "cl_viewmodel_scale"));
+ // setDependent(e, "r_drawviewmodel", 1, 1);
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
ATTRIB(MainWindow, winnerDialog, entity, NULL)
ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
ATTRIB(MainWindow, cvarsDialog, entity, NULL)
+ ATTRIB(MainWindow, screenshotViewerDialog, entity, NULL)
ATTRIB(MainWindow, viewDialog, entity, NULL)
ATTRIB(MainWindow, modelDialog, entity, NULL)
ATTRIB(MainWindow, crosshairDialog, entity, NULL)
ATTRIB(MainWindow, mainNexposee, entity, NULL)
ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
ATTRIB(MainWindow, dialogToShow, entity, NULL)
+ ATTRIB(MainWindow, notificationDialog, entity, NULL)
ENDCLASS(MainWindow)
#endif
i = spawnXonoticHUDInfoMessagesDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
+
i = spawnXonoticHUDPhysicsDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+ me.screenshotViewerDialog = i = spawnXonoticScreenshotViewerDialog();
+ i.configureDialog(i);
+ me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
i = spawnXonoticHUDCenterprintDialog();
i.configureDialog(i);
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+ me.notificationDialog = i = spawnXonoticNotificationDialog();
+ i.configureDialog(i);
+ me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
// mutator dialogs
i = spawnXonoticSandboxToolsDialog();
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticScreenshotImage) EXTENDS(XonoticImage)
+ METHOD(XonoticScreenshotImage, configureXonoticScreenshotImage, void(entity))
+ METHOD(XonoticScreenshotImage, load, void(entity, string))
+ METHOD(XonoticScreenshotImage, draw, void(entity))
+ ATTRIB(XonoticScreenshotImage, focusable, float, 1) // mousePress and mouseDrag work only if focusable is set
+ METHOD(XonoticScreenshotImage, mousePress, float(entity, vector))
+ METHOD(XonoticScreenshotImage, mouseDrag, float(entity, vector))
+ METHOD(XonoticScreenshotImage, mouseMove, float(entity, vector))
+ METHOD(XonoticScreenshotImage, resizeNotify, void(entity, vector, vector, vector, vector))
+ ATTRIB(XonoticScreenshotImage, realFontSize, vector, '0 0 0')
+ ATTRIB(XonoticScreenshotImage, fontSize, float, SKINFONTSIZE_NORMAL)
+ ATTRIB(XonoticScreenshotImage, showTitle, float, 1)
+ ATTRIB(XonoticScreenshotImage, screenshotTime, float, 0)
+ ATTRIB(XonoticScreenshotImage, screenshotTitle, string, string_null)
+ENDCLASS(XonoticScreenshotImage)
+entity makeXonoticScreenshotImage();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticScreenshotImage()
+{
+ entity me;
+ me = spawnXonoticScreenshotImage();
+ me.configureXonoticScreenshotImage(me);
+ return me;
+}
+
+void XonoticScreenshotImage_configureXonoticScreenshotImage(entity me)
+{
+ me.configureXonoticImage(me, string_null, -2);
+ me.zoomLimitedByTheBox = FALSE; // enable this to forbid enlarging the image more than the containing box (if making use of draw_SetClip is a too bad thing)
+ me.zoomSnapToTheBox = FALSE; // disabled: it's cooler
+}
+
+void XonoticScreenshotImage_load(entity me, string theImage)
+{
+ me.screenshotTime = time;
+ me.src = theImage;
+ if (me.screenshotTitle)
+ strunzone(me.screenshotTitle);
+ me.screenshotTitle = strzone(substring(me.src, 13, strlen(theImage) - 13)); //strip "/screenshots/"
+
+ me.initZoom(me); // this image may have a different size
+ me.setZoom(me, 0, 0);
+}
+
+float XonoticScreenshotImage_mousePress(entity me, vector coords)
+{
+ return me.drag_setStartPos(me, coords);
+}
+
+float XonoticScreenshotImage_mouseDrag(entity me, vector coords)
+{
+ return me.drag(me, coords);
+}
+
+float XonoticScreenshotImage_mouseMove(entity me, vector coords)
+{
+ return me.drag_setStartPos(me, coords);
+}
+
+void XonoticScreenshotImage_draw(entity me)
+{
+ if (me.src != "")
+ {
+ float theAlpha;
+ SUPER(XonoticScreenshotImage).draw(me);
+ if (me.showTitle && time < me.screenshotTime + 4) // 3 seconds at full alpha, 1 second fading out
+ {
+ theAlpha = (4 - (time - me.screenshotTime));
+ draw_CenterText('0.5 0 0', me.screenshotTitle, me.realFontSize, '1 1 1', theAlpha, FALSE);
+ }
+ if (time < me.zoomTime + 2) // 1 seconds at full alpha, 1 second fading out
+ {
+ string zoomString;
+ float z;
+ z = me.zoomFactor * 100;
+ if (z - floor(z) == 0)
+ zoomString = sprintf("%d%%", z);
+ else
+ zoomString = sprintf("%.2f%%", z);
+ theAlpha = (2 - (time - me.zoomTime));
+ draw_Text('0.05 0.95 0', zoomString, me.realFontSize, '1 1 1', theAlpha, FALSE);
+ }
+ }
+}
+
+void XonoticScreenshotImage_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+ SUPER(XonoticScreenshotImage).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
+ me.realFontSize_y = me.fontSize / absSize_y;
+ me.realFontSize_x = me.fontSize / absSize_x;
+}
+#endif
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticScreenshotList) EXTENDS(XonoticListBox)
+ METHOD(XonoticScreenshotList, configureXonoticScreenshotList, void(entity))
+ ATTRIB(XonoticScreenshotList, rowsPerItem, float, 1)
+ METHOD(XonoticScreenshotList, resizeNotify, void(entity, vector, vector, vector, vector))
+ METHOD(XonoticScreenshotList, setSelected, void(entity, float))
+ METHOD(XonoticScreenshotList, draw, void(entity))
+ METHOD(XonoticScreenshotList, drawListBoxItem, void(entity, float, vector, float))
+ METHOD(XonoticScreenshotList, getScreenshots, void(entity))
+ METHOD(XonoticScreenshotList, previewScreenshot, void(entity))
+ METHOD(XonoticScreenshotList, startScreenshot, void(entity))
+ METHOD(XonoticScreenshotList, screenshotName, string(entity, float))
+ METHOD(XonoticScreenshotList, clickListBoxItem, void(entity, float, vector))
+ METHOD(XonoticScreenshotList, keyDown, float(entity, float, float, float))
+ METHOD(XonoticScreenshotList, destroy, void(entity))
+ METHOD(XonoticScreenshotList, showNotify, void(entity))
+ ATTRIB(XonoticScreenshotList, listScreenshot, float, -1)
+ ATTRIB(XonoticScreenshotList, realFontSize, vector, '0 0 0')
+ ATTRIB(XonoticScreenshotList, columnNameOrigin, float, 0)
+ ATTRIB(XonoticScreenshotList, columnNameSize, float, 0)
+ ATTRIB(XonoticScreenshotList, realUpperMargin, float, 0)
+ ATTRIB(XonoticScreenshotList, origin, vector, '0 0 0')
+ ATTRIB(XonoticScreenshotList, itemAbsSize, vector, '0 0 0')
+ ATTRIB(XonoticScreenshotList, lastClickedScreenshot, float, -1)
+ ATTRIB(XonoticScreenshotList, lastClickedTime, float, 0)
+ ATTRIB(XonoticScreenshotList, filterString, string, string_null)
+ ATTRIB(XonoticScreenshotList, filterBox, entity, NULL)
+ ATTRIB(XonoticScreenshotList, filterTime, float, 0)
+
+ ATTRIB(XonoticScreenshotList, newScreenshotTime, float, 0)
+ ATTRIB(XonoticScreenshotList, newSlideShowScreenshotTime, float, 0)
+ ATTRIB(XonoticScreenshotList, prevSelectedItem, float, 0)
+
+ ATTRIB(XonoticScreenshotList, screenshotBrowserDialog, entity, NULL)
+ ATTRIB(XonoticScreenshotList, screenshotPreview, entity, NULL)
+ ATTRIB(XonoticScreenshotList, screenshotViewerDialog, entity, NULL)
+ METHOD(XonoticScreenshotList, goScreenshot, void(entity, float))
+ METHOD(XonoticScreenshotList, startSlideShow, void(entity))
+ METHOD(XonoticScreenshotList, stopSlideShow, void(entity))
+ENDCLASS(XonoticScreenshotList)
+
+entity makeXonoticScreenshotList();
+void StartScreenshot_Click(entity btn, entity me);
+void ScreenshotList_Refresh_Click(entity btn, entity me);
+void ScreenshotList_Filter_Would_Change(entity box, entity me);
+void ScreenshotList_Filter_Change(entity box, entity me);
+#endif
+
+#ifdef IMPLEMENTATION
+
+entity makeXonoticScreenshotList()
+{
+ entity me;
+ me = spawnXonoticScreenshotList();
+ me.configureXonoticScreenshotList(me);
+ return me;
+}
+
+void XonoticScreenshotList_configureXonoticScreenshotList(entity me)
+{
+ me.configureXonoticListBox(me);
+ me.getScreenshots(me);
+}
+
+string XonoticScreenshotList_screenshotName(entity me, float i )
+{
+ string s;
+ s = bufstr_get(me.listScreenshot, i);
+ s = substring(s, 12, strlen(s) - 12 - 4); // screenshots/, .<ext>
+ return s;
+}
+
+// if subdir is TRUE look in subdirectories too (1 level)
+void getScreenshots_for_ext(entity me, string ext, float subdir)
+{
+ string s;
+ if (subdir)
+ s="screenshots/*/";
+ else
+ s="screenshots/";
+ if(me.filterString)
+ s=strcat(s, me.filterString, ext);
+ else
+ s=strcat(s, "*", ext);
+
+ float list, i, n;
+ list = search_begin(s, FALSE, TRUE);
+ if(list >= 0)
+ {
+ n = search_getsize(list);
+ for(i = 0; i < n; ++i)
+ bufstr_add(me.listScreenshot, search_getfilename(list, i), TRUE);
+ search_end(list);
+ }
+
+ if (subdir)
+ getScreenshots_for_ext(me, ext, FALSE);
+}
+
+void XonoticScreenshotList_getScreenshots(entity me)
+{
+ if (me.listScreenshot >= 0)
+ buf_del(me.listScreenshot);
+ me.listScreenshot = buf_create();
+ if (me.listScreenshot < 0)
+ {
+ me.nItems = 0;
+ return;
+ }
+ getScreenshots_for_ext(me, ".jpg", TRUE);
+ getScreenshots_for_ext(me, ".tga", TRUE);
+ getScreenshots_for_ext(me, ".png", TRUE);
+ me.nItems = buf_getsize(me.listScreenshot);
+ if(me.nItems > 0)
+ buf_sort(me.listScreenshot, 128, FALSE);
+}
+
+void XonoticScreenshotList_destroy(entity me)
+{
+ if(me.nItems > 0)
+ buf_del(me.listScreenshot);
+}
+
+void XonoticScreenshotList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
+{
+ me.itemAbsSize = '0 0 0';
+ SUPER(XonoticScreenshotList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
+
+ me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
+ me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
+ me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
+
+ me.columnNameOrigin = me.realFontSize_x;
+ me.columnNameSize = 1 - 2 * me.realFontSize_x;
+}
+
+void XonoticScreenshotList_setSelected(entity me, float i)
+{
+ if (me.newSlideShowScreenshotTime)
+ me.startSlideShow(me);
+ me.prevSelectedItem = me.selectedItem;
+ SUPER(XonoticScreenshotList).setSelected(me, i);
+ if (me.pressed && me.selectedItem != me.prevSelectedItem)
+ {
+ // while dragging the scrollbar (or an item)
+ // for a smooth mouse movement do not load immediately the new selected images
+ me.newScreenshotTime = time + 0.22; // dragging an item we need a delay > 0.2 (from listbox: me.dragScrollTimer = time + 0.2;)
+ }
+ else if (time > me.newScreenshotTime)
+ {
+ me.newScreenshotTime = 0;
+ me.previewScreenshot(me); // load the preview on selection change
+ }
+}
+
+void XonoticScreenshotList_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 = me.screenshotName(me,i);
+ s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
+ draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+}
+
+void XonoticScreenshotList_showNotify(entity me)
+{
+ me.getScreenshots(me);
+ me.previewScreenshot(me);
+}
+
+void ScreenshotList_Refresh_Click(entity btn, entity me)
+{
+ me.getScreenshots(me);
+ me.setSelected(me, 0); //always select the first element after a list update
+}
+
+void ScreenshotList_Filter_Change(entity box, entity me)
+{
+ if(me.filterString)
+ strunzone(me.filterString);
+
+ if(box.text != "")
+ {
+ if (strstrofs(box.text, "*", 0) >= 0 || strstrofs(box.text, "?", 0) >= 0)
+ me.filterString = strzone(box.text);
+ else
+ me.filterString = strzone(strcat("*", box.text, "*"));
+ }
+ else
+ me.filterString = string_null;
+
+ ScreenshotList_Refresh_Click(world, me);
+}
+
+void ScreenshotList_Filter_Would_Change(entity box, entity me)
+{
+ me.filterBox = box;
+ me.filterTime = time + 0.5;
+}
+
+void XonoticScreenshotList_draw(entity me)
+{
+ if (me.filterTime && time > me.filterTime)
+ {
+ ScreenshotList_Filter_Change(me.filterBox, me);
+ me.filterTime = 0;
+ }
+ if (me.newScreenshotTime && time > me.newScreenshotTime)
+ {
+ me.previewScreenshot(me);
+ me.newScreenshotTime = 0;
+ }
+ else if (me.newSlideShowScreenshotTime && time > me.newSlideShowScreenshotTime)
+ {
+ if (me.selectedItem == me.nItems - 1) //last screenshot?
+ {
+ // restart from the first screenshot
+ me.setSelected(me, 0);
+ me.goScreenshot(me, +0);
+ }
+ else
+ me.goScreenshot(me, +1);
+ }
+ SUPER(XonoticScreenshotList).draw(me);
+}
+
+void XonoticScreenshotList_startSlideShow(entity me)
+{
+ me.newSlideShowScreenshotTime = time + 3;
+}
+
+void XonoticScreenshotList_stopSlideShow(entity me)
+{
+ me.newSlideShowScreenshotTime = 0;
+}
+
+void XonoticScreenshotList_goScreenshot(entity me, float d)
+{
+ if(!me.screenshotViewerDialog)
+ return;
+ me.setSelected(me, me.selectedItem + d);
+ me.screenshotViewerDialog.loadScreenshot(me.screenshotViewerDialog, strcat("/screenshots/", me.screenshotName(me,me.selectedItem)));
+}
+
+void XonoticScreenshotList_startScreenshot(entity me)
+{
+ me.screenshotViewerDialog.loadScreenshot(me.screenshotViewerDialog, strcat("/screenshots/", me.screenshotName(me,me.selectedItem)));
+ // pop up screenshot
+ DialogOpenButton_Click_withCoords(NULL, me.screenshotViewerDialog, me.origin + eX * (me.columnNameOrigin * me.size_x) + eY * ((me.itemHeight * me.selectedItem - me.scrollPos) * me.size_y), eY * me.itemAbsSize_y + eX * (me.itemAbsSize_x * me.columnNameSize));
+}
+
+void XonoticScreenshotList_previewScreenshot(entity me)
+{
+ if(!me.screenshotBrowserDialog)
+ return;
+ if (me.nItems <= 0)
+ me.screenshotBrowserDialog.loadPreviewScreenshot(me.screenshotBrowserDialog, "");
+ else
+ me.screenshotBrowserDialog.loadPreviewScreenshot(me.screenshotBrowserDialog, strcat("/screenshots/", me.screenshotName(me,me.selectedItem)));
+}
+
+void StartScreenshot_Click(entity btn, entity me)
+{
+ me.startScreenshot(me);
+}
+
+void XonoticScreenshotList_clickListBoxItem(entity me, float i, vector where)
+{
+ if(i == me.lastClickedScreenshot)
+ if(time < me.lastClickedTime + 0.3)
+ {
+ // DOUBLE CLICK!
+ // pop up screenshot
+ me.setSelected(me, i);
+ me.startScreenshot(me);
+ }
+ me.lastClickedScreenshot = i;
+ me.lastClickedTime = time;
+}
+
+float XonoticScreenshotList_keyDown(entity me, float scan, float ascii, float shift)
+{
+ if(scan == K_ENTER || scan == K_KP_ENTER) {
+ me.startScreenshot(me);
+ return 1;
+ }
+ if(scan == K_MWHEELUP || scan == K_MWHEELDOWN)
+ me.newScreenshotTime = time + 0.2;
+ return SUPER(XonoticScreenshotList).keyDown(me, scan, ascii, shift);
+}
+#endif
float autocvar_g_balance_crylink_primary_joinexplode_force;
float autocvar_g_balance_crylink_primary_joinexplode_radius;
float autocvar_g_balance_crylink_primary_joinspread;
-float autocvar_g_balance_crylink_primary_jointime;
float autocvar_g_balance_crylink_primary_linkexplode;
float autocvar_g_balance_crylink_primary_middle_fadetime;
float autocvar_g_balance_crylink_primary_middle_lifetime;
float autocvar_g_balance_crylink_secondary_joinexplode_force;
float autocvar_g_balance_crylink_secondary_joinexplode_radius;
float autocvar_g_balance_crylink_secondary_joinspread;
-float autocvar_g_balance_crylink_secondary_jointime;
float autocvar_g_balance_crylink_secondary_line_fadetime;
float autocvar_g_balance_crylink_secondary_line_lifetime;
float autocvar_g_balance_crylink_secondary_linkexplode;
string autocvar_g_forced_team_yellow;
float autocvar_g_freezetag_frozen_force;
float autocvar_g_freezetag_frozen_maxtime;
+float autocvar_g_freezetag_revive_falldamage;
+float autocvar_g_freezetag_revive_falldamage_health;
float autocvar_g_freezetag_point_leadlimit;
float autocvar_g_freezetag_point_limit;
float autocvar_g_freezetag_revive_extra_size;
#define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit")
float autocvar_g_keyhunt_teams;
float autocvar_g_keyhunt_teams_override;
-float autocvar_g_lms_campcheck_damage;
-float autocvar_g_lms_campcheck_distance;
float autocvar_g_lms_extra_lives;
-float autocvar_g_lms_campcheck_interval;
float autocvar_g_lms_join_anytime;
float autocvar_g_lms_last_join;
#define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
float autocvar_g_maxplayers_spectator_blocktime;
float autocvar_g_maxpushtime;
float autocvar_g_maxspeed;
-#define autocvar_g_midair cvar("g_midair")
float autocvar_g_midair_shieldtime;
#define autocvar_g_minstagib cvar("g_minstagib")
float autocvar_g_minstagib_ammo_drop;
float autocvar_sv_dodging_delay;
float autocvar_sv_dodging_height_threshold;
float autocvar_sv_dodging_horiz_speed;
+float autocvar_sv_dodging_horiz_speed_frozen;
float autocvar_sv_dodging_ramp_time;
float autocvar_sv_dodging_sound;
float autocvar_sv_dodging_up_speed;
float autocvar_sv_dodging_wall_distance_threshold;
float autocvar_sv_dodging_wall_dodging;
+float autocvar_sv_dodging_frozen;
float autocvar_sv_doublejump;
float autocvar_sv_eventlog;
float autocvar_sv_eventlog_console;
float autocvar_g_touchexplode_damage;
float autocvar_g_touchexplode_edgedamage;
float autocvar_g_touchexplode_force;
+#define autocvar_g_bloodloss cvar("g_bloodloss")
+float autocvar_g_random_gravity_negative_chance;
+float autocvar_g_random_gravity_min;
+float autocvar_g_random_gravity_max;
+float autocvar_g_random_gravity_positive;
+float autocvar_g_random_gravity_negative;
+float autocvar_g_random_gravity_delay;
+float autocvar_g_nades;
+float autocvar_g_nades_spawn;
+float autocvar_g_nades_nade_lifetime;
+float autocvar_g_nades_nade_minforce;
+float autocvar_g_nades_nade_maxforce;
+float autocvar_g_nades_nade_health;
+float autocvar_g_nades_nade_refire;
+float autocvar_g_nades_nade_damage;
+float autocvar_g_nades_nade_edgedamage;
+float autocvar_g_nades_nade_radius;
+float autocvar_g_nades_nade_force;
+float autocvar_g_nades_nade_newton_style;
+float autocvar_g_campcheck_damage;
+float autocvar_g_campcheck_distance;
+float autocvar_g_campcheck_interval;
+float autocvar_g_jump_grunt;
float maxspeed;
vector gco, gno;
- if(autocvar_g_midair)
- return;
-
// Don't jump when attacking
if(self.aistatus & AI_STATUS_ATTACKING)
return;
break;
}
}
- if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((gamestart_sv_cheats < 2) ? 100 : 100000), 1024, 256))
+ if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((gamestart_sv_cheats < 2) ? 100 : 100000), 384, 384))
{
sprint(self, "Emergency teleport used random location\n");
self.angles_x = -self.angles_x;
if(autocvar_g_fullbrightplayers)
self.effects = self.effects | EF_FULLBRIGHT;
- // midair gamemode: damage only while in the air
- // if in midair mode, being on ground grants temporary invulnerability
- // (this is so that multishot weapon don't clear the ground flag on the
- // first damage in the frame, leaving the player vulnerable to the
- // remaining hits in the same frame)
- if (self.flags & FL_ONGROUND)
- if (g_midair)
- self.spawnshieldtime = max(self.spawnshieldtime, time + autocvar_g_midair_shieldtime);
-
if (time >= game_starttime)
if (time < self.spawnshieldtime)
self.effects = self.effects | (EF_ADDITIVE | EF_FULLBRIGHT);
float do_crouch = self.BUTTON_CROUCH;
if(self.hook.state)
do_crouch = 0;
- if(self.health <= g_bloodloss)
- do_crouch = 1;
if(self.vehicle)
do_crouch = 0;
if(self.freezetag_frozen)
}
}
- if(self.health <= g_bloodloss && self.deadflag == DEAD_NO)
- {
- if(self.bloodloss_timer < time)
- {
- self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
- self.bloodloss_timer = time + 0.5 + random() * 0.5;
- }
- }
-
FixPlayermodel();
GrapplingHookFrame();
if(frametime)
player_anim();
- if(g_nexball)
- nexball_setstatus();
-
// secret status
secrets_setstatus();
.float wasFlying;
.float spectatorspeed;
-.float multijump_count;
-.float multijump_ready;
-.float prevjumpbutton;
-
/*
=============
PlayerJump
*/
void PlayerJump (void)
{
- if(self.freezetag_frozen)
- return; // no jumping in freezetag when frozen
+ float doublejump = FALSE;
- float mjumpheight;
- float doublejump;
+ player_multijump = doublejump;
+ if(MUTATOR_CALLHOOK(PlayerJump))
+ return;
+
+ doublejump = player_multijump;
- doublejump = FALSE;
+ float mjumpheight;
+
if (autocvar_sv_doublejump)
{
tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
return;
}
- if (autocvar_g_multijump)
- {
- if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair
- self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again
- else
- self.multijump_ready = FALSE;
- }
-
- if(!doublejump && self.multijump_ready && self.multijump_count < autocvar_g_multijump && self.velocity_z > autocvar_g_multijump_speed)
- {
- // doublejump = FALSE; // checked above in the if
- if (autocvar_g_multijump)
- {
- if (autocvar_g_multijump_add == 0) // in this case we make the z velocity == jumpvelocity
- {
- if (self.velocity_z < mjumpheight)
- {
- doublejump = TRUE;
- self.velocity_z = 0;
- }
- }
- else
- doublejump = TRUE;
-
- if(doublejump)
- {
- if(self.movement_x != 0 || self.movement_y != 0) // don't remove all speed if player isnt pressing any movement keys
- {
- float curspeed;
- vector wishvel, wishdir;
-
- curspeed = max(
- vlen(vec2(self.velocity)), // current xy speed
- vlen(vec2(antilag_takebackavgvelocity(self, max(self.lastteleporttime + sys_frametime, time - 0.25), time))) // average xy topspeed over the last 0.25 secs
- );
- makevectors(self.v_angle_y * '0 1 0');
- wishvel = v_forward * self.movement_x + v_right * self.movement_y;
- wishdir = normalize(wishvel);
-
- self.velocity_x = wishdir_x * curspeed; // allow "dodging" at a multijump
- self.velocity_y = wishdir_y * curspeed;
- // keep velocity_z unchanged!
- }
- if (autocvar_g_multijump > 0)
- self.multijump_count += 1;
- }
- }
- self.multijump_ready = FALSE; // require releasing and pressing the jump button again for the next jump
- }
-
if (!doublejump)
if (!(self.flags & FL_ONGROUND))
return;
if (!(self.flags & FL_JUMPRELEASED))
return;
- if(self.health <= g_bloodloss)
- return;
-
// sv_jumpspeedcap_min/sv_jumpspeedcap_max act as baseline
// velocity bounds. Final velocity is bound between (jumpheight *
// min + jumpheight) and (jumpheight * max + jumpheight);
self.flags &~= FL_JUMPRELEASED;
animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
-
- if(g_jump_grunt)
+
+ if(autocvar_g_jump_grunt)
PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND);
self.restart_jump = -1; // restart jump anim next time
}
void CheckPlayerJump()
{
- if(self.flags & FL_ONGROUND)
- {
- if (autocvar_g_multijump > 0)
- self.multijump_count = 0;
- else
- self.multijump_count = -2; // the cvar value for infinite jumps is -1, so this needs to be smaller
- }
-
if (self.BUTTON_JUMP)
PlayerJump ();
else
if (self.waterlevel == WATERLEVEL_SWIMMING)
CheckWaterJump ();
- self.prevjumpbutton = self.BUTTON_JUMP;
}
float racecar_angle(float forward, float down)
void SpawnThrownWeapon (vector org, float w)
{
- if(g_pinata)
- {
- float j;
- for(j = WEP_FIRST; j <= WEP_LAST; ++j)
- {
- if(WEPSET_CONTAINS_EW(self, j))
- if(W_IsWeaponThrowable(j))
- W_ThrowNewWeapon(self, j, FALSE, org, randomvec() * 175 + '0 0 325');
- }
- }
- else
- {
- if(WEPSET_CONTAINS_EW(self, self.weapon))
- if(W_IsWeaponThrowable(self.weapon))
- W_ThrowNewWeapon(self, self.weapon, FALSE, org, randomvec() * 125 + '0 0 200');
- }
+ if(WEPSET_CONTAINS_EW(self, self.weapon))
+ 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)
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
self.dmg_inflictor = inflictor;
- if(g_ca && self != attacker && IS_PLAYER(attacker))
- PlayerTeamScore_Add(attacker, SP_SCORE, ST_SCORE, (damage - excess) * autocvar_g_ca_damage2score_multiplier);
-
float abot, vbot, awep;
abot = (IS_BOT_CLIENT(attacker));
vbot = (IS_BOT_CLIENT(self));
ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
- if (!g_norecoil)
+ if (!autocvar_g_norecoil)
ent.punchangle_x = recoil * -1;
if (snd != "")
complain = 0;
if(complain)
self.hasweapon_complain_spam = time + 0.2;
+
+ if(wpn == WEP_HOOK && !g_grappling_hook && autocvar_g_nades && !WEPSET_CONTAINS_EW(cl, wpn) && !WEPSET_CONTAINS_AW(weaponsInMap, wpn))
+ complain = 0;
if (wpn < WEP_FIRST || wpn > WEP_LAST)
{
// Globals
-float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_midair, g_minstagib, g_pinata, g_norecoil, g_bloodloss;
+float g_cloaked, g_footsteps, g_grappling_hook, g_minstagib;
float g_warmup_limit;
float g_warmup_allguns;
float g_warmup_allow_timeout;
.float spectatee_status;
.float zoomstate;
-.float bloodloss_timer;
.float restriction;
.entity clientdata;
{
attacker.dmg_team = attacker.dmg_team + damage;
complainteamdamage = attacker.dmg_team - autocvar_g_teamdamage_threshold;
- if(complainteamdamage > 0 && !g_ca) // FIXME why is g_ca ruled out here? Why not just g_mirrordamage 0 on CA servers?
+ if(complainteamdamage > 0)
mirrordamage = autocvar_g_mirrordamage * complainteamdamage;
mirrorforce = autocvar_g_mirrordamage * vlen(force);
- if(g_ca)
- damage = 0;
- else
- damage = autocvar_g_friendlyfire * damage;
+ damage = autocvar_g_friendlyfire * damage;
// mirrordamage will be used LATER
if(autocvar_g_mirrordamage_virtual)
if (targ == attacker)
{
- if(g_ca || (g_cts && !autocvar_g_cts_selfdamage))
+ if(g_cts && !autocvar_g_cts_selfdamage)
damage = 0;
else
damage = damage * autocvar_g_balance_selfdamagepercent; // Partial damage if the attacker hits himself
// apply push
if (self.damageforcescale)
if (vlen(force))
- if (!IS_PLAYER(self) || time >= self.spawnshieldtime || g_midair)
+ if (!IS_PLAYER(self) || time >= self.spawnshieldtime)
{
vector farce = damage_explosion_calcpush(self.damageforcescale * force, self.velocity, autocvar_g_balance_damagepush_speedfactor);
if(self.movetype == MOVETYPE_PHYSICS)
if(autocvar_g_norecoil)
s = strcat(s, ":norecoil");
- // TODO to mutator system
- if(autocvar_g_midair)
- s = strcat(s, ":midair");
-
// TODO to mutator system
if(autocvar_g_powerups == 0)
s = strcat(s, ":no_powerups");
s = "";
n = tokenize_console(cvar_string("sv_curl_serverpackages"));
for(i = 0; i < n; ++i)
- if(substring(argv(i), -14, -1) != "-serverpackage.txt")
+ if(substring(argv(i), -18, -1) != "-serverpackage.txt")
if(substring(argv(i), -14, -1) != ".serverpackage") // OLD legacy
s = strcat(s, " ", argv(i));
fd = search_begin("*-serverpackage.txt", TRUE, FALSE);
if (g_weaponarena)
{
- g_pinata = 0; // incompatible
g_weapon_stay = 0; // incompatible
WEPSET_COPY_AA(start_weapons, g_weaponarena_weapons);
start_items |= IT_UNLIMITED_AMMO;
if(!cvar("g_use_ammunition"))
start_items |= IT_UNLIMITED_AMMO;
-
- if(cvar("g_nexball"))
- start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT
-
+
if(start_items & IT_UNLIMITED_WEAPON_AMMO)
{
start_ammo_rockets = 999;
CHECK_MUTATOR_ADD("g_rocket_flying", mutator_rocketflying, !cvar("g_minstagib"));
CHECK_MUTATOR_ADD("g_vampire", mutator_vampire, !cvar("g_minstagib"));
CHECK_MUTATOR_ADD("g_superspectate", mutator_superspec, 1);
+ CHECK_MUTATOR_ADD("g_pinata", mutator_pinata, !cvar("g_minstagib"));
+ CHECK_MUTATOR_ADD("g_midair", mutator_midair, 1);
+ CHECK_MUTATOR_ADD("g_bloodloss", mutator_bloodloss, !cvar("g_minstagib"));
+ CHECK_MUTATOR_ADD("g_random_gravity", mutator_random_gravity, 1);
+ CHECK_MUTATOR_ADD("g_multijump", mutator_multijump, 1);
+ CHECK_MUTATOR_ADD("g_melee_only", mutator_melee_only, !cvar("g_minstagib"));
+ CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1);
CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1);
+ CHECK_MUTATOR_ADD("g_campcheck", mutator_campcheck, 1);
#undef CHECK_MUTATOR_ADD
g_cloaked = cvar("g_cloaked");
if(g_cts)
g_cloaked = 1; // always enable cloak in CTS
- g_jump_grunt = cvar("g_jump_grunt");
g_footsteps = cvar("g_footsteps");
g_grappling_hook = cvar("g_grappling_hook");
g_jetpack = cvar("g_jetpack");
- g_midair = cvar("g_midair");
- g_norecoil = cvar("g_norecoil");
- g_bloodloss = cvar("g_bloodloss");
sv_maxidle = cvar("sv_maxidle");
sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
sv_autotaunt = cvar("sv_autotaunt");
g_warmup_allguns = cvar("g_warmup_allguns");
g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
- if ((g_race && g_race_qualifying == 2) || g_arena || g_minstagib || g_assault || cvar("g_campaign"))
+ if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
inWarmupStage = 0; // these modes cannot work together, sorry
g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway");
g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway");
- g_pinata = cvar("g_pinata");
-
g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
if(!g_weapon_stay)
g_weapon_stay = cvar("g_weapon_stay");
entity frag_attacker;
entity frag_target; // same as self
float frag_deathtype;
+
+MUTATOR_HOOKABLE(PlayerJump);
+ // called when a player presses the jump key
+ // INPUT, OUTPUT:
+ float player_multijump;
MUTATOR_HOOKABLE(GiveFragsForKill);
// called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill
return 1;
}
+MUTATOR_HOOKFUNCTION(arena_FilterItem)
+{
+ if(autocvar_g_powerups <= 0)
+ if(self.flags & FL_POWERUP)
+ return TRUE;
+
+ return FALSE;
+}
+
void arena_Initialize()
{
maxspawned = max(2, autocvar_g_arena_maxspawned);
MUTATOR_HOOK(GiveFragsForKill, arena_GiveFragsForKill, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDies, arena_PlayerDies, CBC_ORDER_ANY);
MUTATOR_HOOK(SV_StartFrame, arena_SV_StartFrame, CBC_ORDER_ANY);
+ MUTATOR_HOOK(FilterItem, arena_FilterItem, CBC_ORDER_ANY);
MUTATOR_ONADD
{
return 0;
}
+MUTATOR_HOOKFUNCTION(ca_PlayerDamage)
+{
+ if(IS_PLAYER(frag_target))
+ if(frag_target.deadflag == DEAD_NO)
+ if(frag_target == frag_attacker || !IsDifferentTeam(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL)
+ frag_damage = 0;
+
+ frag_mirrordamage = 0;
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(ca_FilterItem)
+{
+ if(autocvar_g_powerups <= 0)
+ if(self.flags & FL_POWERUP)
+ return TRUE;
+
+ if(autocvar_g_pickup_items <= 0)
+ return TRUE;
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(ca_PlayerDamage_SplitHealthArmor)
+{
+ float excess = max(0, frag_damage - damage_take - damage_save);
+
+ if(frag_target != frag_attacker && IS_PLAYER(frag_attacker))
+ PlayerTeamScore_Add(frag_attacker, SP_SCORE, ST_SCORE, (frag_damage - excess) * autocvar_g_ca_damage2score_multiplier);
+
+ return FALSE;
+}
+
// scoreboard setup
void ca_ScoreRules()
{
MUTATOR_HOOK(ForbidThrowCurrentWeapon, ca_ForbidThrowCurrentWeapon, CBC_ORDER_ANY);
MUTATOR_HOOK(GiveFragsForKill, ca_GiveFragsForKill, CBC_ORDER_FIRST);
MUTATOR_HOOK(SetStartItems, ca_SetStartItems, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDamage_Calculate, ca_PlayerDamage, CBC_ORDER_ANY);
+ MUTATOR_HOOK(FilterItem, ca_FilterItem, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, ca_PlayerDamage_SplitHealthArmor, CBC_ORDER_ANY);
MUTATOR_ONADD
{
{
if(self.freezetag_frozen)
{
- self.movement = '0 0 0';
+ if(autocvar_sv_dodging_frozen && IS_REAL_CLIENT(self))
+ {
+ self.movement_x = bound(-5, self.movement_x, 5);
+ self.movement_y = bound(-5, self.movement_y, 5);
+ self.movement_z = bound(-5, self.movement_z, 5);
+ }
+ else
+ self.movement = '0 0 0';
+
self.disableclientprediction = 1;
}
return 1;
{
if(frag_target.freezetag_frozen && frag_deathtype != DEATH_HURTTRIGGER)
{
+ if(autocvar_g_freezetag_revive_falldamage > 0)
+ if(frag_deathtype == DEATH_FALL)
+ if(frag_damage >= autocvar_g_freezetag_revive_falldamage)
+ {
+ freezetag_Unfreeze(frag_target);
+ frag_target.health = autocvar_g_freezetag_revive_falldamage_health;
+ pointparticles(particleeffectnum("iceorglass"), frag_target.origin, '0 0 0', 3);
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, frag_target.netname);
+ Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_FALL);
+ }
+
frag_damage = 0;
frag_force = frag_force * autocvar_g_freezetag_frozen_force;
}
return 1;
}
+MUTATOR_HOOKFUNCTION(freezetag_PlayerJump)
+{
+ if(self.freezetag_frozen)
+ return TRUE; // no jumping in freezetag when frozen
+
+ return FALSE;
+}
+
MUTATOR_HOOKFUNCTION(freezetag_ForbidThrowCurrentWeapon)
{
if (self.freezetag_frozen)
MUTATOR_HOOK(PlayerPreThink, freezetag_PlayerPreThink, CBC_ORDER_FIRST);
MUTATOR_HOOK(PlayerPhysics, freezetag_PlayerPhysics, CBC_ORDER_FIRST);
MUTATOR_HOOK(PlayerDamage_Calculate, freezetag_PlayerDamage_Calculate, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerJump, freezetag_PlayerJump, CBC_ORDER_ANY);
MUTATOR_HOOK(ForbidThrowCurrentWeapon, freezetag_ForbidThrowCurrentWeapon, CBC_ORDER_ANY);
MUTATOR_HOOK(ItemTouch, freezetag_ItemTouch, CBC_ORDER_ANY);
MUTATOR_HOOK(HavocBot_ChooseRule, freezetag_BotRoles, CBC_ORDER_ANY);
return FALSE;
}
-MUTATOR_HOOKFUNCTION(lms_PlayerSpawn)
-{
- self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval*2;
- self.lms_traveled_distance = 0;
-
- return FALSE;
-}
-
MUTATOR_HOOKFUNCTION(lms_PlayerDies)
{
self.respawn_flags |= RESPAWN_FORCE;
if(self.deadflag == DEAD_DYING)
self.deadflag = DEAD_RESPAWNING;
- if not(self.deadflag)
- if(autocvar_g_lms_campcheck_interval)
- {
- vector dist;
-
- // calculate player movement (in 2 dimensions only, so jumping on one spot doesn't count as movement)
- dist = self.prevorigin - self.origin;
- dist_z = 0;
- self.lms_traveled_distance += fabs(vlen(dist));
-
- if((autocvar_g_campaign && !campaign_bots_may_start) || (time < game_starttime))
- {
- self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval*2;
- self.lms_traveled_distance = 0;
- }
-
- if(time > self.lms_nextcheck)
- {
- if(self.lms_traveled_distance < autocvar_g_lms_campcheck_distance)
- {
- Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_LMS_CAMPCHECK);
- if(self.vehicle)
- Damage(self.vehicle, self, self, autocvar_g_lms_campcheck_damage * 2, DEATH_CAMP, self.vehicle.origin, '0 0 0');
- else
- Damage(self, self, self, bound(0, autocvar_g_lms_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0');
- }
- self.lms_nextcheck = time + autocvar_g_lms_campcheck_interval;
- self.lms_traveled_distance = 0;
- }
- }
-
- return FALSE;
-}
-
-MUTATOR_HOOKFUNCTION(lms_PlayerDamage)
-{
- if(IS_PLAYER(frag_target))
- if(IS_PLAYER(frag_attacker))
- if(frag_attacker != frag_target)
- {
- frag_target.lms_traveled_distance = autocvar_g_lms_campcheck_distance;
- frag_attacker.lms_traveled_distance = autocvar_g_lms_campcheck_distance;
- }
-
return FALSE;
}
MUTATOR_HOOK(reset_map_global, lms_ResetMap, CBC_ORDER_ANY);
MUTATOR_HOOK(reset_map_players, lms_ResetPlayers, CBC_ORDER_ANY);
MUTATOR_HOOK(PutClientInServer, lms_PlayerPreSpawn, CBC_ORDER_ANY);
- MUTATOR_HOOK(PlayerSpawn, lms_PlayerSpawn, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDies, lms_PlayerDies, CBC_ORDER_ANY);
MUTATOR_HOOK(MakePlayerObserver, lms_RemovePlayer, CBC_ORDER_ANY);
MUTATOR_HOOK(ClientConnect, lms_ClientConnect, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPreThink, lms_PlayerThink, CBC_ORDER_ANY);
- MUTATOR_HOOK(PlayerDamage_Calculate, lms_PlayerDamage, CBC_ORDER_ANY);
MUTATOR_HOOK(ForbidThrowCurrentWeapon, lms_ForbidThrowing, CBC_ORDER_ANY);
MUTATOR_HOOK(GiveFragsForKill, lms_GiveFragsForKill, CBC_ORDER_ANY);
MUTATOR_HOOK(SetStartItems, lms_SetStartItems, CBC_ORDER_ANY);
// lives related defs
float lms_lowest_lives;
float lms_next_place;
-float LMS_NewPlayerLives();
-
-// camp check
-.float lms_nextcheck;
-.float lms_traveled_distance;
\ No newline at end of file
+float LMS_NewPlayerLives();
\ No newline at end of file
}
}
+
+ nexball_setstatus();
+
return FALSE;
}
return FALSE;
}
+MUTATOR_HOOKFUNCTION(nexball_SetStartItems)
+{
+ start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT
+
+ return FALSE;
+}
+
MUTATOR_DEFINITION(gamemode_nexball)
{
MUTATOR_HOOK(PlayerDies, nexball_BallDrop, CBC_ORDER_ANY);
MUTATOR_HOOK(BuildMutatorsString, nexball_BuildMutatorsString, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerSpawn, nexball_PlayerSpawn, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPreThink, nexball_PlayerPreThink, CBC_ORDER_ANY);
+ MUTATOR_HOOK(SetStartItems, nexball_SetStartItems, CBC_ORDER_ANY);
MUTATOR_ONADD
{
--- /dev/null
+.float bloodloss_timer;
+
+MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink)
+{
+ if(IS_PLAYER(self))
+ if(self.health <= autocvar_g_bloodloss && self.deadflag == DEAD_NO)
+ {
+ self.BUTTON_CROUCH = TRUE;
+
+ if(time >= self.bloodloss_timer)
+ {
+ self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
+ self.bloodloss_timer = time + 0.5 + random() * 0.5;
+ }
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss_PlayerJump)
+{
+ if(self.health <= autocvar_g_bloodloss)
+ return TRUE;
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":bloodloss");
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(bloodloss_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Blood loss");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_bloodloss)
+{
+ MUTATOR_HOOK(PlayerPreThink, bloodloss_PlayerThink, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerJump, bloodloss_PlayerJump, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, bloodloss_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, bloodloss_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
--- /dev/null
+.float campcheck_nextcheck;
+.float campcheck_traveled_distance;
+
+MUTATOR_HOOKFUNCTION(campcheck_PlayerDies)
+{
+ Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_CAMPCHECK);
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(campcheck_PlayerDamage)
+{
+ if(IS_PLAYER(frag_target))
+ if(IS_PLAYER(frag_attacker))
+ if(frag_attacker != frag_target)
+ {
+ frag_target.campcheck_traveled_distance = autocvar_g_campcheck_distance;
+ frag_attacker.campcheck_traveled_distance = autocvar_g_campcheck_distance;
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(campcheck_PlayerThink)
+{
+ if(IS_PLAYER(self))
+ if(self.deadflag == DEAD_NO)
+ if(autocvar_g_campcheck_interval)
+ {
+ vector dist;
+
+ // calculate player movement (in 2 dimensions only, so jumping on one spot doesn't count as movement)
+ dist = self.prevorigin - self.origin;
+ dist_z = 0;
+ self.campcheck_traveled_distance += fabs(vlen(dist));
+
+ if((autocvar_g_campaign && !campaign_bots_may_start) || (time < game_starttime) || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
+ {
+ self.campcheck_nextcheck = time + autocvar_g_campcheck_interval * 2;
+ self.campcheck_traveled_distance = 0;
+ }
+
+ if(time > self.campcheck_nextcheck)
+ {
+ if(self.campcheck_traveled_distance < autocvar_g_campcheck_distance)
+ {
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_CAMPCHECK);
+ if(self.vehicle)
+ Damage(self.vehicle, self, self, autocvar_g_campcheck_damage * 2, DEATH_CAMP, self.vehicle.origin, '0 0 0');
+ else
+ Damage(self, self, self, bound(0, autocvar_g_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0');
+ }
+ self.campcheck_nextcheck = time + autocvar_g_campcheck_interval;
+ self.campcheck_traveled_distance = 0;
+ }
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(campcheck_PlayerSpawn)
+{
+ self.campcheck_nextcheck = time + autocvar_g_campcheck_interval * 2;
+ self.campcheck_traveled_distance = 0;
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(campcheck_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":CampCheck");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_campcheck)
+{
+ MUTATOR_HOOK(PlayerDies, campcheck_PlayerDies, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDamage_Calculate, campcheck_PlayerDamage, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerPreThink, campcheck_PlayerThink, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerSpawn, campcheck_PlayerSpawn, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, campcheck_BuildMutatorsString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
// and to ramp up the dodge acceleration in the physics hook.
.float last_dodging_time;
-// set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done..
-.float dodging_action;
-
// This is the velocity gain to be added over the ramp time.
// It will decrease from frame to frame during dodging_action = 1
// until it's 0.
.float dodging_velocity_gain;
-// the jump part of the dodge cannot be ramped
-.float dodging_single_action;
-
MUTATOR_HOOKFUNCTION(dodging_GetCvars) {
GetCvars_handleFloat(get_cvars_s, get_cvars_f, cvar_cl_dodging_timeout, "cl_dodging_timeout");
return 0;
float new_velocity_gain;
float velocity_difference;
float clean_up_and_do_nothing;
+ float horiz_speed = autocvar_sv_dodging_horiz_speed;
+
+ if(self.freezetag_frozen)
+ horiz_speed = autocvar_sv_dodging_horiz_speed_frozen;
if (self.deadflag != DEAD_NO)
return 0;
if (common_factor > 1)
common_factor = 1;
- new_velocity_gain = self.dodging_velocity_gain - (common_factor * autocvar_sv_dodging_horiz_speed);
+ new_velocity_gain = self.dodging_velocity_gain - (common_factor * horiz_speed);
if (new_velocity_gain < 0)
new_velocity_gain = 0;
tap_direction_x = 0;
tap_direction_y = 0;
+
+ float frozen_dodging;
+ frozen_dodging = (self.freezetag_frozen && autocvar_sv_dodging_frozen);
float dodge_detected;
if (g_dodging == 0)
if (self.movement_x > 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_FORWARD)) {
+ if (!(self.pressedkeys & KEY_FORWARD) || frozen_dodging) {
if ((time - self.last_FORWARD_KEY_time) < self.cvar_cl_dodging_timeout) {
tap_direction_x = 1.0;
dodge_detected = 1;
if (self.movement_x < 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_BACKWARD)) {
+ if (!(self.pressedkeys & KEY_BACKWARD) || frozen_dodging) {
tap_direction_x = -1.0;
if ((time - self.last_BACKWARD_KEY_time) < self.cvar_cl_dodging_timeout) {
dodge_detected = 1;
if (self.movement_y > 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_RIGHT)) {
+ if (!(self.pressedkeys & KEY_RIGHT) || frozen_dodging) {
tap_direction_y = 1.0;
if ((time - self.last_RIGHT_KEY_time) < self.cvar_cl_dodging_timeout) {
dodge_detected = 1;
if (self.movement_y < 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_LEFT)) {
+ if (!(self.pressedkeys & KEY_LEFT) || frozen_dodging) {
tap_direction_y = -1.0;
if ((time - self.last_LEFT_KEY_time) < self.cvar_cl_dodging_timeout) {
dodge_detected = 1;
float g_dodging;
+// set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done..
+.float dodging_action;
+
+// the jump part of the dodge cannot be ramped
+.float dodging_single_action;
--- /dev/null
+MUTATOR_HOOKFUNCTION(melee_SetStartItems)
+{
+ start_ammo_shells = 0;
+ warmup_start_ammo_shells = 0;
+
+ WEPSET_COPY_AW(start_weapons, WEP_SHOTGUN);
+ WEPSET_COPY_AW(warmup_start_weapons, WEP_SHOTGUN);
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(melee_FilterItem)
+{
+ switch (self.items)
+ {
+ case IT_5HP:
+ case IT_ARMOR_SHARD:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+MUTATOR_HOOKFUNCTION(melee_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":MeleeOnly");
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(melee_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Melee Only Arena");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_melee_only)
+{
+ MUTATOR_HOOK(SetStartItems, melee_SetStartItems, CBC_ORDER_ANY);
+ MUTATOR_HOOK(FilterItem, melee_FilterItem, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, melee_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, melee_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
--- /dev/null
+.float midair_shieldtime;
+
+MUTATOR_HOOKFUNCTION(midair_PlayerDamage)
+{
+ if(IS_PLAYER(frag_attacker))
+ if(IS_PLAYER(frag_target))
+ if(time < self.midair_shieldtime)
+ frag_damage = FALSE;
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(midair_PlayerPowerups)
+{
+ if(time >= game_starttime)
+ if(self.flags & FL_ONGROUND)
+ {
+ self.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
+ self.midair_shieldtime = max(self.midair_shieldtime, time + autocvar_g_midair_shieldtime);
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(midair_PlayerSpawn)
+{
+ if(IS_BOT_CLIENT(self))
+ self.bot_moveskill = 0; // disable bunnyhopping
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(midair_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":midair");
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(midair_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Midair");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_midair)
+{
+ MUTATOR_HOOK(PlayerDamage_Calculate, midair_PlayerDamage, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerPowerups, midair_PlayerPowerups, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerSpawn, midair_PlayerSpawn, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, midair_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, midair_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
MUTATOR_HOOKFUNCTION(minstagib_ForbidThrowing)
{
// weapon dropping on death handled by FilterItem
+ nades_CheckThrow();
return TRUE;
}
start_health = 100;
start_armorvalue = 0;
WEPSET_COPY_AW(start_weapons, WEP_MINSTANEX);
+ WEPSET_COPY_AW(warmup_start_weapons, WEP_MINSTANEX);
start_items |= IT_UNLIMITED_SUPERWEAPONS;
return FALSE;
--- /dev/null
+.float multijump_count;
+.float multijump_ready;
+
+MUTATOR_HOOKFUNCTION(multijump_PlayerPhysics)
+{
+ if(self.flags & FL_ONGROUND)
+ {
+ if (autocvar_g_multijump > 0)
+ self.multijump_count = 0;
+ else
+ self.multijump_count = -2; // the cvar value for infinite jumps is -1, so this needs to be smaller
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(multijump_PlayerJump)
+{
+ if (self.flags & FL_JUMPRELEASED && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair
+ self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again
+ else
+ self.multijump_ready = FALSE;
+
+ if(!player_multijump && self.multijump_ready && self.multijump_count < autocvar_g_multijump && self.velocity_z > autocvar_g_multijump_speed)
+ {
+ if (autocvar_g_multijump)
+ {
+ if (autocvar_g_multijump_add == 0) // in this case we make the z velocity == jumpvelocity
+ {
+ if (self.velocity_z < autocvar_sv_jumpvelocity)
+ {
+ player_multijump = TRUE;
+ self.velocity_z = 0;
+ }
+ }
+ else
+ player_multijump = TRUE;
+
+ if(player_multijump)
+ {
+ if(self.movement_x != 0 || self.movement_y != 0) // don't remove all speed if player isnt pressing any movement keys
+ {
+ float curspeed;
+ vector wishvel, wishdir;
+
+ curspeed = max(
+ vlen(vec2(self.velocity)), // current xy speed
+ vlen(vec2(antilag_takebackavgvelocity(self, max(self.lastteleporttime + sys_frametime, time - 0.25), time))) // average xy topspeed over the last 0.25 secs
+ );
+ makevectors(self.v_angle_y * '0 1 0');
+ wishvel = v_forward * self.movement_x + v_right * self.movement_y;
+ wishdir = normalize(wishvel);
+
+ self.velocity_x = wishdir_x * curspeed; // allow "dodging" at a multijump
+ self.velocity_y = wishdir_y * curspeed;
+ // keep velocity_z unchanged!
+ }
+ if (autocvar_g_multijump > 0)
+ self.multijump_count += 1;
+ }
+ }
+ self.multijump_ready = FALSE; // require releasing and pressing the jump button again for the next jump
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(multijump_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":multijump");
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(multijump_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Multi jump");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_multijump)
+{
+ MUTATOR_HOOK(PlayerPhysics, multijump_PlayerPhysics, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerJump, multijump_PlayerJump, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, multijump_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, multijump_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
--- /dev/null
+void nade_timer_think()
+{
+ self.skin = 8 - (self.owner.wait - time) / (autocvar_g_nades_nade_lifetime / 10);
+ self.nextthink = time;
+ if(!self.owner || wasfreed(self.owner))
+ remove(self);
+
+}
+
+void nade_burn_spawn(entity _nade)
+{
+ float p;
+
+ switch(_nade.realowner.team)
+ {
+ case NUM_TEAM_1: p = PROJECTILE_NADE_RED_BURN; break;
+ case NUM_TEAM_2: p = PROJECTILE_NADE_BLUE_BURN; break;
+ case NUM_TEAM_3: p = PROJECTILE_NADE_YELLOW_BURN; break;
+ case NUM_TEAM_4: p = PROJECTILE_NADE_PINK_BURN; break;
+ default: p = PROJECTILE_NADE_BURN; break;
+ }
+
+ CSQCProjectile(_nade, TRUE, p, TRUE);
+}
+
+void nade_spawn(entity _nade)
+{
+ float p;
+ entity timer = spawn();
+ setmodel(timer, "models/ok_nade_counter/ok_nade_counter.md3");
+ setattachment(timer, _nade, "");
+ timer.classname = "nade_timer";
+ timer.colormap = _nade.colormap;
+ timer.glowmod = _nade.glowmod;
+ timer.think = nade_timer_think;
+ timer.nextthink = time;
+ timer.wait = _nade.wait;
+ timer.owner = _nade;
+ timer.skin = 10;
+
+ switch(_nade.realowner.team)
+ {
+ case NUM_TEAM_1: p = PROJECTILE_NADE_RED; break;
+ case NUM_TEAM_2: p = PROJECTILE_NADE_BLUE; break;
+ case NUM_TEAM_3: p = PROJECTILE_NADE_YELLOW; break;
+ case NUM_TEAM_4: p = PROJECTILE_NADE_PINK; break;
+ default: p = PROJECTILE_NADE; break;
+ }
+
+ CSQCProjectile(_nade, TRUE, p, TRUE);
+
+}
+
+void nade_boom()
+{
+ string expef;
+
+ switch(self.realowner.team)
+ {
+ case NUM_TEAM_1: expef = "nade_red_explode"; break;
+ case NUM_TEAM_2: expef = "nade_blue_explode"; break;
+ case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
+ case NUM_TEAM_4: expef = "nade_pink_explode"; break;
+ default: expef = "nade_explode"; break;
+ }
+
+ sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum(expef), self.origin + '0 0 1', '0 0 0', 1);
+
+ Damage_DamageInfo(self.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, self.projectiledeathtype, 0, self);
+
+ self.takedamage = DAMAGE_NO;
+ RadiusDamage(self, self.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
+ autocvar_g_nades_nade_radius, self, autocvar_g_nades_nade_force, self.projectiledeathtype, self.enemy);
+
+ remove(self);
+}
+
+void nade_touch()
+{
+ PROJECTILE_TOUCH;
+ //setsize(self, '-2 -2 -2', '2 2 2');
+ //UpdateCSQCProjectile(self);
+ if(self.health == self.max_health)
+ {
+ spamsound(self, CH_SHOTS, strcat("weapons/grenade_bounce", ftos(1 + rint(random() * 5)), ".wav"), VOL_BASE, ATTN_NORM);
+ return;
+ }
+
+ self.enemy = other;
+ nade_boom();
+}
+
+void nade_beep()
+{
+ sound(self, CH_SHOTS_SINGLE, "overkill/grenadebip.ogg", VOL_BASE, 0.5 *(ATTN_LARGE + ATTN_MAX));
+ self.think = nade_boom;
+ self.nextthink = max(self.wait, time);
+}
+
+void nade_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+{
+ if(DEATH_ISWEAPON(deathtype, WEP_LASER))
+ return;
+
+ if(DEATH_ISWEAPON(deathtype, WEP_NEX) || DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
+ {
+ force *= 6;
+ damage = self.max_health * 0.55;
+ }
+
+ if(DEATH_ISWEAPON(deathtype, WEP_UZI))
+ damage = self.max_health * 0.1;
+
+ if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && !(deathtype & HITTYPE_SECONDARY))
+ damage = self.max_health * 1.1;
+
+ if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && (deathtype & HITTYPE_SECONDARY))
+ {
+ damage = self.max_health * 0.1;
+ force *= 15;
+ }
+
+ self.velocity += force;
+
+ if(!damage || (self.flags & FL_ONGROUND && IS_PLAYER(attacker)))
+ return;
+
+ if(self.health == self.max_health)
+ {
+ sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, 0.5 *(ATTN_LARGE + ATTN_MAX));
+ self.nextthink = max(time + autocvar_g_nades_nade_lifetime, time);
+ self.think = nade_beep;
+ }
+
+ self.health -= damage;
+ self.realowner = attacker;
+
+ if(self.health <= 0)
+ W_PrepareExplosionByDamage(attacker, nade_boom);
+ else
+ nade_burn_spawn(self);
+}
+
+void toss_nade(entity e, vector _velocity, float _time)
+{
+ entity _nade = e.nade;
+ e.nade = world;
+
+ remove(e.fake_nade);
+ e.fake_nade = world;
+
+ makevectors(e.v_angle);
+
+ W_SetupShot(e, FALSE, FALSE, "", CH_WEAPON_A, 0);
+
+ Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES);
+
+ //setorigin(_nade, CENTER_OR_VIEWOFS(e) + (v_right * 10) * -1);
+ setorigin(_nade, w_shotorg + (v_right * 25) * -1);
+ setmodel(_nade, "models/weapons/v_ok_grenade.md3");
+ setattachment(_nade, world, "");
+ PROJECTILE_MAKETRIGGER(_nade);
+ setsize(_nade, '-16 -16 -16', '16 16 16');
+ _nade.movetype = MOVETYPE_BOUNCE;
+
+ tracebox(_nade.origin, _nade.mins, _nade.maxs, _nade.origin, FALSE, _nade);
+ if (trace_startsolid)
+ setorigin(_nade, e.origin);
+
+ if(e.crouch)
+ _nade.velocity = '0 0 -10';
+ else if(autocvar_g_nades_nade_newton_style == 1)
+ _nade.velocity = e.velocity + _velocity;
+ else if(autocvar_g_nades_nade_newton_style == 2)
+ _nade.velocity = _velocity;
+ else
+ _nade.velocity = W_CalculateProjectileVelocity(e.velocity, _velocity, TRUE);
+
+ //_nade.solid = SOLID_BBOX; // TODO: remember why this was needed
+ _nade.touch = nade_touch;
+ _nade.health = autocvar_g_nades_nade_health;
+ _nade.max_health = _nade.health;
+ _nade.takedamage = DAMAGE_AIM;
+ _nade.event_damage = nade_damage;
+ _nade.teleportable = TRUE;
+ _nade.pushable = TRUE;
+ _nade.gravity = 1;
+ _nade.missile_flags = MIF_SPLASH | MIF_ARC;
+ _nade.damagedbycontents = TRUE;
+ _nade.angles = vectoangles(_nade.velocity);
+ _nade.flags = FL_PROJECTILE;
+
+ nade_spawn(_nade);
+
+ if(_time)
+ {
+ _nade.think = nade_boom;
+ _nade.nextthink = _time;
+ }
+
+ e.nade_refire = time + autocvar_g_nades_nade_refire;
+}
+
+void nade_prime()
+{
+ if(self.nade)
+ remove(self.nade);
+
+ if(self.fake_nade)
+ remove(self.fake_nade);
+
+ self.nade = spawn();
+ setmodel(self.nade, "null");
+ setattachment(self.nade, self, "bip01 l hand");
+ self.nade.classname = "nade";
+ self.nade.realowner = self;
+ self.nade.colormap = self.colormap;
+ self.nade.glowmod = self.glowmod;
+ self.nade.wait = time + autocvar_g_nades_nade_lifetime;
+ self.nade.lifetime = time;
+ self.nade.think = nade_beep;
+ self.nade.nextthink = max(self.nade.wait - 3, time);
+ self.nade.projectiledeathtype = DEATH_NADE;
+
+ self.fake_nade = spawn();
+ setmodel(self.fake_nade, "models/weapons/h_ok_grenade.iqm");
+ setattachment(self.fake_nade, self.weaponentity, "");
+ self.fake_nade.classname = "fake_nade";
+ //self.fake_nade.viewmodelforclient = self;
+ self.fake_nade.realowner = self.fake_nade.owner = self;
+ self.fake_nade.colormap = self.colormap;
+ self.fake_nade.glowmod = self.glowmod;
+ self.fake_nade.think = SUB_Remove;
+ self.fake_nade.nextthink = self.nade.wait;
+}
+
+float CanThrowNade()
+{
+ if(self.vehicle)
+ return FALSE;
+
+ if(gameover)
+ return FALSE;
+
+ if(self.deadflag != DEAD_NO)
+ return FALSE;
+
+ if not(autocvar_g_nades)
+ return FALSE; // allow turning them off mid match
+
+ if(forbidWeaponUse())
+ return FALSE;
+
+ if not(IS_PLAYER(self))
+ return FALSE;
+
+ return TRUE;
+}
+
+void nades_CheckThrow()
+{
+ if(!CanThrowNade())
+ return;
+
+ if(!self.nade)
+ {
+ if(self.nade_refire < time)
+ {
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_NADE_THROW);
+ nade_prime();
+ self.nade_refire = time + autocvar_g_nades_nade_refire;
+ }
+ }
+ else
+ {
+ if(time - self.nade.lifetime >= 1)
+ {
+ makevectors(self.v_angle);
+ float _force = time - self.nade.lifetime;
+ _force /= autocvar_g_nades_nade_lifetime;
+ _force = autocvar_g_nades_nade_minforce + (_force * (autocvar_g_nades_nade_maxforce - autocvar_g_nades_nade_minforce));
+ toss_nade(self, (v_forward * 0.75 + v_up * 0.2 + v_right * 0.05) * _force, 0);
+ }
+ }
+}
+
+MUTATOR_HOOKFUNCTION(nades_VehicleEnter)
+{
+ if(other.nade)
+ toss_nade(other, '0 0 100', max(other.nade.wait, time + 0.05));
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(nades_PlayerPreThink)
+{
+ float key_pressed = ((g_grappling_hook || client_hasweapon(self, WEP_HOOK, FALSE, FALSE) || WEPSET_CONTAINS_AW(weaponsInMap, WEP_HOOK)) ? self.button16 : self.BUTTON_HOOK);
+
+ if(self.nade)
+ if(self.nade.wait - 0.1 <= time)
+ toss_nade(self, '0 0 0', time + 0.05);
+
+ if(CanThrowNade())
+ if(self.nade_refire < time)
+ {
+ if(key_pressed)
+ {
+ if(!self.nade)
+ nade_prime();
+ }
+ else if(time - self.nade.lifetime >= 1)
+ {
+ if(self.nade)
+ {
+ makevectors(self.v_angle);
+ float _force = time - self.nade.lifetime;
+ _force /= autocvar_g_nades_nade_lifetime;
+ _force = autocvar_g_nades_nade_minforce + (_force * (autocvar_g_nades_nade_maxforce - autocvar_g_nades_nade_minforce));
+ toss_nade(self, (v_forward * 0.7 + v_up * 0.2 + v_right * 0.1) * _force, 0);
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(nades_PlayerSpawn)
+{
+ if(autocvar_g_nades_spawn)
+ self.nade_refire = time + autocvar_g_spawnshieldtime;
+ else
+ self.nade_refire = time + autocvar_g_nades_nade_refire;
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(nades_PlayerDies)
+{
+ if(self.nade)
+ toss_nade(self, '0 0 100', max(self.nade.wait, time + 0.05));
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(nades_RemovePlayer)
+{
+ if(self.nade)
+ remove(self.nade);
+
+ if(self.fake_nade)
+ remove(self.fake_nade);
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(nades_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":Nades");
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(nades_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Nades");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_nades)
+{
+ MUTATOR_HOOK(VehicleEnter, nades_VehicleEnter, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerPreThink, nades_PlayerPreThink, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerSpawn, nades_PlayerSpawn, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDies, nades_PlayerDies, CBC_ORDER_ANY);
+ MUTATOR_HOOK(MakePlayerObserver, nades_RemovePlayer, CBC_ORDER_ANY);
+ MUTATOR_HOOK(ClientDisconnect, nades_RemovePlayer, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, nades_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, nades_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ MUTATOR_ONADD
+ {
+ precache_model("models/ok_nade_counter/ok_nade_counter.md3");
+
+ precache_model("models/weapons/h_ok_grenade.iqm");
+ precache_model("models/weapons/v_ok_grenade.md3");
+ precache_sound("weapons/rocket_impact.wav");
+ precache_sound("weapons/grenade_bounce1.wav");
+ precache_sound("weapons/grenade_bounce2.wav");
+ precache_sound("weapons/grenade_bounce3.wav");
+ precache_sound("weapons/grenade_bounce4.wav");
+ precache_sound("weapons/grenade_bounce5.wav");
+ precache_sound("weapons/grenade_bounce6.wav");
+ precache_sound("overkill/grenadebip.ogg");
+ }
+
+ return FALSE;
+}
--- /dev/null
+.entity nade;
+.entity fake_nade;
+.float nade_refire;
+
+void() nades_CheckThrow;
--- /dev/null
+MUTATOR_HOOKFUNCTION(pinata_PlayerDies)
+{
+ float j;
+ for(j = WEP_FIRST; j <= WEP_LAST; ++j)
+ if(WEPSET_CONTAINS_EW(self, j))
+ if(self.switchweapon != j)
+ if(W_IsWeaponThrowable(j))
+ W_ThrowNewWeapon(self, j, FALSE, self.origin + (self.mins + self.maxs) * 0.5, randomvec() * 175 + '0 0 325');
+
+ return TRUE;
+}
+
+MUTATOR_HOOKFUNCTION(pinata_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":Pinata");
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(pinata_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", PiƱata");
+ return FALSE;
+}
+
+MUTATOR_DEFINITION(mutator_pinata)
+{
+ MUTATOR_HOOK(PlayerDies, pinata_PlayerDies, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, pinata_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, pinata_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ return FALSE;
+}
--- /dev/null
+// Random Gravity
+//
+// Mutator by Mario
+// Inspired by Player 2
+
+float gravity_delay;
+
+MUTATOR_HOOKFUNCTION(gravity_StartFrame)
+{
+ if(gameover || !cvar("g_random_gravity")) return FALSE;
+ if(time < gravity_delay) return FALSE;
+ if(time < game_starttime) return FALSE;
+ if(round_handler_IsActive() && !round_handler_IsRoundStarted()) return FALSE;
+
+ if(random() >= autocvar_g_random_gravity_negative_chance)
+ cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() - random() * -autocvar_g_random_gravity_negative, autocvar_g_random_gravity_max)));
+ else
+ cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() * autocvar_g_random_gravity_positive, autocvar_g_random_gravity_max)));
+
+ gravity_delay = time + autocvar_g_random_gravity_delay;
+
+ dprint("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
+
+ return FALSE;
+}
+
+MUTATOR_HOOKFUNCTION(gravity_BuildMutatorsString)
+{
+ ret_string = strcat(ret_string, ":RandomGravity");
+ return 0;
+}
+
+MUTATOR_HOOKFUNCTION(gravity_BuildMutatorsPrettyString)
+{
+ ret_string = strcat(ret_string, ", Random gravity");
+ return 0;
+}
+
+MUTATOR_DEFINITION(mutator_random_gravity)
+{
+ MUTATOR_HOOK(SV_StartFrame, gravity_StartFrame, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsString, gravity_BuildMutatorsString, CBC_ORDER_ANY);
+ MUTATOR_HOOK(BuildMutatorsPrettyString, gravity_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+ MUTATOR_ONADD
+ {
+ cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end
+ }
+
+ return FALSE;
+}
MUTATOR_HOOKFUNCTION(vampire_PlayerDamage)
{
- if(time < self.spawnshieldtime)
- return 0;
- if(g_minstagib)
+ if(time >= frag_target.spawnshieldtime)
+ if(frag_target != frag_attacker)
+ if(frag_target.deadflag == DEAD_NO)
{
- // minstagib: each hit means +1 ammo
- if(frag_attacker != frag_target)
- frag_attacker.ammo_cells += 2; // note: 1 cell was deducted for the shot
+ frag_attacker.health += bound(0, damage_take, frag_target.health);
+ frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit);
}
- else
- {
- // otherwise: each hit gets damage back
- frag_attacker.health = frag_attacker.health + bound(0, damage_take, self.health);
- }
- return 0;
+
+ return FALSE;
}
MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsString)
MUTATOR_DECLARATION(mutator_superspec);
MUTATOR_DECLARATION(mutator_minstagib);
MUTATOR_DECLARATION(mutator_touchexplode);
+MUTATOR_DECLARATION(mutator_pinata);
+MUTATOR_DECLARATION(mutator_midair);
+MUTATOR_DECLARATION(mutator_bloodloss);
+MUTATOR_DECLARATION(mutator_random_gravity);
+MUTATOR_DECLARATION(mutator_multijump);
+MUTATOR_DECLARATION(mutator_melee_only);
+MUTATOR_DECLARATION(mutator_nades);
+MUTATOR_DECLARATION(mutator_campcheck);
MUTATOR_DECLARATION(sandbox);
mutators/gamemode_nexball.qh
mutators/gamemode_lms.qh
mutators/mutator_dodging.qh
+mutators/mutator_nades.qh
//// tZork Turrets ////
tturrets/include/turrets_early.qh
mutators/mutator_superspec.qc
mutators/mutator_minstagib.qc
mutators/mutator_touchexplode.qc
+mutators/mutator_pinata.qc
+mutators/mutator_midair.qc
+mutators/mutator_bloodloss.qc
+mutators/mutator_random_gravity.qc
+mutators/mutator_multijump.qc
+mutators/mutator_melee_only.qc
+mutators/mutator_nades.qc
+mutators/mutator_campcheck.qc
../warpzonelib/anglestransform.qc
../warpzonelib/mathlib.qc
{
// check for falling damage
float velocity_len = vlen(self.velocity);
- if(!self.hook.state && !g_ca && !(g_cts && !autocvar_g_cts_selfdamage))
+ if(!self.hook.state && !(g_cts && !autocvar_g_cts_selfdamage))
{
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)
return TRUE;
if(autocvar_g_powerups == 0)
return FALSE;
- if(g_ca)
- return FALSE;
- if(g_arena)
- return FALSE;
}
else
{
return TRUE;
if(autocvar_g_pickup_items == 0)
return FALSE;
- if(g_ca)
- return FALSE;
if(g_weaponarena)
if(!WEPSET_EMPTY_E(self) || (self.items & IT_AMMO))
return FALSE;
*/
// push him so high...
- vz = sqrt(2 * grav * jumpheight); // NOTE: sqrt(positive)!
+ vz = sqrt(fabs(2 * grav * jumpheight)); // NOTE: sqrt(positive)!
// we start with downwards velocity only if it's a downjump and the jump apex should be outside the jump!
if(ht < 0)
modifications = strcat(modifications, ", Cloaked");
if(g_grappling_hook)
modifications = strcat(modifications, ", Hook");
- if(g_midair)
- modifications = strcat(modifications, ", Midair");
- if(g_pinata)
- modifications = strcat(modifications, ", PiƱata");
if(g_weapon_stay && !g_cts)
modifications = strcat(modifications, ", Weapons stay");
- if(g_bloodloss > 0)
- modifications = strcat(modifications, ", Blood loss");
if(g_jetpack)
modifications = strcat(modifications, ", Jet pack");
if(autocvar_g_powerups == 0)
// stored in w_crylink_linkjoin_time.
// could possibly network this origin and time, and display a special particle
// effect when projectiles meet there :P
-// jspeed: MINIMUM jing speed
-// jtime: MAXIMUM jing time (0: none)
+// jspeed: joining speed (calculate this as join spread * initial speed)
float w_crylink_linkjoin_time;
-vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
+vector W_Crylink_LinkJoin(entity e, float jspeed)
{
vector avg_origin, avg_velocity;
vector targ_origin;
if(avg_dist == 0)
return avg_origin; // no change needed
- if(jspeed == 0 && jtime == 0)
+ if(jspeed == 0)
{
e.velocity = avg_velocity;
UpdateCSQCProjectile(e);
}
else
{
- if(jtime)
- {
- if(jspeed)
- w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
- else
- w_crylink_linkjoin_time = jtime;
- }
- else
w_crylink_linkjoin_time = avg_dist / jspeed;
targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
other = proj; MUTATOR_CALLHOOK(EditProjectile);
}
- if(autocvar_g_balance_crylink_primary_joinspread != 0 || autocvar_g_balance_crylink_primary_jointime != 0)
+ if(autocvar_g_balance_crylink_primary_joinspread != 0)
{
self.crylink_lastgroup = proj;
W_Crylink_CheckLinks(proj);
other = proj; MUTATOR_CALLHOOK(EditProjectile);
}
- if(autocvar_g_balance_crylink_secondary_joinspread != 0 || autocvar_g_balance_crylink_secondary_jointime != 0)
+ if(autocvar_g_balance_crylink_secondary_joinspread != 0)
{
self.crylink_lastgroup = proj;
W_Crylink_CheckLinks(proj);
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);
+ pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed);
}
else
{
- pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_secondary_joinspread * autocvar_g_balance_crylink_secondary_speed, autocvar_g_balance_crylink_secondary_jointime);
+ pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_secondary_joinspread * autocvar_g_balance_crylink_secondary_speed);
}
linkjoineffect = spawn();
W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, autocvar_g_balance_hlac_primary_damage);
pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
- if (!g_norecoil)
+ if (!autocvar_g_norecoil)
{
self.punchangle_x = random () - 0.5;
self.punchangle_y = random () - 0.5;
for(i=autocvar_g_balance_hlac_secondary_shots;i>0;--i)
W_HLAC_Attack2f();
- if (!g_norecoil)
+ if (!autocvar_g_norecoil)
{
self.punchangle_x = random () - 0.5;
self.punchangle_y = random () - 0.5;
void W_UZI_Attack (float deathtype)
{
W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, ((self.misc_bulletcounter == 1) ? autocvar_g_balance_uzi_first_damage : autocvar_g_balance_uzi_sustained_damage));
- if (!g_norecoil)
+ if (!autocvar_g_norecoil)
{
self.punchangle_x = random () - 0.5;
self.punchangle_y = random () - 0.5;
W_DecreaseAmmo(ammo_nails, autocvar_g_balance_uzi_sustained_ammo, autocvar_g_balance_uzi_reload_ammo);
W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, autocvar_g_balance_uzi_sustained_damage);
- if (!g_norecoil)
+ if (!autocvar_g_norecoil)
{
self.punchangle_x = random () - 0.5;
self.punchangle_y = random () - 0.5;
void uzi_mode1_fire_burst()
{
W_SetupShot (self, autocvar_g_antilag_bullets && autocvar_g_balance_uzi_speed >= autocvar_g_antilag_bullets, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, autocvar_g_balance_uzi_sustained_damage);
- if (!g_norecoil)
+ if (!autocvar_g_norecoil)
{
self.punchangle_x = random () - 0.5;
self.punchangle_y = random () - 0.5;
--- /dev/null
+models/ok_nade_counter/ok_nade_counter_01
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_01"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_02
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_02"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_03
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_03"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_04
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_04"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_05
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_05"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_06
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_06"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_07
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_07"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_08
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_08"
+ blendfunc add
+ }
+}
+models/ok_nade_counter/ok_nade_counter_09
+{
+ dpnoshadow
+ deformVertexes autosprite
+ dppolygonoffset -6000
+ {
+ map "models/ok_nade_counter/ok_nade_counter_09"
+ blendfunc add
+ }
+}
\ No newline at end of file
tuba
turrets
weapons
+ok_nade_counter
set g_vehicle_racer_rocket_climbspeed 1600
set g_vehicle_racer_rocket_locktarget 1
-set g_vehicle_racer_rocket_locking_time 0.35
+set g_vehicle_racer_rocket_locking_time 0.9
set g_vehicle_racer_rocket_locking_releasetime 0.5
set g_vehicle_racer_rocket_locked_time 4
set g_vehicle_racer_rocket_locked_maxangle 1.8
set g_vehicle_raptor_bomblet_explode_delay 0.4
set g_vehicle_raptor_bombs_refire 5
-set g_vehicle_raptor_cannon_turnspeed 60
+set g_vehicle_raptor_cannon_turnspeed 120
set g_vehicle_raptor_cannon_turnlimit 20
set g_vehicle_raptor_cannon_pitchlimit_up 12
set g_vehicle_raptor_cannon_pitchlimit_down 32
-set g_vehicle_raptor_cannon_locktarget 1
+set g_vehicle_raptor_cannon_locktarget 0
set g_vehicle_raptor_cannon_locking_time 0.2
set g_vehicle_raptor_cannon_locking_releasetime 0.45
set g_vehicle_raptor_cannon_locked_time 1
set g_vehicle_raptor_cannon_damage 10
set g_vehicle_raptor_cannon_radius 60
set g_vehicle_raptor_cannon_refire 0.03
-set g_vehicle_raptor_cannon_speed 12000
+set g_vehicle_raptor_cannon_speed 24000
set g_vehicle_raptor_cannon_spread 0.01
set g_vehicle_raptor_cannon_force 25
set g_vehicle_spiderbot_movement_inertia 0.15
set g_vehicle_spiderbot_tiltlimit 90
-set g_vehicle_spiderbot_minigun_damage 12 // 400 (x2) DPS
-set g_vehicle_spiderbot_minigun_refire 0.03
+set g_vehicle_spiderbot_minigun_damage 24 // 400 (x2) DPS
+set g_vehicle_spiderbot_minigun_refire 0.06
set g_vehicle_spiderbot_minigun_force 9
set g_vehicle_spiderbot_minigun_spread 0.015
set g_vehicle_spiderbot_minigun_speed 45000 // ~ 32QU
set g_vehicle_spiderbot_minigun_bulletconstant 110
set g_vehicle_spiderbot_minigun_ammo_cost 1
-set g_vehicle_spiderbot_minigun_ammo_max 200
+set g_vehicle_spiderbot_minigun_ammo_max 100
set g_vehicle_spiderbot_minigun_ammo_regen 40
set g_vehicle_spiderbot_minigun_ammo_regen_pause 1