[nexuiz-commits] r7883 - in branches/nexuiz-2.0: . data data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 23 06:30:07 EDT 2009
Author: div0
Date: 2009-09-23 06:30:07 -0400 (Wed, 23 Sep 2009)
New Revision: 7883
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/defaultNexuiz.cfg
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/t_items.qc
Log:
r7864 | div0 | 2009-09-22 11:18:10 -0400 (Tue, 22 Sep 2009) | 2 lines
new cvar: g_ghost_items (1 by default, can be set to 0 to disable ghost items)
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-09-23 10:29:32 UTC (rev 7882)
+++ branches/nexuiz-2.0/.patchsets 2009-09-23 10:30:07 UTC (rev 7883)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7563,7565-7586,7589-7589,7592-7592,7595-7595,7597-7597,7599-7602,7605-7610,7612-7615,7619-7620,7623-7623,7626-7628,7630-7630,7644-7651,7656-7656,7658-7660,7663-7665,7670-7670,7672-7676,7678-7680,7686-7687,7689-7698,7701-7701,7703-7714,7717-7723,7731-7731,7735-7741,7744-7745,7752-7754,7756-7758,7761-7764,7771-7773,7775-7775,7778-7778,7781-7788,7795-7816,7818-7834,7836-7838,7840-7849,7851-7863
+revisions_applied = 1-7563,7565-7586,7589-7589,7592-7592,7595-7595,7597-7597,7599-7602,7605-7610,7612-7615,7619-7620,7623-7623,7626-7628,7630-7630,7644-7651,7656-7656,7658-7660,7663-7665,7670-7670,7672-7676,7678-7680,7686-7687,7689-7698,7701-7701,7703-7714,7717-7723,7731-7731,7735-7741,7744-7745,7752-7754,7756-7758,7761-7764,7771-7773,7775-7775,7778-7778,7781-7788,7795-7816,7818-7834,7836-7838,7840-7849,7851-7864
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-09-23 10:29:32 UTC (rev 7882)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-09-23 10:30:07 UTC (rev 7883)
@@ -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 23bb243e7dbb87bbdfac5c6d68afd196
+set cvar_check_default 28459139144883d7da0c4033615e0b20
// Nexuiz version (formatted for machines)
// used to determine if a client version is compatible
@@ -1717,3 +1717,5 @@
set g_triggerimpulse_accel_multiplier 1 "trigger_impulse accelerator multiplier (applied AFTER the power)"
set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field multiplier"
set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier"
+
+set g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh 2009-09-23 10:29:32 UTC (rev 7882)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh 2009-09-23 10:30:07 UTC (rev 7883)
@@ -1,5 +1,5 @@
-string CVAR_CHECK_DEFAULT = "23bb243e7dbb87bbdfac5c6d68afd196";
-string CVAR_CHECK_WEAPONS = "c55b862a83b1579ec2996cb2f92b819d";
+string CVAR_CHECK_DEFAULT = "28459139144883d7da0c4033615e0b20";
+string CVAR_CHECK_WEAPONS = "bc8154746bdc33b6ff517c0e19fa91e0";
float FALSE = 0;
float TRUE = 1;
Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-09-23 10:29:32 UTC (rev 7882)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2009-09-23 10:30:07 UTC (rev 7883)
@@ -750,6 +750,7 @@
float warmup_start_health;
float warmup_start_armorvalue;
float g_weapon_stay;
+float g_ghost_items;
entity get_weaponinfo(float w);
@@ -1157,6 +1158,9 @@
g_weapon_stay = cvar("g_weapon_stay");
if (!g_weapon_stay && (cvar("deathmatch") == 2))
g_weapon_stay = 1;
+ g_ghost_items = cvar("g_ghost_items");
+ if(g_ghost_items >= 1)
+ g_ghost_items = 0.13; // default alpha value
if not(inWarmupStage)
game_starttime = cvar("g_start_delay");
Modified: branches/nexuiz-2.0/data/qcsrc/server/t_items.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/t_items.qc 2009-09-23 10:29:32 UTC (rev 7882)
+++ branches/nexuiz-2.0/data/qcsrc/server/t_items.qc 2009-09-23 10:30:07 UTC (rev 7883)
@@ -46,10 +46,20 @@
if(self.spawnshieldtime)
return TRUE;
if(self.weapons != (self.weapons & other.weapons))
- self.alpha = 0.5;
+ {
+ self.alpha = 0.5 + 0.5 * g_ghost_items; // halfway more alpha
+ return TRUE;
+ }
else
- self.alpha = 0.13;
- return TRUE;
+ {
+ if(g_ghost_items)
+ {
+ self.alpha = g_ghost_items;
+ return TRUE;
+ }
+ else
+ return FALSE;
+ }
}
void Item_Show (entity e, float mode)
@@ -84,23 +94,34 @@
e.solid = SOLID_TRIGGER; // can STILL be picked up!
e.effects |= EF_STARDUST;
//e.colormod = '0.2 1 0.2';
- e.alpha = 0.5;
+ //e.alpha = 0.5; // will be overridden by CEFC though...
e.customizeentityforclient = Item_Customize;
e.spawnshieldtime = 0; // field indicates whether picking it up may give you anything other than the weapon
}
- else
+ else if(g_ghost_items)
{
// make the item translucent green and not touchable
e.model = e.mdl;
e.solid = SOLID_NOT;
//e.colormod = '0.2 1 0.2';
- e.alpha = 0.13;
+ e.alpha = g_ghost_items;
e.customizeentityforclient = func_null;
e.spawnshieldtime = 1;
}
+ else
+ {
+ // hide the item completely
+ e.model = string_null;
+ e.solid = SOLID_NOT;
+ //e.colormod = '0 0 0';
+ e.alpha = 0;
+ e.customizeentityforclient = func_null;
+ e.spawnshieldtime = 1;
+ }
+
if (e.strength_finished || e.invincible_finished)
e.effects |= EF_ADDITIVE | EF_FULLBRIGHT;
if (cvar("g_fullbrightitems"))
More information about the nexuiz-commits
mailing list