[nexuiz-commits] r8049 - in branches/nexuiz-2.0: . data data/qcsrc/common data/qcsrc/menu data/qcsrc/menu/nexuiz data/qcsrc/server misc/tools

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Oct 4 07:17:01 EDT 2009


Author: div0
Date: 2009-10-04 07:17:00 -0400 (Sun, 04 Oct 2009)
New Revision: 8049

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/balance.cfg
   branches/nexuiz-2.0/data/balance25.cfg
   branches/nexuiz-2.0/data/balanceHavoc.cfg
   branches/nexuiz-2.0/data/balanceSamual.cfg
   branches/nexuiz-2.0/data/defaultNexuiz.cfg
   branches/nexuiz-2.0/data/effectinfo.txt
   branches/nexuiz-2.0/data/qcsrc/common/items.qc
   branches/nexuiz-2.0/data/qcsrc/menu/gamecommand.qc
   branches/nexuiz-2.0/data/qcsrc/menu/menu.qc
   branches/nexuiz-2.0/data/qcsrc/menu/menu.qh
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_video.c
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c
   branches/nexuiz-2.0/data/qcsrc/server/constants.qh
   branches/nexuiz-2.0/misc/tools/makebuild.sh
Log:
r8038 | div0 | 2009-10-03 14:19:09 -0400 (Sat, 03 Oct 2009) | 1 line
upload versioned builds to another dir
r8039 | samual | 2009-10-03 14:53:20 -0400 (Sat, 03 Oct 2009) | 1 line
balanceSamual.cfg: Rebalance: Change a few small things #2
r8040 | mand1nga | 2009-10-03 14:57:29 -0400 (Sat, 03 Oct 2009) | 1 line
Lowered the priority of fireball in bot weapon preferences. Some other minor changes matching current balance. TODO: Make bot weapon preferences balance dependent.
r8041 | div0 | 2009-10-03 16:41:36 -0400 (Sat, 03 Oct 2009) | 1 line
makebuild fix
r8042 | div0 | 2009-10-03 17:42:16 -0400 (Sat, 03 Oct 2009) | 2 lines
unmark fireball for LMS
r8043 | samual | 2009-10-03 20:07:29 -0400 (Sat, 03 Oct 2009) | 1 line
balanceSamual.cfg: Rebalance: Change a few small things #3 + g_weaponreplace_fireball 0 until I can figure out a good balance for it.
r8044 | samual | 2009-10-03 20:57:15 -0400 (Sat, 03 Oct 2009) | 1 line
Make electro_muzzleflash be blue instead of yellow (Let me know if this is done wrong, first time editing effectinfo really.)
r8045 | div0 | 2009-10-04 06:12:35 -0400 (Sun, 04 Oct 2009) | 2 lines
menu_vid_scale: add a slider to control size of HUD items, menu font, etc. (conwidth)
r8046 | div0 | 2009-10-04 06:13:27 -0400 (Sun, 04 Oct 2009) | 2 lines
make these cvars setas
r8047 | div0 | 2009-10-04 06:20:16 -0400 (Sun, 04 Oct 2009) | 2 lines
fix tiny bug regarding conwidth/height updating
r8048 | div0 | 2009-10-04 07:08:49 -0400 (Sun, 04 Oct 2009) | 2 lines
less visible rifle trail


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/.patchsets	2009-10-04 11:17:00 UTC (rev 8049)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-7990,7993-8036
+revisions_applied = 1-7945,7948-7948,7951-7990,7993-8048

Modified: branches/nexuiz-2.0/data/balance.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance.cfg	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/balance.cfg	2009-10-04 11:17:00 UTC (rev 8049)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 7181a5458cca8abd093e2032a13affb3
+set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map

Modified: branches/nexuiz-2.0/data/balance25.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance25.cfg	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/balance25.cfg	2009-10-04 11:17:00 UTC (rev 8049)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 7181a5458cca8abd093e2032a13affb3
+set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map

Modified: branches/nexuiz-2.0/data/balanceHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceHavoc.cfg	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/balanceHavoc.cfg	2009-10-04 11:17:00 UTC (rev 8049)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 7181a5458cca8abd093e2032a13affb3
+set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map

