[nexuiz-commits] r8241 - in branches/nexuiz-2.0: . data data/models/weapons data/qcsrc/client data/qcsrc/server data/scripts misc/netradiant-NexuizPack/nexuiz.game/data

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Nov 8 05:38:40 EST 2009


Author: div0
Date: 2009-11-08 05:38:39 -0500 (Sun, 08 Nov 2009)
New Revision: 8241

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/defaultNexuiz.cfg
   branches/nexuiz-2.0/data/models/weapons/g_electro.md3
   branches/nexuiz-2.0/data/models/weapons/g_gl.md3
   branches/nexuiz-2.0/data/models/weapons/g_shotgun.md3
   branches/nexuiz-2.0/data/models/weapons/v_electro.md3
   branches/nexuiz-2.0/data/models/weapons/v_gl.md3
   branches/nexuiz-2.0/data/models/weapons/v_shotgun.md3
   branches/nexuiz-2.0/data/models/weapons/w_electro.zym
   branches/nexuiz-2.0/data/models/weapons/w_gl.zym
   branches/nexuiz-2.0/data/models/weapons/w_shotgun.zym
   branches/nexuiz-2.0/data/qcsrc/client/View.qc
   branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
   branches/nexuiz-2.0/data/qcsrc/server/constants.qh
   branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
   branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
   branches/nexuiz-2.0/data/scripts/electro.shader
   branches/nexuiz-2.0/data/scripts/entities.def
   branches/nexuiz-2.0/data/scripts/shotgun.shader
   branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def
Log:
r8220 | samual | 2009-11-06 16:31:57 -0500 (Fri, 06 Nov 2009) | 1 line
cl_velocityzoom: velocity based zooming of fov -- div0: The bounding on line 200 was needed else it would make avgspeed return a negative value at low fps, I did extensive testing and saw no drawback of this. 
r8221 | samual | 2009-11-06 23:59:33 -0500 (Fri, 06 Nov 2009) | 1 line
Fix sbar_showweaponicons, it needed to be cvar_or("", 1) -- Else it breaks older clients.
r8222 | div0 | 2009-11-07 12:16:16 -0500 (Sat, 07 Nov 2009) | 2 lines
make antilag work again
r8224 | div0 | 2009-11-07 13:28:10 -0500 (Sat, 07 Nov 2009) | 2 lines
remove an unused function
r8225 | m0rfar | 2009-11-07 14:18:10 -0500 (Sat, 07 Nov 2009) | 1 line
Make Radiant load the shaders for electro, gl and sg
r8226 | m0rfar | 2009-11-07 14:20:14 -0500 (Sat, 07 Nov 2009) | 1 line
remove weapon_seeker from entities.def


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/.patchsets	2009-11-08 10:38:39 UTC (rev 8241)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-8219
+revisions_applied = 1-7945,7948-7948,7951-8226

Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-11-08 10:38:39 UTC (rev 8241)
@@ -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 5d48426c72cdfbf78480870c75601f89
+set cvar_check_default 9ede7a7edae0b7ae4c8b7e6517293a6a
 
 // Nexuiz version (formatted for machines)
 // used to determine if a client version is compatible
@@ -216,6 +216,8 @@
 seta crosshair_fireball_color_alpha 1	"crosshair alpha value to display when wielding the fireball"
 seta crosshair_fireball_size 1	"crosshair size when wielding the fireball"
 fov 90
+seta cl_velocityzoom 0	"velocity based zooming of fov, negative values zoom out"
+seta cl_velocityzoomtime 0.3	"time value for averaging speed values"
 seta cl_zoomfactor 5	"how much +zoom will zoom (1-16)"
 seta cl_zoomspeed 3.5	"how fast it will zoom (0.5-16), negative values mean instant zoom"
 seta cl_zoomsensitivity 0	"how zoom changes sensitivity (0 = weakest, 1 = strongest)"

Modified: branches/nexuiz-2.0/data/models/weapons/g_electro.md3
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/g_gl.md3
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/g_shotgun.md3
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/v_electro.md3
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/v_gl.md3
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/v_shotgun.md3
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/w_electro.zym
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/w_gl.zym
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/weapons/w_shotgun.zym
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/qcsrc/client/View.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/View.qc	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/qcsrc/client/View.qc	2009-11-08 10:38:39 UTC (rev 8241)
@@ -134,10 +134,10 @@
 	v = vectoangles(v);
 	return v_y * 0.01745329251994329576;
 }
