]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix invalid use of autocvar (shouldn't change behaviour)
authorRudolf Polzer <divverent@alientrap.org>
Sun, 10 Jun 2012 16:32:36 +0000 (18:32 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 10 Jun 2012 16:32:36 +0000 (18:32 +0200)
qcsrc/server/t_items.qc

index 35eaad6ddab9bb6886386cfc75b3fd99df405bb2..18b2e3c9efe4d14445101fcffab7dd9c2d889e74 100644 (file)
 
 #ifdef CSQC
 
 
 #ifdef CSQC
 
-float  autocvar_cl_ghost_items;
-vector autocvar_cl_ghost_items_color;
+var float  autocvar_cl_ghost_items = 1;
+var vector autocvar_cl_ghost_items_color = '-1 -1 -1';
 float  autocvar_cl_fullbright_items;
 vector autocvar_cl_staywep_color;
 float  autocvar_cl_staywep_alpha;
 float  autocvar_cl_simple_items;
 float  cl_simple_items;
 float  autocvar_cl_fullbright_items;
 vector autocvar_cl_staywep_color;
 float  autocvar_cl_staywep_alpha;
 float  autocvar_cl_simple_items;
 float  cl_simple_items;
+float  cl_ghost_items_alpha;
 
 .float  spawntime;
 .float  gravity;
 
 .float  spawntime;
 .float  gravity;
@@ -53,14 +54,11 @@ void ItemDrawSimple()
 float csqcitems_started; // remove this after a release or two
 void csqcitems_start()
 {
 float csqcitems_started; // remove this after a release or two
 void csqcitems_start()
 {
-    autocvar_cl_ghost_items =  bound(0, autocvar_cl_ghost_items, 1);
     if(autocvar_cl_ghost_items == 1)
     if(autocvar_cl_ghost_items == 1)
-        autocvar_cl_ghost_items = 0.55;
+        cl_ghost_items_alpha = 0.55;
+    else
+        cl_ghost_items_alpha = bound(0, autocvar_cl_ghost_items, 1);
     
     
-    string _tmp = cvar_string("cl_ghost_items_color");
-    if(_tmp == "")
-        autocvar_cl_ghost_items_color = '-1 -1 -1';
-
     csqcitems_started = TRUE;
 }
 
     csqcitems_started = TRUE;
 }
 
@@ -91,7 +89,7 @@ void ItemRead(float _IsNew)
         }
         else
         {
         }
         else
         {
-            if (autocvar_cl_ghost_items)
+            if (cl_ghost_items_alpha)
             {
                 self.alpha = autocvar_cl_ghost_items;
                 self.colormod = self.glowmod = autocvar_cl_ghost_items_color;
             {
                 self.alpha = autocvar_cl_ghost_items;
                 self.colormod = self.glowmod = autocvar_cl_ghost_items_color;