Modified: branches/nexuiz-2.0/data/balanceSamual.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceSamual.cfg	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/balanceSamual.cfg	2009-10-04 11:17:00 UTC (rev 8049)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 7181a5458cca8abd093e2032a13affb3
+set cvar_check_balance 9b590c8f7c3065d917ac8e2e5e842a88
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map
@@ -25,7 +25,7 @@
 set g_weaponreplace_hlac ""
 set g_weaponreplace_campingrifle ""
 set g_weaponreplace_tuba ""
-set g_weaponreplace_fireball ""
+set g_weaponreplace_fireball 0 // Don't kill me div0, just for now until I figure out a good balance for it.
 // }}}
 
 // {{{ starting gear
@@ -129,7 +129,7 @@
 set g_balance_pause_health_regen_spawn 0
 set g_balance_health_rot 0
 set g_balance_health_rotlinear 5
-set g_balance_pause_health_rot 1
+set g_balance_pause_health_rot 3
 set g_balance_pause_health_rot_spawn 1
 set g_balance_health_regenstable 100
 set g_balance_health_rotstable 100
@@ -182,7 +182,7 @@
 set g_balance_powerup_invincible_takedamage 0.2
 set g_balance_powerup_invincible_time 30
 set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 4
+set g_balance_powerup_strength_force 3
 set g_balance_powerup_strength_time 30
 set g_balance_powerup_strength_selfdamage 1.5
 set g_balance_powerup_strength_selfforce 1.5
@@ -233,7 +233,7 @@
 //   {{{ shotgun
 set g_balance_shotgun_primary_bullets 6
 set g_balance_shotgun_primary_damage 10
-set g_balance_shotgun_primary_force 50
+set g_balance_shotgun_primary_force 0
 set g_balance_shotgun_primary_spread 0.06
 set g_balance_shotgun_primary_refire 0.5
 set g_balance_shotgun_primary_animtime 0.2
@@ -242,7 +242,7 @@
 set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
 set g_balance_shotgun_secondary_bullets 6
 set g_balance_shotgun_secondary_damage 10
-set g_balance_shotgun_secondary_force 50
+set g_balance_shotgun_secondary_force 0
 set g_balance_shotgun_secondary_spread 0.1
 set g_balance_shotgun_secondary_refire 1.35
 set g_balance_shotgun_secondary_animtime 0.2
@@ -265,7 +265,7 @@
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 //   }}}
 //   {{{ mortar
-set g_balance_grenadelauncher_primary_damage 60
+set g_balance_grenadelauncher_primary_damage 50
 set g_balance_grenadelauncher_primary_edgedamage 38
 set g_balance_grenadelauncher_primary_force 400
 set g_balance_grenadelauncher_primary_radius 140
@@ -275,7 +275,7 @@
 set g_balance_grenadelauncher_primary_refire 0.8
 set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_secondary_damage 70
+set g_balance_grenadelauncher_secondary_damage 60
 set g_balance_grenadelauncher_secondary_edgedamage 38
 set g_balance_grenadelauncher_secondary_force 400
 set g_balance_grenadelauncher_secondary_radius 140
@@ -401,7 +401,7 @@
 set g_balance_rocketlauncher_damage 80
 set g_balance_rocketlauncher_edgedamage 40
 set g_balance_rocketlauncher_force 600
-set g_balance_rocketlauncher_radius 80
+set g_balance_rocketlauncher_radius 90
 set g_balance_rocketlauncher_speed 1600
 set g_balance_rocketlauncher_speedaccel 0
 set g_balance_rocketlauncher_speedstart 1600
@@ -425,18 +425,18 @@
 //   }}}
 //   {{{ porto
 set g_balance_porto_primary_refire 1.5
-set g_balance_porto_primary_speed 2000
+set g_balance_porto_primary_speed 5000
 set g_balance_porto_primary_lifetime 30
 set g_balance_portal_health 200 // these get recharged whenever the portal is used
 set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
 //   }}}
 //   {{{ hook
