[nexuiz-commits] r7460 - in branches/nexuiz-2.0: . data data/qcsrc/client data/qcsrc/menu/nexuiz data/qcsrc/server data/scripts
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Aug 18 03:59:03 EDT 2009
Author: div0
Date: 2009-08-18 03:59:02 -0400 (Tue, 18 Aug 2009)
New Revision: 7460
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_video.c
branches/nexuiz-2.0/data/qcsrc/server/bots_scripting.qc
branches/nexuiz-2.0/data/qcsrc/server/havocbot.qc
branches/nexuiz-2.0/data/qcsrc/server/t_items.qc
branches/nexuiz-2.0/data/scripts/shaderlist.txt
branches/nexuiz-2.0/data/tooltips.db
Log:
r7452 | div0 | 2009-08-16 15:22:40 -0400 (Sun, 16 Aug 2009) | 2 lines
saturation slider: start at 0.5, not 1.0
r7453 | mand1nga | 2009-08-17 08:08:30 -0400 (Mon, 17 Aug 2009) | 1 line
Better landing
r7454 | fruitiex | 2009-08-17 09:07:22 -0400 (Mon, 17 Aug 2009) | 2 lines
added tutorial shader to shaderlist.txt
r7455 | fruitiex | 2009-08-17 10:24:54 -0400 (Mon, 17 Aug 2009) | 2 lines
waypoint scale slider added to menu, some fixes in the waypoint dialog
r7456 | mand1nga | 2009-08-17 10:37:43 -0400 (Mon, 17 Aug 2009) | 1 line
Fix bot pausing
r7457 | fruitiex | 2009-08-17 10:37:49 -0400 (Mon, 17 Aug 2009) | 2 lines
moar tooltips
r7458 | fruitiex | 2009-08-17 13:04:53 -0400 (Mon, 17 Aug 2009) | 3 lines
spectator name in lower left corner, sbar_showcurrentammo forced at vid_conwidth < 800 instead of the old solution which
overlapped the voting text
r7459 | div0 | 2009-08-18 02:11:04 -0400 (Tue, 18 Aug 2009) | 2 lines
item waypointsprites: mark them as hideable, as they do not move (sure, this puts people who hide waypoints at a disadvantage, but so does the intended hiding of CTF bases too, as a hidden base cannot report its status via radar)
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/.patchsets 2009-08-18 07:59:02 UTC (rev 7460)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7450
+revisions_applied = 1-7459
Modified: branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/sbar.qc 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/qcsrc/client/sbar.qc 2009-08-18 07:59:02 UTC (rev 7460)
@@ -2212,9 +2212,15 @@
if(spectatee_status == -1)
s = "^1Observing";
else
- s = strcat("^1Spectating ^7", GetPlayerName(spectatee_status - 1));
- o = Sbar_DrawNoteLine(o, s);
+ s = GetPlayerName(spectatee_status - 1);
+ // spectated player name between HUD and chat area, aligned to the left
+ vector pos;
+ pos_x = bottomleft_x;
+ pos_y = bottom_y - 61;
+ s = textShortenToWidth(s, vid_conwidth/2.5/sbar_fontsize_x, stringwidth_colors);
+ drawcolorcodedstring(pos, s, sbar_fontsize, 1, DRAWFLAG_NORMAL);
+ // spectator text in the upper right corner
if(spectatee_status == -1)
s = strcat("^1Press ^3", getcommandkey("primary fire", "+attack"), "^1 to spectate");
else
@@ -2491,19 +2497,16 @@
for (i = 0; i < 4; ++i) {
a = getstati(GetAmmoStat(i)); // how much ammo do we have of type i?
- if(sbar_currentammo)
+ if(sbar_currentammo || vid_conwidth < 800) // force showing current ammo only with conwidths < 800
{
pos = '0 0 0';
if (stat_items & GetAmmoItemCode(i))
{
- if(vid_conwidth >= 800) {
+ if (vid_conwidth < 800)
+ pos_x = 105;
+ else
pos_x = 170;
- pos_y = -40;
- }
- else {
- pos_x = vid_conwidth - 110;
- pos_y = -128;
- }
+ pos_y = -40;
drawpic(bottomleft + pos + '0 1.5 0', "gfx/hud/sb_ammobg", '107 29 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
drawpic(bottomleft + pos + '76 3 0', GetAmmoPicture(i), '24 24 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
@@ -2516,21 +2519,12 @@
else
{
if (a > 0) {
- pos = '0 0 0';
- if (vid_conwidth >= 800)
- switch (i) {
- case 0: pos_x = 114; pos_y = -48; break; // shells
- case 1: pos_x = 114; pos_y = -26; break; // bullets
- case 2: pos_x = 200; pos_y = -48; break; // rockets
- case 3: pos_x = 200; pos_y = -26; break; // cells
- }
- else // if vid_conwidth is lower than 800, ammo will overlap with weapon icons and health so we'll move it to the right
- switch (i) {
- case 0: pos_x = vid_conwidth - 158; pos_y = -150; break; // shells
- case 1: pos_x = vid_conwidth - 158; pos_y = -128; break; // bullets
- case 2: pos_x = vid_conwidth - 84; pos_y = -150; break; // rockets
- case 3: pos_x = vid_conwidth - 84; pos_y = -128; break; // cells
- }
+ switch (i) {
+ case 0: pos_x = 114; pos_y = -48; break; // shells
+ case 1: pos_x = 114; pos_y = -26; break; // bullets
+ case 2: pos_x = 200; pos_y = -48; break; // rockets
+ case 3: pos_x = 200; pos_y = -26; break; // cells
+ }
if (stat_items & GetAmmoItemCode(i))
drawpic(bottomleft + pos + '0 1.5 0', "gfx/hud/sb_ammobg", '80 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_radar.c 2009-08-18 07:59:02 UTC (rev 7460)
@@ -63,22 +63,22 @@
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default Red:"));
+ me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default red:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_r"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default Green:"));
+ me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default green:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_g"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default Blue:"));
+ me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default blue:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_b"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Team brightness:"));
+ me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Team color:"));
me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "sbar_color_bg_team"));
setDependent(e, "viewsize", 0, 100);
me.TR(me);
@@ -86,15 +86,20 @@
me.TD(me, 1, 4, makeNexuizTextLabel(0, "Waypoint settings:"));
me.TR(me);
me.TDempty(me, 0.2);
+ me.TD(me, 1, 3.8, e = makeNexuizCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint scale:"));
+ me.TD(me, 1, 3, e = makeNexuizSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
+ setDependent(e, "cl_hidewaypoints", 0, 0);
+ me.TR(me);
+ me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Show names:"));
me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_shownames"));
e.addValue(e, "Never", "0");
- e.addValue(e, "Team games", "1");
- e.addValue(e, "Always", "2");
+ e.addValue(e, "Teammates", "1");
+ e.addValue(e, "All players", "2");
e.configureNexuizTextSliderValues(e);
- me.TR(me);
- me.TDempty(me, 0.2);
- me.TD(me, 1, 3.8, e = makeNexuizCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
e.onClick = Dialog_Close;
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-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_video.c 2009-08-18 07:59:02 UTC (rev 7460)
@@ -79,7 +79,7 @@
me.TR(me);
me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Saturation:"));
setDependent(e, "r_glsl", 1, 1);
- me.TD(me, 1, 2, e = makeNexuizSlider(0.0, 2.0, 0.05, "r_glsl_saturation"));
+ me.TD(me, 1, 2, e = makeNexuizSlider(0.5, 2.0, 0.05, "r_glsl_saturation"));
setDependent(e, "r_glsl", 1, 1);
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "v_glslgamma", "Use GLSL to handle color control"));
Modified: branches/nexuiz-2.0/data/qcsrc/server/bots_scripting.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/bots_scripting.qc 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/qcsrc/server/bots_scripting.qc 2009-08-18 07:59:02 UTC (rev 7460)
@@ -1017,7 +1017,7 @@
self.movement = '0 0 0';
self.bot_cmd_keys = BOT_CMD_KEY_NONE;
- self.bot_exec_status = self.bot_exec_status | BOT_EXEC_STATUS_PAUSED;
+ self.bot_exec_status |= BOT_EXEC_STATUS_PAUSED;
return CMD_STATUS_FINISHED;
}
@@ -1124,12 +1124,6 @@
// Find command
bot_setcurrentcommand();
- // Keep pressing keys raised by the "presskey" command
- ispressingkey = !!bot_presskeys();
-
- if(bot_cmd==world)
- return ispressingkey;
-
// Ignore all commands except continue when the bot is paused
if(self.bot_exec_status & BOT_EXEC_STATUS_PAUSED)
if(bot_cmd.bot_cmd_type!=BOT_CMD_CONTINUE)
@@ -1142,6 +1136,12 @@
return 1;
}
+ // Keep pressing keys raised by the "presskey" command
+ ispressingkey = !!bot_presskeys();
+
+ if(bot_cmd==world)
+ return ispressingkey;
+
// Handle conditions
if not(bot_cmd.bot_cmd_type==BOT_CMD_FI||bot_cmd.bot_cmd_type==BOT_CMD_ELSE)
if(self.bot_cmd_condition_status & CMD_CONDITION_TRUE && self.bot_cmd_condition_status & CMD_CONDITION_FALSE_BLOCK)
Modified: branches/nexuiz-2.0/data/qcsrc/server/havocbot.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/havocbot.qc 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/qcsrc/server/havocbot.qc 2009-08-18 07:59:02 UTC (rev 7460)
@@ -334,14 +334,20 @@
// Landing
if(self.aistatus & AI_STATUS_JETPACK_LANDING)
{
- // TODO: more accurate landing (with optimum fuel usage)
- vector p = self.origin - self.goalcurrent.origin; p_z = 0;
- if( vlen(p) < max(cvar("g_jetpack_maxspeed_side"), vlen(self.velocity)))
+ // Calculate brake distance in xy
+ float db, v, d;
+ vector dxy;
+
+ dxy = self.origin - self.goalcurrent.origin; dxy_z = 0;
+ d = vlen(dxy);
+ v = vlen(self.velocity - self.velocity_z * '0 0 1');
+ db = (pow(v,2) / (cvar("g_jetpack_acceleration_side") * 2)) + 100;
+ // dprint("distance ", ftos(ceil(d)), " velocity ", ftos(ceil(v)), " brake at ", ftos(ceil(db)), "\n");
+ if(d < db || d < 500)
{
// Brake
- if(fabs(self.velocity_x)>maxspeed)
+ if(fabs(self.velocity_x)>maxspeed*0.3)
{
- self.BUTTON_HOOK = TRUE;
self.movement_x = dir * v_forward * -maxspeed;
return;
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/t_items.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/t_items.qc 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/qcsrc/server/t_items.qc 2009-08-18 07:59:02 UTC (rev 7460)
@@ -98,7 +98,7 @@
}
if(name)
{
- WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, FALSE);
+ WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE);
if(self.waypointsprite_attached)
{
WaypointSprite_UpdateTeamRadar(self.waypointsprite_attached, RADARICON_POWERUP, rgb);
Modified: branches/nexuiz-2.0/data/scripts/shaderlist.txt
===================================================================
--- branches/nexuiz-2.0/data/scripts/shaderlist.txt 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/scripts/shaderlist.txt 2009-08-18 07:59:02 UTC (rev 7460)
@@ -65,5 +65,6 @@
tree
tuba
turrets
+tutorial
tznex01
water
Modified: branches/nexuiz-2.0/data/tooltips.db
===================================================================
--- branches/nexuiz-2.0/data/tooltips.db 2009-08-18 06:11:04 UTC (rev 7459)
+++ branches/nexuiz-2.0/data/tooltips.db 2009-08-18 07:59:02 UTC (rev 7460)
@@ -70,7 +70,7 @@
\crosshair_color_green\Green color component of the crosshair color
\crosshair_color_blue\Blue color component of the crosshair color
\sbar_hudselector\Use the old HUD layout
-\NexuizMultiplayerDialog/Radar, HUD & Waypoints...\Adjust the radar and waypoint settings
+\NexuizMultiplayerDialog/Radar, HUD & Waypoints...\Adjust the radar, HUD and waypoints
\_cl_name\Name under which you will appear in the game
\NexuizSettingsDialog\Change the game settings
@@ -201,12 +201,14 @@
\cl_teamradar_scale\-
\cl_teamradar_foreground_alpha\-
\cl_teamradar_background_alpha\Opacity value of the radar background
+\viewsize\Enable/disable the HUD background
\sbar_alpha_bg\Opacity value of the HUD background
\sbar_color_bg_r\Red color component of the HUD background
\sbar_color_bg_g\Green color component of the HUD background
\sbar_color_bg_b\Blue color component of the HUD background
\sbar_color_bg_team\Team color saturation of the HUD background
\cl_hidewaypoints\Show various gametype specific waypoints
+\g_waypointsprite_scale\Scale multiplier of the waypoints
\cl_shownames\Show the name of the player you are aiming at
\crosshair_hittest\None: do not do hit tests for the crosshair; TrueAim: blur the crosshair when you would not hit the wall; Enemies: also enlarge the crosshair when you would hit an enemy
More information about the nexuiz-commits
mailing list