From 7d31226bcb7eb09c889f3a817562270573f32c66 Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 26 Jan 2015 18:59:39 +1100 Subject: [PATCH] Remove redundant uses of `var` --- qcsrc/client/autocvars.qh | 172 ++++++++++---------- qcsrc/client/hud.qh | 36 ++-- qcsrc/client/miscfunctions.qc | 12 +- qcsrc/client/movetypes.qh | 2 +- qcsrc/client/vehicles/vehicles.qc | 4 +- qcsrc/common/buffs.qh | 4 +- qcsrc/common/notifications.qh | 34 ++-- qcsrc/common/playerstats.qh | 10 +- qcsrc/common/util.qh | 18 +- qcsrc/common/weapons/w_vortex.qc | 2 +- qcsrc/csqcmodellib/cl_model.qc | 4 +- qcsrc/csqcmodellib/cl_player.qc | 2 +- qcsrc/menu/skin.qh | 6 +- qcsrc/menu/xonotic/keybinder.qc | 2 +- qcsrc/menu/xonotic/serverlist.qc | 2 +- qcsrc/menu/xonotic/textslider.qc | 8 +- qcsrc/menu/xonotic/util.qc | 4 +- qcsrc/server/autocvars.qh | 4 +- qcsrc/server/g_tetris.qc | 6 +- qcsrc/server/miscfunctions.qc | 6 +- qcsrc/server/mutators/gamemode_onslaught.qc | 4 +- qcsrc/server/t_items.qh | 16 +- qcsrc/server/vehicles/bumblebee.qc | 6 +- qcsrc/server/vehicles/vehicles.qc | 12 +- qcsrc/warpzonelib/client.qc | 2 +- qcsrc/warpzonelib/common.qc | 2 +- 26 files changed, 190 insertions(+), 190 deletions(-) diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 38178e2bd..c4a4fab80 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -19,16 +19,16 @@ float autocvar_camera_speed_roll; int autocvar_chase_active; int autocvar_cl_allow_uid2name; string autocvar_cl_announcer; -var float autocvar_cl_announcer_antispam = 2; -var float autocvar_cl_announcer_maptime = 3; +float autocvar_cl_announcer_antispam = 2; +float autocvar_cl_announcer_maptime = 3; bool autocvar_cl_autodemo_delete; bool autocvar_cl_autodemo_delete_keeprecords; bool autocvar_cl_casings; float autocvar_cl_casings_bronze_time; -var int autocvar_cl_casings_maxcount = 100; +int autocvar_cl_casings_maxcount = 100; float autocvar_cl_casings_shell_time; -var bool autocvar_cl_casings_sloppy = 1; -var float autocvar_cl_casings_ticrate = 0.1; +bool autocvar_cl_casings_sloppy = 1; +float autocvar_cl_casings_ticrate = 0.1; bool autocvar_cl_db_saveasdump; bool autocvar_cl_deathscoreboard; float autocvar_cl_effects_lightningarc_branchfactor_add; @@ -41,14 +41,14 @@ int autocvar_cl_gentle; int autocvar_cl_gentle_damage; int autocvar_cl_gentle_gibs; int autocvar_cl_gentle_messages; -var float autocvar_cl_gibs_damageforcescale = 3.5; -var float autocvar_cl_gibs_lifetime = 14; -var float autocvar_cl_gibs_maxcount = 100; -var bool autocvar_cl_gibs_sloppy = 1; -var float autocvar_cl_gibs_ticrate = 0.1; -var float autocvar_cl_gibs_velocity_random = 1; -var float autocvar_cl_gibs_velocity_scale = 1; -var float autocvar_cl_gibs_avelocity_scale = 1; +float autocvar_cl_gibs_damageforcescale = 3.5; +float autocvar_cl_gibs_lifetime = 14; +float autocvar_cl_gibs_maxcount = 100; +bool autocvar_cl_gibs_sloppy = 1; +float autocvar_cl_gibs_ticrate = 0.1; +float autocvar_cl_gibs_velocity_random = 1; +float autocvar_cl_gibs_velocity_scale = 1; +float autocvar_cl_gibs_avelocity_scale = 1; float autocvar_cl_gibs_velocity_up; int autocvar_cl_gunalign; bool autocvar_cl_hidewaypoints; @@ -61,35 +61,35 @@ bool autocvar_cl_particles_oldvortexbeam; float autocvar_cl_particles_quality; bool autocvar_cl_projectiles_sloppy; bool autocvar_cl_readpicture_force; -var bool autocvar_cl_reticle = 1; -var float autocvar_cl_reticle_normal_alpha = 1; -var bool autocvar_cl_reticle_weapon = 1; -var float autocvar_cl_reticle_weapon_alpha = 1; +bool autocvar_cl_reticle = 1; +float autocvar_cl_reticle_normal_alpha = 1; +bool autocvar_cl_reticle_weapon = 1; +float autocvar_cl_reticle_weapon_alpha = 1; bool autocvar_cl_reticle_stretch; bool autocvar_cl_spawn_event_particles; -var bool autocvar_cl_spawn_event_sound = 1; +bool autocvar_cl_spawn_event_sound = 1; // float autocvar_cl_spawn_point_model; bool autocvar_cl_spawn_point_particles; -var bool autocvar_cl_spawnzoom = 1; -var float autocvar_cl_spawnzoom_speed = 1; -var float autocvar_cl_spawnzoom_factor = 2; +bool autocvar_cl_spawnzoom = 1; +float autocvar_cl_spawnzoom_speed = 1; +float autocvar_cl_spawnzoom_factor = 2; bool autocvar_cl_stripcolorcodes; -var float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6; -var float autocvar_cl_vehicle_spiderbot_cross_size = 1; -var bool autocvar_cl_vehicles_hud_tactical = 1; +float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6; +float autocvar_cl_vehicle_spiderbot_cross_size = 1; +bool autocvar_cl_vehicles_hud_tactical = 1; bool autocvar_cl_velocityzoom_enabled; float autocvar_cl_velocityzoom_factor; -var int autocvar_cl_velocityzoom_type = 3; +int autocvar_cl_velocityzoom_type = 3; float autocvar_cl_velocityzoom_speed; float autocvar_cl_velocityzoom_time; string autocvar_cl_weaponpriority; float autocvar_cl_zoomfactor; float autocvar_cl_zoomsensitivity; float autocvar_cl_zoomspeed; -var bool autocvar_cl_unpress_zoom_on_spawn = 1; -var bool autocvar_cl_unpress_zoom_on_death = 1; -var bool autocvar_cl_unpress_zoom_on_weapon_switch = 1; -var bool autocvar_cl_unpress_attack_on_weapon_switch = 1; +bool autocvar_cl_unpress_zoom_on_spawn = 1; +bool autocvar_cl_unpress_zoom_on_death = 1; +bool autocvar_cl_unpress_zoom_on_weapon_switch = 1; +bool autocvar_cl_unpress_attack_on_weapon_switch = 1; bool autocvar_con_chat; float autocvar_con_chatpos; bool autocvar_con_chatrect; @@ -101,23 +101,23 @@ string autocvar_crosshair; float autocvar_crosshair_alpha; string autocvar_crosshair_color; int autocvar_crosshair_color_special; -var float autocvar_crosshair_color_special_rainbow_brightness = 2; -var float autocvar_crosshair_color_special_rainbow_delay = 0.1; +float autocvar_crosshair_color_special_rainbow_brightness = 2; +float autocvar_crosshair_color_special_rainbow_delay = 0.1; bool autocvar_crosshair_dot; float autocvar_crosshair_dot_alpha; string autocvar_crosshair_dot_color; -var bool autocvar_crosshair_dot_color_custom = 1; +bool autocvar_crosshair_dot_color_custom = 1; float autocvar_crosshair_dot_size; bool autocvar_crosshair_effect_scalefade; -var float autocvar_crosshair_effect_time = 0.2; -var bool autocvar_crosshair_enabled = 1; +float autocvar_crosshair_effect_time = 0.2; +bool autocvar_crosshair_enabled = 1; bool autocvar_crosshair_hitindication; string autocvar_crosshair_hitindication_color; string autocvar_crosshair_hitindication_per_weapon_color; float autocvar_crosshair_hitindication_speed; bool autocvar_crosshair_hittest; bool autocvar_crosshair_hittest_blur; -var float autocvar_crosshair_hittest_scale = 1.25; +float autocvar_crosshair_hittest_scale = 1.25; bool autocvar_crosshair_hittest_showimpact; bool autocvar_crosshair_per_weapon; float autocvar_crosshair_pickup; @@ -128,18 +128,18 @@ bool autocvar_crosshair_ring_minelayer; float autocvar_crosshair_ring_minelayer_alpha; bool autocvar_crosshair_ring_hagar; float autocvar_crosshair_ring_hagar_alpha; -var bool autocvar_crosshair_ring_vortex = 1; -var float autocvar_crosshair_ring_vortex_alpha = 0.15; -var float autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate = 0.05; -var float autocvar_crosshair_ring_vortex_currentcharge_scale = 30; -var float autocvar_crosshair_ring_vortex_inner_alpha = 0.15; -var float autocvar_crosshair_ring_vortex_inner_color_blue = 0; -var float autocvar_crosshair_ring_vortex_inner_color_green = 0; -var float autocvar_crosshair_ring_vortex_inner_color_red = 0.8; -var bool autocvar_crosshair_ring_arc = 1; -var vector autocvar_crosshair_ring_arc_hot_color = '1 0 0'; -var float autocvar_crosshair_ring_arc_cold_alpha = 0.2; -var float autocvar_crosshair_ring_arc_hot_alpha = 0.5; +bool autocvar_crosshair_ring_vortex = 1; +float autocvar_crosshair_ring_vortex_alpha = 0.15; +float autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate = 0.05; +float autocvar_crosshair_ring_vortex_currentcharge_scale = 30; +float autocvar_crosshair_ring_vortex_inner_alpha = 0.15; +float autocvar_crosshair_ring_vortex_inner_color_blue = 0; +float autocvar_crosshair_ring_vortex_inner_color_green = 0; +float autocvar_crosshair_ring_vortex_inner_color_red = 0.8; +bool autocvar_crosshair_ring_arc = 1; +vector autocvar_crosshair_ring_arc_hot_color = '1 0 0'; +float autocvar_crosshair_ring_arc_cold_alpha = 0.2; +float autocvar_crosshair_ring_arc_hot_alpha = 0.5; float autocvar_crosshair_ring_size; bool autocvar_crosshair_ring_reload; float autocvar_crosshair_ring_reload_alpha; @@ -176,9 +176,9 @@ float autocvar_g_waypointsprite_normdistance; float autocvar_g_waypointsprite_scale; int autocvar_g_waypointsprite_spam; float autocvar_g_waypointsprite_timealphaexponent; -var bool autocvar_g_waypointsprite_turrets = true; -var float autocvar_g_waypointsprite_turrets_maxdist = 5000; -var bool autocvar_hud_cursormode = true; +bool autocvar_g_waypointsprite_turrets = true; +float autocvar_g_waypointsprite_turrets_maxdist = 5000; +bool autocvar_hud_cursormode = true; float autocvar_hud_colorflash_alpha; bool autocvar_hud_configure_checkcollisions; bool autocvar_hud_configure_grid; @@ -235,15 +235,15 @@ float autocvar_hud_panel_bg_color_team; // ^ float autocvar_hud_panel_bg_padding; bool autocvar_hud_panel_centerprint; float autocvar_hud_panel_centerprint_align; -var float autocvar_hud_panel_centerprint_fade_in = 0.2; -var float autocvar_hud_panel_centerprint_fade_out = 0.5; -var float autocvar_hud_panel_centerprint_fade_subsequent = 1; -var float autocvar_hud_panel_centerprint_fade_subsequent_passone = 3; -var float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha = 0.5; -var float autocvar_hud_panel_centerprint_fade_subsequent_passtwo = 10; -var float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha = 0.5; -var float autocvar_hud_panel_centerprint_fade_subsequent_minfontsize = 0.75; -var float autocvar_hud_panel_centerprint_fade_minfontsize = 0; +float autocvar_hud_panel_centerprint_fade_in = 0.2; +float autocvar_hud_panel_centerprint_fade_out = 0.5; +float autocvar_hud_panel_centerprint_fade_subsequent = 1; +float autocvar_hud_panel_centerprint_fade_subsequent_passone = 3; +float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha = 0.5; +float autocvar_hud_panel_centerprint_fade_subsequent_passtwo = 10; +float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha = 0.5; +float autocvar_hud_panel_centerprint_fade_subsequent_minfontsize = 0.75; +float autocvar_hud_panel_centerprint_fade_minfontsize = 0; bool autocvar_hud_panel_centerprint_flip; float autocvar_hud_panel_centerprint_fontscale; float autocvar_hud_panel_centerprint_time; @@ -353,8 +353,8 @@ float autocvar_hud_panel_weapons_timeout; int autocvar_hud_panel_weapons_timeout_effect; float autocvar_hud_panel_weapons_timeout_fadebgmin; float autocvar_hud_panel_weapons_timeout_fadefgmin; -var float autocvar_hud_panel_weapons_timeout_speed_in = 0.25; -var float autocvar_hud_panel_weapons_timeout_speed_out = 0.75; +float autocvar_hud_panel_weapons_timeout_speed_in = 0.25; +float autocvar_hud_panel_weapons_timeout_speed_out = 0.75; vector autocvar_hud_progressbar_acceleration_color; vector autocvar_hud_progressbar_acceleration_neg_color; float autocvar_hud_progressbar_alpha; @@ -397,9 +397,9 @@ bool autocvar_scoreboard_accuracy; bool autocvar_scoreboard_accuracy_doublerows; bool autocvar_scoreboard_accuracy_nocolors; float autocvar_scoreboard_alpha_bg; -var float autocvar_scoreboard_alpha_fg = 1.0; -var float autocvar_scoreboard_alpha_name = 0.9; -var float autocvar_scoreboard_alpha_name_self = 1; +float autocvar_scoreboard_alpha_fg = 1.0; +float autocvar_scoreboard_alpha_name = 0.9; +float autocvar_scoreboard_alpha_name_self = 1; float autocvar_scoreboard_bg_scale; float autocvar_scoreboard_border_thickness; float autocvar_scoreboard_color_bg_b; @@ -407,11 +407,11 @@ float autocvar_scoreboard_color_bg_g; float autocvar_scoreboard_color_bg_r; float autocvar_scoreboard_color_bg_team; string autocvar_scoreboard_columns; -var float autocvar_scoreboard_fadeinspeed = 10; -var float autocvar_scoreboard_fadeoutspeed = 5; +float autocvar_scoreboard_fadeinspeed = 10; +float autocvar_scoreboard_fadeoutspeed = 5; bool autocvar_scoreboard_highlight; -var float autocvar_scoreboard_highlight_alpha = 0.10; -var float autocvar_scoreboard_highlight_alpha_self = 0.25; +float autocvar_scoreboard_highlight_alpha = 0.10; +float autocvar_scoreboard_highlight_alpha_self = 0.25; float autocvar_scoreboard_offset_left; float autocvar_scoreboard_offset_right; float autocvar_scoreboard_offset_vertical; @@ -422,17 +422,17 @@ float autocvar_vid_conwidth; float autocvar_vid_pixelheight; float autocvar_viewsize; int autocvar_cl_hitsound; -var float autocvar_cl_hitsound_min_pitch = 0.75; -var float autocvar_cl_hitsound_max_pitch = 1.5; -var float autocvar_cl_hitsound_nom_damage = 25; +float autocvar_cl_hitsound_min_pitch = 0.75; +float autocvar_cl_hitsound_max_pitch = 1.5; +float autocvar_cl_hitsound_nom_damage = 25; float autocvar_cl_hitsound_antispam_time; -var int autocvar_cl_eventchase_death = 1; -var int autocvar_cl_eventchase_nexball = 1; -var float autocvar_cl_eventchase_distance = 140; -var float autocvar_cl_eventchase_speed = 1.3; -var vector autocvar_cl_eventchase_maxs = '12 12 8'; -var vector autocvar_cl_eventchase_mins = '-12 -12 -8'; -var vector autocvar_cl_eventchase_viewoffset = '0 0 20'; +int autocvar_cl_eventchase_death = 1; +int autocvar_cl_eventchase_nexball = 1; +float autocvar_cl_eventchase_distance = 140; +float autocvar_cl_eventchase_speed = 1.3; +vector autocvar_cl_eventchase_maxs = '12 12 8'; +vector autocvar_cl_eventchase_mins = '-12 -12 -8'; +vector autocvar_cl_eventchase_viewoffset = '0 0 20'; float autocvar_cl_lerpexcess; // TODO: int? string autocvar__togglezoom; int autocvar_cl_damageeffect; @@ -457,12 +457,12 @@ string autocvar__cl_playermodel; float autocvar_cl_deathglow; bool autocvar_developer_csqcentities; float autocvar_g_jetpack_attenuation; -var string autocvar_crosshair_hmg = ""; -var vector autocvar_crosshair_hmg_color = '0.2 1.0 0.2'; -var float autocvar_crosshair_hmg_alpha = 1; -var float autocvar_crosshair_hmg_size = 1; -var string autocvar_crosshair_rpc = ""; -var vector autocvar_crosshair_rpc_color = '0.2 1.0 0.2'; -var float autocvar_crosshair_rpc_alpha = 1; -var float autocvar_crosshair_rpc_size = 1; +string autocvar_crosshair_hmg = ""; +vector autocvar_crosshair_hmg_color = '0.2 1.0 0.2'; +float autocvar_crosshair_hmg_alpha = 1; +float autocvar_crosshair_hmg_size = 1; +string autocvar_crosshair_rpc = ""; +vector autocvar_crosshair_rpc_color = '0.2 1.0 0.2'; +float autocvar_crosshair_rpc_alpha = 1; +float autocvar_crosshair_rpc_size = 1; int autocvar_cl_nade_timer; diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index 94770b815..70eb08128 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -58,10 +58,10 @@ string hud_skin_prev; vector myteamcolors; entity highlightedPanel_backup; -var vector panel_pos_backup; -var vector panel_size_backup; +vector panel_pos_backup; +vector panel_size_backup; -var vector panel_size_copied; +vector panel_size_copied; entity panel; .string panel_name; @@ -76,21 +76,21 @@ entity panel; .float current_panel_bg_padding; .float current_panel_fg_alpha; .float update_time; -var float panel_enabled; -var vector panel_pos; -var vector panel_size; -var string panel_bg_str; // "_str" vars contain the raw value of the cvar, non-"_str" contains what hud.qc code should use -var vector panel_bg_color; -var string panel_bg_color_str; -var float panel_bg_color_team; -var string panel_bg_color_team_str; -var float panel_fg_alpha; -var float panel_bg_alpha; -var string panel_bg_alpha_str; -var float panel_bg_border; -var string panel_bg_border_str; -var float panel_bg_padding; -var string panel_bg_padding_str; +float panel_enabled; +vector panel_pos; +vector panel_size; +string panel_bg_str; // "_str" vars contain the raw value of the cvar, non-"_str" contains what hud.qc code should use +vector panel_bg_color; +string panel_bg_color_str; +float panel_bg_color_team; +string panel_bg_color_team_str; +float panel_fg_alpha; +float panel_bg_alpha; +string panel_bg_alpha_str; +float panel_bg_border; +string panel_bg_border_str; +float panel_bg_padding; +string panel_bg_padding_str; .void() panel_draw; diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 71dfdeff2..a07ad14f9 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -1,6 +1,6 @@ entity players; entity teams; -var float team_count; // real teams +float team_count; // real teams void AuditLists() { @@ -260,11 +260,11 @@ void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, } // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box -var float _drawpic_imgaspect; -var vector _drawpic_imgsize; -var vector _drawpic_sz; -var float _drawpic_oldsz; -var string _drawpic_picpath; +float _drawpic_imgaspect; +vector _drawpic_imgsize; +vector _drawpic_sz; +float _drawpic_oldsz; +string _drawpic_picpath; #define drawpic_aspect(pos,pic,mySize,color,theAlpha,drawflag)\ do {\ _drawpic_imgsize = draw_getimagesize(pic);\ diff --git a/qcsrc/client/movetypes.qh b/qcsrc/client/movetypes.qh index 72beb6a4a..db2266dfa 100644 --- a/qcsrc/client/movetypes.qh +++ b/qcsrc/client/movetypes.qh @@ -14,7 +14,7 @@ .float move_nomonsters; // -1 for MOVE_NORMAL, otherwise a MOVE_ constant // should match sv_gameplayfix_fixedcheckwatertransition -var float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1; +float autocvar_cl_gameplayfix_fixedcheckwatertransition = 1; void Movetype_Physics_MatchTicrate(float tr, bool sloppy); void Movetype_Physics_MatchServer(bool sloppy); diff --git a/qcsrc/client/vehicles/vehicles.qc b/qcsrc/client/vehicles/vehicles.qc index 04f13af14..6f9a25a41 100644 --- a/qcsrc/client/vehicles/vehicles.qc +++ b/qcsrc/client/vehicles/vehicles.qc @@ -24,8 +24,8 @@ const int RSM_FLARE = 2; const int RSM_LAST = 2; entity dropmark; -var float autocvar_cl_vehicles_hudscale = 0.5; -var float autocvar_cl_vehicles_hudalpha = 0.75; +float autocvar_cl_vehicles_hudscale = 0.5; +float autocvar_cl_vehicles_hudalpha = 0.75; const string raptor_ico = "gfx/vehicles/raptor.tga"; const string raptor_gun = "gfx/vehicles/raptor_guns.tga"; diff --git a/qcsrc/common/buffs.qh b/qcsrc/common/buffs.qh index bf8b40d5d..d2ba5f01b 100644 --- a/qcsrc/common/buffs.qh +++ b/qcsrc/common/buffs.qh @@ -12,8 +12,8 @@ float BUFF_LAST = 1; .float skin; // buff skin #define REGISTER_BUFF(hname,sname,NAME,bskin,bcolor) \ - var float BUFF_##NAME; \ - var entity Buff_Type##sname; \ + float BUFF_##NAME; \ + entity Buff_Type##sname; \ void RegisterBuffs_##sname() \ { \ BUFF_##NAME = BUFF_LAST * 2; \ diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 71b10c4c6..e4e0ce7fa 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -934,32 +934,32 @@ void Send_Notification_WOCOVA( // MAKE SURE THIS IS ALWAYS SYNCHRONIZED WITH THE DUMP // NOTIFICATIONS FUNCTION IN THE .QC FILE! -#define NOTIF_ADD_AUTOCVAR(name,default) var float autocvar_notification_##name = default; - -var float autocvar_notification_show_location = false; -var string autocvar_notification_show_location_string = ""; //_(" at the %s"); -var float autocvar_notification_show_sprees = true; -var float autocvar_notification_show_sprees_info = 3; // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker -var float autocvar_notification_show_sprees_info_newline = true; -var float autocvar_notification_show_sprees_info_specialonly = true; -var float autocvar_notification_errors_are_fatal = true; -var float autocvar_notification_lifetime_runtime = 0.5; -var float autocvar_notification_lifetime_mapload = 10; -var float autocvar_notification_debug = false; +#define NOTIF_ADD_AUTOCVAR(name,default) float autocvar_notification_##name = default; + +float autocvar_notification_show_location = false; +string autocvar_notification_show_location_string = ""; //_(" at the %s"); +float autocvar_notification_show_sprees = true; +float autocvar_notification_show_sprees_info = 3; // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker +float autocvar_notification_show_sprees_info_newline = true; +float autocvar_notification_show_sprees_info_specialonly = true; +float autocvar_notification_errors_are_fatal = true; +float autocvar_notification_lifetime_runtime = 0.5; +float autocvar_notification_lifetime_mapload = 10; +float autocvar_notification_debug = false; #ifdef SVQC .float FRAG_VERBOSE; void Notification_GetCvars(void); -var float autocvar_notification_server_allows_location = 1; // 0 = no, 1 = yes +float autocvar_notification_server_allows_location = 1; // 0 = no, 1 = yes #else -var float autocvar_notification_item_centerprinttime = 1.5; +float autocvar_notification_item_centerprinttime = 1.5; // 0 = no, 1 = yes, 2 = forced on for all MSG_INFO notifs // DISABLED IN CODE, BUT ENABLED IN CONFIG FOR COMPATIBILITY WITH OLD CLIENTS -var float autocvar_notification_allow_chatboxprint = 0; +float autocvar_notification_allow_chatboxprint = 0; -var float autocvar_notification_show_sprees_center = true; -var float autocvar_notification_show_sprees_center_specialonly = true; +float autocvar_notification_show_sprees_center = true; +float autocvar_notification_show_sprees_center_specialonly = true; #endif diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index 6a66380c2..1e132eab7 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -85,7 +85,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status); //string autocvar_g_playerstats_uri; string autocvar_g_playerstats_gamereport_ladder; -var string autocvar_g_playerstats_gamereport_uri = "http://stats.xonotic.org/stats/submit"; +string autocvar_g_playerstats_gamereport_uri = "http://stats.xonotic.org/stats/submit"; const float PS_B_STATUS_ERROR = -2; const float PS_B_STATUS_IDLE = -1; @@ -93,7 +93,7 @@ const float PS_B_STATUS_WAITING = 0; const float PS_B_STATUS_RECEIVED = 1; const float PS_B_STATUS_UPDATING = 2; .float playerstats_basicstatus; -var string autocvar_g_playerstats_playerbasic_uri = "http://stats.xonotic.org"; +string autocvar_g_playerstats_playerbasic_uri = "http://stats.xonotic.org"; void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest); void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer); @@ -106,9 +106,9 @@ const float PS_D_STATUS_ERROR = -2; const float PS_D_STATUS_IDLE = -1; const float PS_D_STATUS_WAITING = 0; const float PS_D_STATUS_RECEIVED = 1; -var float PlayerStats_PlayerDetail_Status = PS_D_STATUS_IDLE; -var string autocvar_g_playerstats_playerdetail_uri = "http://stats.xonotic.org/player/me"; -var float autocvar_g_playerstats_playerdetail_autoupdatetime = 1800; // automatically update every 30 minutes anyway +float PlayerStats_PlayerDetail_Status = PS_D_STATUS_IDLE; +string autocvar_g_playerstats_playerdetail_uri = "http://stats.xonotic.org/player/me"; +float autocvar_g_playerstats_playerdetail_autoupdatetime = 1800; // automatically update every 30 minutes anyway void PlayerStats_PlayerDetail(void); void PlayerStats_PlayerDetail_CheckUpdate(void); void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status); diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index ff2705c19..d4e3ccd5a 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -238,7 +238,7 @@ void WriteInt72_t(float dest, vector val); #define string_null nil #else var void func_null(void); -var string string_null; +string string_null; #endif float float2range11(float f); float float2range01(float f); @@ -371,16 +371,16 @@ void backtrace(string msg); // color code replace, place inside of sprintf and parse the string... defaults described as constants // foreground/normal colors -var string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green // primary priority (important names, etc) -var string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc) -var string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue // tertiary priority or relatively inconsequential text -var string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red // notice/attention grabbing texting +string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green // primary priority (important names, etc) +string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc) +string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue // tertiary priority or relatively inconsequential text +string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red // notice/attention grabbing texting // "kill" colors -var string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red // "bad" or "dangerous" text (death messages against you, kill notifications, etc) -var string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type -var string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue // "good" or "beneficial" text (you fragging someone, etc) +string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red // "bad" or "dangerous" text (death messages against you, kill notifications, etc) +string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type +string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue // "good" or "beneficial" text (you fragging someone, etc) // background color -var string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text +string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text string CCR(string input); diff --git a/qcsrc/common/weapons/w_vortex.qc b/qcsrc/common/weapons/w_vortex.qc index b7cdc85a2..2ab35a47b 100644 --- a/qcsrc/common/weapons/w_vortex.qc +++ b/qcsrc/common/weapons/w_vortex.qc @@ -297,7 +297,7 @@ float W_Vortex(float req) } #endif #ifdef CSQC -var float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO +float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO float W_Vortex(float req) { switch(req) diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index fdf36f9c0..78150ddd5 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -20,8 +20,8 @@ * IN THE SOFTWARE. */ -var float autocvar_cl_lerpanim_maxdelta_framegroups = 0.1; -var float autocvar_cl_nolerp = 0; +float autocvar_cl_lerpanim_maxdelta_framegroups = 0.1; +float autocvar_cl_nolerp = 0; .float csqcmodel_lerpfrac; .float csqcmodel_lerpfrac2; diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 9ed8ed630..f4e9339f3 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -20,7 +20,7 @@ * IN THE SOFTWARE. */ -var float autocvar_cl_movement_errorcompensation = 0; +float autocvar_cl_movement_errorcompensation = 0; // engine stuff const int REFDEFFLAG_TELEPORTED = 1; diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh index 437c49bf7..d44f6577e 100644 --- a/qcsrc/menu/skin.qh +++ b/qcsrc/menu/skin.qh @@ -1,8 +1,8 @@ #define SKINBEGIN -#define SKINVECTOR(name,def) var vector SKIN##name = def -#define SKINFLOAT(name,def) var float SKIN##name = def +#define SKINVECTOR(name,def) vector SKIN##name = def +#define SKINFLOAT(name,def) float SKIN##name = def //#define SKINSTRING(name,def) const string SKIN##name = def -#define SKINSTRING(name,def) var string SKIN##name = def +#define SKINSTRING(name,def) string SKIN##name = def #define SKINEND #include "skin-customizables.inc" #undef SKINEND diff --git a/qcsrc/menu/xonotic/keybinder.qc b/qcsrc/menu/xonotic/keybinder.qc index caf61a9d9..73042024b 100644 --- a/qcsrc/menu/xonotic/keybinder.qc +++ b/qcsrc/menu/xonotic/keybinder.qc @@ -38,7 +38,7 @@ const float MAX_KEYS_PER_FUNCTION = 2; const float MAX_KEYBINDS = 256; string Xonotic_KeyBinds_Functions[MAX_KEYBINDS]; string Xonotic_KeyBinds_Descriptions[MAX_KEYBINDS]; -var float Xonotic_KeyBinds_Count = -1; +float Xonotic_KeyBinds_Count = -1; void Xonotic_KeyBinds_Read() { diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 301e27cff..98f0aba1b 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -156,7 +156,7 @@ float category_draw_count; #define SLIST_CATEGORY_AUTOCVAR(name) autocvar_menu_slist_categories_##name##_override #define SLIST_CATEGORY(name,enoverride,dioverride,str) \ float name; \ - var string SLIST_CATEGORY_AUTOCVAR(name) = enoverride; + string SLIST_CATEGORY_AUTOCVAR(name) = enoverride; SLIST_CATEGORIES #undef SLIST_CATEGORY diff --git a/qcsrc/menu/xonotic/textslider.qc b/qcsrc/menu/xonotic/textslider.qc index 844b3efed..dabd1b1a6 100644 --- a/qcsrc/menu/xonotic/textslider.qc +++ b/qcsrc/menu/xonotic/textslider.qc @@ -56,8 +56,8 @@ void XonoticTextSlider_loadCvars(entity me) if (!me.cvarName) return; - var float n = tokenize_console(me.cvarName); - var string s = cvar_string(argv(0)); + float n = tokenize_console(me.cvarName); + string s = cvar_string(argv(0)); float i; for(i = 1; i < n; ++i) s = strcat(s, " ", cvar_string(argv(i))); @@ -80,7 +80,7 @@ void XonoticTextSlider_saveCvars(entity me) if(me.value >= 0 && me.value < me.nValues) { - var float n = tokenize_console(me.cvarName); + float n = tokenize_console(me.cvarName); if(n == 1) { // this is a special case to allow spaces in the identifiers @@ -90,7 +90,7 @@ void XonoticTextSlider_saveCvars(entity me) else { float i; - var float m = tokenize_console(strcat(me.cvarName, " ", me.getIdentifier(me))); + float m = tokenize_console(strcat(me.cvarName, " ", me.getIdentifier(me))); if(m == n + 1) { for(i = 0; i < n; ++i) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index ba5da4fca..95a7439a6 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -516,9 +516,9 @@ float preMenuInit() string campaign_name_previous; float campaign_won_previous; #ifdef WATERMARK -var string autocvar_menu_watermark = WATERMARK; +string autocvar_menu_watermark = WATERMARK; #else -var string autocvar_menu_watermark = ""; +string autocvar_menu_watermark = ""; #endif void postMenuDraw() { diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index de5aa0bec..4ef4ee379 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -400,7 +400,7 @@ float autocvar_g_instagib_invis_alpha; #define autocvar_g_mirrordamage cvar("g_mirrordamage") #define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual") -var float autocvar_g_movement_highspeed = 1; +float autocvar_g_movement_highspeed = 1; float autocvar_g_multijump; float autocvar_g_multijump_add; float autocvar_g_multijump_speed; @@ -583,7 +583,7 @@ float autocvar_snd_soundradius; float autocvar_spawn_debug; float autocvar_speedmeter; float autocvar_sv_accelerate; -var float autocvar_sv_accuracy_data_share = 1; +float autocvar_sv_accuracy_data_share = 1; string autocvar_sv_adminnick; float autocvar_sv_airaccel_qw; float autocvar_sv_airaccel_qw_stretchfactor; diff --git a/qcsrc/server/g_tetris.qc b/qcsrc/server/g_tetris.qc index 6fb88e436..00daebf63 100644 --- a/qcsrc/server/g_tetris.qc +++ b/qcsrc/server/g_tetris.qc @@ -24,7 +24,7 @@ float tet_vs_current_timeout; // 2 = game over // 3 = waiting for VS players -var float tet_high_score = 0; +float tet_high_score = 0; const vector TET_START_PIECE_POS = '5 1 0'; const float TET_LINES = 22; @@ -688,7 +688,7 @@ float BastetPiece() bastet_profile_evaluate_time = 0; bastet_profile_checkmetrics_time = 0; - var float t1 = gettime(GETTIME_HIRES); + float t1 = gettime(GETTIME_HIRES); b = buf_create(); bastet_piece[0] = 1; bastet_score[0] = BastetSearch(b, 1, TET_START_PIECE_POS_x, 1+TET_START_PIECE_POS_y, TET_START_PIECE_POS_y, TET_WIDTH) + 100 * random() + bastet_piecetime[0]; buf_del(b); b = buf_create(); bastet_piece[1] = 2; bastet_score[1] = BastetSearch(b, 2, TET_START_PIECE_POS_x, 1+TET_START_PIECE_POS_y, TET_START_PIECE_POS_y, TET_WIDTH) + 100 * random() + bastet_piecetime[1]; buf_del(b); @@ -698,7 +698,7 @@ float BastetPiece() b = buf_create(); bastet_piece[5] = 6; bastet_score[5] = BastetSearch(b, 6, TET_START_PIECE_POS_x, 1+TET_START_PIECE_POS_y, TET_START_PIECE_POS_y, TET_WIDTH) + 100 * random() + bastet_piecetime[5]; buf_del(b); b = buf_create(); bastet_piece[6] = 7; bastet_score[6] = BastetSearch(b, 7, TET_START_PIECE_POS_x, 1+TET_START_PIECE_POS_y, TET_START_PIECE_POS_y, TET_WIDTH) + 100 * random() + bastet_piecetime[6]; buf_del(b); - var float t2 = gettime(GETTIME_HIRES); + float t2 = gettime(GETTIME_HIRES); dprintf("Time taken: %.6f seconds (of this, ev = %.2f%%, cm = %.2f%%)\n", t2 - t1, 100 * bastet_profile_evaluate_time / (t2 - t1), 100 * bastet_profile_checkmetrics_time / (t2 - t1)); // sort diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 0f3c8f608..ce28b4197 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -634,8 +634,8 @@ float g_weapon_stay; float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still needs done? { - var float i = weaponinfo.weapon; - var float d = 0; + float i = weaponinfo.weapon; + float d = 0; if (!i) return 0; @@ -659,7 +659,7 @@ float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still ne if(!g_cts && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns d = 0; - var float t = weaponinfo.weaponstartoverride; + float t = weaponinfo.weaponstartoverride; //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n")); diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index f0b6fde95..4f33719bb 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -1,8 +1,8 @@ float autocvar_g_onslaught_spawn_at_controlpoints; float autocvar_g_onslaught_spawn_at_generator; float autocvar_g_onslaught_cp_proxydecap; -var float autocvar_g_onslaught_cp_proxydecap_distance = 512; -var float autocvar_g_onslaught_cp_proxydecap_dps = 100; +float autocvar_g_onslaught_cp_proxydecap_distance = 512; +float autocvar_g_onslaught_cp_proxydecap_dps = 100; void onslaught_generator_updatesprite(entity e); void onslaught_controlpoint_updatesprite(entity e); diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh index affdccbfc..6b0c317c4 100644 --- a/qcsrc/server/t_items.qh +++ b/qcsrc/server/t_items.qh @@ -62,14 +62,14 @@ const int ISF_SIZE = 128; #ifdef CSQC -var float autocvar_cl_animate_items = 1; -var float autocvar_cl_ghost_items = 0.45; -var vector autocvar_cl_ghost_items_color = '-1 -1 -1'; -var float autocvar_cl_fullbright_items = 0; -var vector autocvar_cl_weapon_stay_color = '2 0.5 0.5'; -var float autocvar_cl_weapon_stay_alpha = 0.75; -var float autocvar_cl_simple_items = 0; -var string autocvar_cl_simpleitems_postfix = "_simple"; +float autocvar_cl_animate_items = 1; +float autocvar_cl_ghost_items = 0.45; +vector autocvar_cl_ghost_items_color = '-1 -1 -1'; +float autocvar_cl_fullbright_items = 0; +vector autocvar_cl_weapon_stay_color = '2 0.5 0.5'; +float autocvar_cl_weapon_stay_alpha = 0.75; +float autocvar_cl_simple_items = 0; +string autocvar_cl_simpleitems_postfix = "_simple"; .float spawntime; .float gravity; .vector colormod; diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index 1554f1843..9c1aa461f 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -37,7 +37,7 @@ float autocvar_g_vehicle_bumblebee_cannon_ammo; float autocvar_g_vehicle_bumblebee_cannon_ammo_regen; float autocvar_g_vehicle_bumblebee_cannon_ammo_regen_pause; -var float autocvar_g_vehicle_bumblebee_cannon_lock = 0; +float autocvar_g_vehicle_bumblebee_cannon_lock = 0; float autocvar_g_vehicle_bumblebee_cannon_turnspeed; float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down; @@ -70,9 +70,9 @@ float autocvar_g_vehicle_bumblebee_blowup_radius; float autocvar_g_vehicle_bumblebee_blowup_coredamage; float autocvar_g_vehicle_bumblebee_blowup_edgedamage; float autocvar_g_vehicle_bumblebee_blowup_forceintensity; -var vector autocvar_g_vehicle_bumblebee_bouncepain; +vector autocvar_g_vehicle_bumblebee_bouncepain; -var float autocvar_g_vehicle_bumblebee = 0; +float autocvar_g_vehicle_bumblebee = 0; float bumble_raygun_send(entity to, float sf); diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 8e4b963f2..bea6d43d4 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -3,11 +3,11 @@ float autocvar_g_vehicles_crush_force; float autocvar_g_vehicles_delayspawn; float autocvar_g_vehicles_delayspawn_jitter; -var float autocvar_g_vehicles_vortex_damagerate = 0.5; -var float autocvar_g_vehicles_machinegun_damagerate = 0.5; -var float autocvar_g_vehicles_rifle_damagerate = 0.75; -var float autocvar_g_vehicles_vaporizer_damagerate = 0.001; -var float autocvar_g_vehicles_tag_damagerate = 5; +float autocvar_g_vehicles_vortex_damagerate = 0.5; +float autocvar_g_vehicles_machinegun_damagerate = 0.5; +float autocvar_g_vehicles_rifle_damagerate = 0.75; +float autocvar_g_vehicles_vaporizer_damagerate = 0.001; +float autocvar_g_vehicles_tag_damagerate = 5; float autocvar_g_vehicles; @@ -595,7 +595,7 @@ void vehicles_touch() vehicles_enter(); } -var float autocvar_g_vehicles_allow_bots = 0; +float autocvar_g_vehicles_allow_bots = 0; void vehicles_enter() { // Remove this when bots know how to use vehicles diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index af47d6b01..8704945f2 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -223,7 +223,7 @@ void WarpZone_FixPMove() } #ifndef KEEP_ROLL -var float autocvar_cl_rollkillspeed = 10; +float autocvar_cl_rollkillspeed = 10; #endif void WarpZone_FixView() { diff --git a/qcsrc/warpzonelib/common.qc b/qcsrc/warpzonelib/common.qc index f91301a5f..8b20d0aad 100644 --- a/qcsrc/warpzonelib/common.qc +++ b/qcsrc/warpzonelib/common.qc @@ -32,7 +32,7 @@ void WarpZone_Accumulator_AddInverse(entity acc, entity wz) } .vector(vector, vector) camera_transform; -var float autocvar_cl_warpzone_usetrace = 1; +float autocvar_cl_warpzone_usetrace = 1; vector WarpZone_camera_transform(vector org, vector ang) { vector vf, vr, vu; -- 2.39.2