-set g_balance_hook_primary_fuel 5 // hook monkeys set 0
+set g_balance_hook_primary_fuel 2 // hook monkeys set 0
 set g_balance_hook_primary_refire 0 // hook monkeys set 0
 set g_balance_hook_primary_animtime 0.3 // good shoot anim
 set g_balance_hook_primary_hooked_time_max 0 // infinite
 set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
+set g_balance_hook_primary_hooked_fuel 3 // fuel per second hooked
 set g_balance_hook_secondary_damage 25 // not much
 set g_balance_hook_secondary_edgedamage 5 // not much
 set g_balance_hook_secondary_radius 500 // LOTS

Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-10-04 11:17:00 UTC (rev 8049)
@@ -26,7 +26,7 @@
 seta g_configversion 0	"Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
 
 // default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default c0254c4c1cc8836cd7cc3989f4ad25f4
+set cvar_check_default 091f36c4fb0d7b22bbd2d2fdff8b1447
 
 // Nexuiz version (formatted for machines)
 // used to determine if a client version is compatible
@@ -228,6 +228,11 @@
 vid_fullscreen 1
 vid_width 1024
 vid_height 768
+vid_pixelheight 1
+seta menu_vid_width 1024
+seta menu_vid_height 768
+seta menu_vid_pixelheight 1
+seta menu_vid_scale 0
 // 2D resolution 800x600
 vid_conwidth 800
 vid_conheight 600
@@ -384,9 +389,9 @@
 set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
 set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
 set bot_ai_custom_weapon_priority_distances "300 850"	"Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far "11 16 7 15 14 4 5 8 13 6 1 3 9 2"	"Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid "11 16 9 4 5 3 7 15 14 6 13 8 2 1"	"Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "11 16 7 3 13 14 8 6 4 2 5 15 1"	"Desired weapons for close distances ordered by priority"
+set bot_ai_custom_weapon_priority_far "11 7 15 14 9 4 5 8 13 6 1 3 16 2"	"Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid "11 9 7 16 4 5 3 15 14 6 13 8 2 1"	"Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "11 7 3 13 14 8 6 4 2 5 15 1 16"	"Desired weapons for close distances ordered by priority"
 set bot_ai_weapon_combo 1	"Enable bots to do weapon combos"
 set bot_ai_weapon_combo_threshold 0.3	"Try to make a combo N seconds after the last attack"
 set bot_ai_friends_aware_pickup_radius "500"	"Bots will not pickup items if a team mate is this distance near the item"

Modified: branches/nexuiz-2.0/data/effectinfo.txt
===================================================================
--- branches/nexuiz-2.0/data/effectinfo.txt	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/effectinfo.txt	2009-10-04 11:17:00 UTC (rev 8049)
@@ -1311,7 +1311,7 @@
 effect electro_muzzleflash
 count 1
 type smoke
-color 0x202020 0x404040
+color 0x283880 0x283880 // 0x202020 0x404040
 tex 0 8
 size 5 5
 alpha 256 256 512
@@ -1320,7 +1320,7 @@
 velocitymultiplier 0.01
 lightradius 200
 lightradiusfade 2000
-lightcolor 2 1.5 0.2
+lightcolor 1.5 3 6
 effect electro_muzzleflash
 count 30
 type spark
@@ -4436,7 +4436,7 @@
 effect tr_rifle
 notunderwater
 tex 0 8
-trailspacing 2
+trailspacing 8
 type static
 color 0x202020 0x404040
 size 2 2
@@ -4447,7 +4447,7 @@
 type smoke
 effect tr_rifle
 underwater
-trailspacing 8
+trailspacing 32
 type bubble
 tex 62 62
 color 0x404040 0x808080

Modified: branches/nexuiz-2.0/data/qcsrc/common/items.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/items.qc	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/common/items.qc	2009-10-04 11:17:00 UTC (rev 8049)
@@ -117,7 +117,7 @@
 	register_weapon(WEP_HLAC,             w_hlac,         IT_CELLS,         6,  1, 0, WEP_TYPE_SPLASH,  BOT_PICKUP_RATING_MID,  "hlac",         "hlac",            "Heavy Laser Assault Cannon");
 	register_weapon(WEP_TUBA,             w_tuba,         0,                1, -1, 0, WEP_TYPE_SPLASH,  BOT_PICKUP_RATING_MID,  "tuba",         "tuba",            "@!#%'n Tuba");
 	register_weapon(WEP_CAMPINGRIFLE,     w_campingrifle, IT_NAILS,         3,  1, 0, WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID,  "campingrifle", "campingrifle",    "Rifle");