-
+float avgspeed;
 vector GetCurrentFov(float fov)
 {
-	float zoomsensitivity, zoomspeed, zoomfactor, zoomdir;
+	float zoomsensitivity, zoomspeed, zoomfactor, zoomdir, velocityzoom;
 
 	zoomsensitivity = cvar("cl_zoomsensitivity");
 	zoomfactor = cvar("cl_zoomfactor");
@@ -196,9 +196,15 @@
 		setsensitivityscale(pow(current_viewzoom, 1 - zoomsensitivity));
 	else
 		setsensitivityscale(1);
-
+		
+	velocityzoom = bound(0, drawframetime / max(0.000000001, cvar_or("cl_velocityzoomtime", 0.3)), 1);
+	avgspeed = avgspeed * (1 - velocityzoom) + (vlen(pmove_vel) / 1000) * velocityzoom;
+	velocityzoom = pow(2.718281828459, float2range11(avgspeed * -cvar_or("cl_velocityzoom", 0) / 1) * 1);
+	
+	//print(ftos(avgspeed), " avgspeed, ", ftos(cvar_or("cl_velocityzoom", 0)), " cvar, ", ftos(velocityzoom), " return\n"); // for debugging
+	
 	float frustumx, frustumy, fovx, fovy;
-	frustumy = tan(fov * 0.00872664625997164788) * 0.75 * current_viewzoom;
+	frustumy = tan(fov * 0.00872664625997164788) * 0.75 * current_viewzoom * velocityzoom;
 	frustumx = frustumy * vid_width / vid_height / vid_pixelheight;
 	fovx = atan2(frustumx, 1) / 0.00872664625997164788;
 	fovy = atan2(frustumy, 1) / 0.00872664625997164788;

Modified: branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/sbar.qc	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/qcsrc/client/sbar.qc	2009-11-08 10:38:39 UTC (rev 8241)
@@ -2703,7 +2703,7 @@
 		CSQC_Strength_Timer();
 
 		// weapon icons
-                if(cvar("sbar_showweaponicons")) {
+                if(cvar_or("sbar_showweaponicons", 1)) {
 			x = 1.0;
                		Sbar_DrawWeapon_Clear();
                 	for(i = 1; i <= 24; ++i)

Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-11-08 10:38:39 UTC (rev 8241)
@@ -1,4 +1,4 @@
-string CVAR_CHECK_DEFAULT = "5d48426c72cdfbf78480870c75601f89";
+string CVAR_CHECK_DEFAULT = "9ede7a7edae0b7ae4c8b7e6517293a6a";
 string CVAR_CHECK_BALANCE = "1904952fd0d915f79ab4e6f0622abdb6";
 
 float	FALSE					= 0;

Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-11-08 10:38:39 UTC (rev 8241)
@@ -606,6 +606,7 @@
 	GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
 	GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
 	GetCvars_handleFloat(s, f, cvar_cl_autotaunt, "cl_autotaunt");
+	GetCvars_handleFloat(s, f, cvar_cl_noantilag, "cl_noantilag");
 	GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
 	GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");
 	GetCvars_handleFloat(s, f, cvar_cl_hitsound, "cl_hitsound");
@@ -614,7 +615,6 @@
 	GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromnexuiz, "cl_forceplayermodelsfromnexuiz");
 #endif
 	GetCvars_handleFloatOnce(s, f, cvar_cl_gunalign, "cl_gunalign");
-	GetCvars_handleFloatOnce(s, f, cvar_cl_noantilag, "cl_noantilag");
 
 
 	// fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)

Modified: branches/nexuiz-2.0/data/qcsrc/server/w_common.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_common.qc	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_common.qc	2009-11-08 10:38:39 UTC (rev 8241)
@@ -260,16 +260,6 @@
 	UpdateCSQCProjectile(self);
 }
 
-// a fake logarithm function
-float log(float x)
-{
-	if(x < 0.0001)
-		return 0;
-	if(x > 0.9 && x < 1.1)
-		return x - 1;
-	return 2 * log(sqrt(x));
-}
-
 float W_BallisticBullet_LeaveSolid(entity e, vector vel, float constant)
 {
 	// move the entity along its velocity until it's out of solid, then let it resume

Modified: branches/nexuiz-2.0/data/scripts/electro.shader
===================================================================
--- branches/nexuiz-2.0/data/scripts/electro.shader	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/scripts/electro.shader	2009-11-08 10:38:39 UTC (rev 8241)
@@ -1,4 +1,4 @@
-electro_plasma
+textures/electro_plasma
 {
  {
 	map textures/electro_plasma.tga
@@ -6,11 +6,11 @@
  }
 }
 
-electro_plasma_hull
+textures/electro_plasma_hull
 {
         {
 	map textures/electro_plasma_hull.tga
 	alphaFunc GT0
 	rgbGen Vertex
         }
-}
\ No newline at end of file
+}

Modified: branches/nexuiz-2.0/data/scripts/entities.def
===================================================================
--- branches/nexuiz-2.0/data/scripts/entities.def	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/scripts/entities.def	2009-11-08 10:38:39 UTC (rev 8241)
@@ -1501,20 +1501,6 @@
 model="models/weapons/g_hlac.md3"
 */
 
-/*QUAKED weapon_seeker (1 0 .5) (-30 -30 0) (30 30 32) FLOATING
-Placing this entity on a map kills your dog, voids the warranty on your car, and makes your map an unenjoyable noobs' paradise.
-the T.A.G. Seeker.
--------- KEYS --------
-ammo_rockets: initial rockets of the weapon (if unset, g_pickup_rockets is used)
-respawntime: time till it respawns (default: 30)
-team: out of items with the same value here, only one (random one) will spawn. Useful to put multiple items on one spot.
-cnt: weight of this item for random selection using "team". Set to a lower value for items you want to see less likely.
--------- SPAWNFLAGS --------
-FLOATING: the item will float in air, instead of aligning to the floor by falling
--------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
-model="models/weapons/g_seeker.md3"
-*/
-
 /*QUAKED weapon_hook (1 0 .5) (-30 -30 0) (30 30 32) FLOATING
 the on-hand Grappling Hook.
 -------- KEYS --------

Modified: branches/nexuiz-2.0/data/scripts/shotgun.shader
===================================================================
--- branches/nexuiz-2.0/data/scripts/shotgun.shader	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/data/scripts/shotgun.shader	2009-11-08 10:38:39 UTC (rev 8241)
@@ -1,4 +1,4 @@
-shotgun_sight
+textures/shotgun_sight
 {
 	surfaceparm trans
 
@@ -7,4 +7,4 @@
 		blendfunc add
 		//rgbGen vertex
 	}	
-}
\ No newline at end of file
+}

Modified: branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def
===================================================================
--- branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def	2009-11-08 10:23:04 UTC (rev 8240)
+++ branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def	2009-11-08 10:38:39 UTC (rev 8241)
@@ -1501,20 +1501,6 @@
 model="models/weapons/g_hlac.md3"
 */
 
-/*QUAKED weapon_seeker (1 0 .5) (-30 -30 0) (30 30 32) FLOATING
-Placing this entity on a map kills your dog, voids the warranty on your car, and makes your map an unenjoyable noobs' paradise.
-the T.A.G. Seeker.
--------- KEYS --------
-ammo_rockets: initial rockets of the weapon (if unset, g_pickup_rockets is used)
-respawntime: time till it respawns (default: 30)
-team: out of items with the same value here, only one (random one) will spawn. Useful to put multiple items on one spot.
-cnt: weight of this item for random selection using "team". Set to a lower value for items you want to see less likely.
--------- SPAWNFLAGS --------
-FLOATING: the item will float in air, instead of aligning to the floor by falling
--------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
-model="models/weapons/g_seeker.md3"
-*/
-
 /*QUAKED weapon_hook (1 0 .5) (-30 -30 0) (30 30 32) FLOATING
 the on-hand Grappling Hook.
 -------- KEYS --------



More information about the nexuiz-commits mailing list