-	register_weapon(WEP_FIREBALL,         w_fireball,     IT_ROCKETS,       9,  1, 0, WEP_TYPE_SPLASH,  BOT_PICKUP_RATING_MID,  "fireball",     "fireball",        "Fireball");
+	register_weapon(WEP_FIREBALL,         w_fireball,     IT_ROCKETS,       9,  0, 0, WEP_TYPE_SPLASH,  BOT_PICKUP_RATING_MID,  "fireball",     "fireball",        "Fireball");
 
 	register_weapons_done();
 }

Modified: branches/nexuiz-2.0/data/qcsrc/menu/gamecommand.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/gamecommand.qc	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/menu/gamecommand.qc	2009-10-04 11:17:00 UTC (rev 8049)
@@ -68,6 +68,12 @@
 		return;
 	}
 
+	if(argv(0) == "videosettings")
+	{
+		m_goto_video_settings();
+		return;
+	}
+
 	if(argv(0) == "dumptree")
 	{
 		_dumptree_space = "";
@@ -75,6 +81,12 @@
 		return;
 	}
 
+	if(argv(0) == "setresolution")
+	{
+		updateConwidths();
+		return;
+	}
+
 #if 0
 	if(argv(0) == "tokentest")
 	{

Modified: branches/nexuiz-2.0/data/qcsrc/menu/menu.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/menu.qc	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/menu/menu.qc	2009-10-04 11:17:00 UTC (rev 8049)
@@ -40,9 +40,9 @@
 	}
 }
 
+float conwidth_s, conheight_s;
 void UpdateConWidthHeight()
 {
-	float conwidth_s, conheight_s;
 	conwidth_s = conwidth;
 	conheight_s = conheight;
 	conwidth = cvar("vid_conwidth");
@@ -789,3 +789,11 @@
 	// TODO add code to switch back to the skin selector (no idea how to do it now)
 	m_goto("skinselector");
 }
+
+void() m_goto_video_settings =
+{
+	if(!menuInitialized)
+		return;
+	// TODO add code to switch back to the skin selector (no idea how to do it now)
+	m_goto("videosettings");
+}

Modified: branches/nexuiz-2.0/data/qcsrc/menu/menu.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/menu.qh	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/menu/menu.qh	2009-10-04 11:17:00 UTC (rev 8049)
@@ -31,6 +31,7 @@
 void m_display();
 void m_goto(string name);
 void m_goto_skin_selector();
+void m_goto_video_settings();
 .string name;
 
 entity keyGrabber;

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_video.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_video.c	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_video.c	2009-10-04 11:17:00 UTC (rev 8049)
@@ -5,6 +5,7 @@
 	ATTRIB(NexuizVideoSettingsTab, intendedWidth, float, 0.9)
 	ATTRIB(NexuizVideoSettingsTab, rows, float, 17)
 	ATTRIB(NexuizVideoSettingsTab, columns, float, 6.5)
+	ATTRIB(NexuizVideoSettingsTab, name, string, "videosettings")
 ENDCLASS(NexuizVideoSettingsTab)
 entity makeNexuizVideoSettingsTab();
 #endif
@@ -25,6 +26,19 @@
 		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Resolution:"));
 		me.TD(me, 1, 2, e = makeNexuizResolutionSlider());
 	me.TR(me);
+		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Font/UI size:"));
+		me.TD(me, 1, 2, e = makeNexuizTextSlider("menu_vid_scale"));
+			e.addValue(e, "Unreadable", "-1");
+			e.addValue(e, "Tiny", "-0.75");
+			e.addValue(e, "Little", "-0.5");
+			e.addValue(e, "Small", "-0.25");
+			e.addValue(e, "Medium", "0");
+			e.addValue(e, "Large", "0.25");
+			e.addValue(e, "Huge", "0.5");
+			e.addValue(e, "Gigantic", "0.75");
+			e.addValue(e, "Colossal", "1");
+			e.configureNexuizTextSliderValues(e);
+	me.TR(me);
 		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Color depth:"));
 		me.TD(me, 1, 2, e = makeNexuizSlider(16, 32, 16, "vid_bitsperpixel"));
 	me.TR(me);
@@ -93,6 +107,6 @@
 		me.TD(me, 1, 2, e = makeNexuizSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
 
 	me.gotoRC(me, me.rows - 1, 0);
-		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "vid_conwidth $menu_vid_conwidth; vid_conheight $menu_vid_conheight; vid_restart", COMMANDBUTTON_APPLY));
+		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "menu_cmd setresolution; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY));
 }
 #endif

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c	2009-10-04 11:17:00 UTC (rev 8049)
@@ -1,14 +1,58 @@
 #ifdef INTERFACE
 CLASS(NexuizResolutionSlider) EXTENDS(NexuizTextSlider)
 	METHOD(NexuizResolutionSlider, configureNexuizResolutionSlider, void(entity))
-	METHOD(NexuizResolutionSlider, addResolution, void(entity, float, float, float, float))
+	METHOD(NexuizResolutionSlider, addResolution, void(entity, float, float, float))
 	METHOD(NexuizResolutionSlider, loadCvars, void(entity))
 	METHOD(NexuizResolutionSlider, saveCvars, void(entity))
 ENDCLASS(NexuizResolutionSlider)
 entity makeNexuizResolutionSlider();
+void updateConwidths();
 #endif
 
 #ifdef IMPLEMENTATION
+void updateConwidths()
+{
+	vector r, c;
+	float minfactor, maxfactor;
+	float sz, f;
+	r_x = cvar("menu_vid_width");
+	r_y = cvar("menu_vid_height");
+	r_z = cvar("menu_vid_pixelheight");
+	sz = cvar("menu_vid_scale");
+
+	// calculate the base resolution
+	c_z = 0;
+	c_x = 800;
+	c_y = c_x * r_y * r_z / r_x;
+	if(c_y < 600)
+	{
+		c_y = 600;
+		c_x = c_y * r_x / (r_y * r_z);
+	}
+
+	f = min(r_x / c_x, r_y / c_y);
+	if(f < 1)
+		c = c * f; // ensures that c_x <= r_x and c_y <= r_y
+
+	minfactor = min(1, 640 / c_x);             // can be > 1 only if c_x is <640
+	maxfactor = max3(1, r_x / c_x, r_y / c_y); // can be < 1 only if r_x < c_x and r_y < c_y
+	dprint("min factor: ", ftos(minfactor), "\n");
+	dprint("max factor: ", ftos(maxfactor), "\n");
+
+	if(sz < 0)
+		f = 1 - (maxfactor - 1) * sz;
+	else if(sz > 0)
+		f = 1 + (minfactor - 1) * sz;
+	else
+		f = 1;
+	c *= f;
+
+	cvar_set("vid_width", ftos(rint(r_x)));
+	cvar_set("vid_height", ftos(rint(r_y)));
+	cvar_set("vid_pixelheight", ftos(rint(r_z)));
+	cvar_set("vid_conwidth", ftos(rint(c_x)));
+	cvar_set("vid_conheight", ftos(rint(c_y)));
+}
 entity makeNexuizResolutionSlider()
 {
 	entity me;
@@ -16,64 +60,48 @@
 	me.configureNexuizResolutionSlider(me);
 	return me;
 }
-void addResolutionNexuizResolutionSlider(entity me, float w, float h, float cw, float ch)
+void addResolutionNexuizResolutionSlider(entity me, float w, float h, float pixelheight)
 {
-	float f;
-	f = max(cw / w, ch / h);
-	if(f > 1)
-	{
-		cw = rint(cw / f);
-		ch = rint(ch / f);
-	}
-	me.addValue(me, strzone(strcat(ftos(w), "x", ftos(h))), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(cw), " ", ftos(ch))));
+	me.addValue(me, strzone(strcat(ftos(w), "x", ftos(h))), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
 	// FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
 }
 void configureNexuizResolutionSliderNexuizResolutionSlider(entity me)
 {
 	float i;
-	vector r0, r, c;
+	vector r0, r;
 
-	me.configureNexuizTextSlider(me, "vid_width");
+	me.configureNexuizTextSlider(me, "menu_vid_width");
 
-	c = '0 0 0';
 	r0 = '0 0 0';
 	for(i = 0;; ++i)
 	{
 		r = getresolution(i);
 		if(r_x == 0 && r_y == 0)
 			break;
+		if(r_z == 0)
+			r_z = 1; // compat
 		if(r == r0)
 			continue;
 		r0 = r;
 		if(r_x < 640 || r_y < 400)
 			continue;
-		c_x = 800;
-		c_y = rint(c_x * r_y / r_x);
-		if(c_y >= 600)
-		{
-			me.addResolution(me, r_x, r_y, c_x, c_y);
-			continue;
-		}
-		c_y = 600;
-		c_x = rint(c_y * r_x / r_y);
-		me.addResolution(me, r_x, r_y, c_x, c_y);
+		me.addResolution(me, r_x, r_y, r_z);
 	}
 
 	me.configureNexuizTextSliderValues(me);
 }
 void loadCvarsNexuizResolutionSlider(entity me)
 {
-	me.setValueFromIdentifier(me, strcat(cvar_string("vid_width"), " ", cvar_string("vid_height"), " ", cvar_string("menu_vid_conwidth"), " ", cvar_string("menu_vid_conheight")));
+	me.setValueFromIdentifier(me, strcat(cvar_string("menu_vid_width"), " ", cvar_string("menu_vid_height"), " ", cvar_string("menu_vid_pixelheight")));
 }
 void saveCvarsNexuizResolutionSlider(entity me)
 {
 	if(me.value >= 0 || me.value < me.nValues)
 	{
 		tokenize_console(me.getIdentifier(me));
-		cvar_set("vid_width", argv(0));
-		cvar_set("vid_height", argv(1));
-		cvar_set("menu_vid_conwidth", argv(2));
-		cvar_set("menu_vid_conheight", argv(3));
+		cvar_set("menu_vid_width", argv(0));
+		cvar_set("menu_vid_height", argv(1));
+		cvar_set("menu_vid_pixelheight", argv(2));
 	}
 }
 #endif

Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-10-04 11:17:00 UTC (rev 8049)
@@ -1,5 +1,5 @@
-string CVAR_CHECK_DEFAULT = "c0254c4c1cc8836cd7cc3989f4ad25f4";
-string CVAR_CHECK_BALANCE = "7181a5458cca8abd093e2032a13affb3";
+string CVAR_CHECK_DEFAULT = "091f36c4fb0d7b22bbd2d2fdff8b1447";
+string CVAR_CHECK_BALANCE = "9b590c8f7c3065d917ac8e2e5e842a88";
 
 float	FALSE					= 0;
 float	TRUE					= 1;

Modified: branches/nexuiz-2.0/misc/tools/makebuild.sh
===================================================================
--- branches/nexuiz-2.0/misc/tools/makebuild.sh	2009-10-04 11:08:49 UTC (rev 8048)
+++ branches/nexuiz-2.0/misc/tools/makebuild.sh	2009-10-04 11:17:00 UTC (rev 8049)
@@ -340,9 +340,11 @@
 	test)
 		# these builds are public
 		ssh atoffload "sh clean-builds.sh"
-		rsync -vaSHP "$zipdir/nexuiz"*"-$date$ext.zip" "$zipdir/nexuiz"*"-$newest.zip" atoffload:offload.alientrap.org/nexuiz/builds/
+		rsync -vaSHP "$zipdir/nexuiz"*"$date$ext.zip" "$zipdir/nexuiz"*"-$newest.zip" atoffload:offload.alientrap.org/nexuiz/builds/
 		;;
 	*)
+		ssh atoffload "sh clean-builds.sh"
+		rsync -vaSHP "$zipdir/nexuiz"*"$date$ext.zip" "$zipdir/nexuiz"*"-$newest.zip" atoffload:offload.alientrap.org/nexuiz/builds.versioned/
 		cat <<'EOF'
 
 NOTE: This is a RELEASE BUILD.



More information about the nexuiz-commits mailing list