r5683 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 28 06:41:03 EST 2009
Author: div0
Date: 2009-01-28 06:41:03 -0500 (Wed, 28 Jan 2009)
New Revision: 5683
Modified:
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/cl_weaponsystem.qc
trunk/data/qcsrc/server/g_world.qc
trunk/data/qcsrc/server/miscfunctions.qc
Log:
try to fix invis again
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2009-01-27 21:56:10 UTC (rev 5682)
+++ trunk/data/qcsrc/server/cl_client.qc 2009-01-28 11:41:03 UTC (rev 5683)
@@ -1530,17 +1530,9 @@
{
if (time > self.strength_finished)
{
- if (g_minstagib_invis_alpha > 0)
- {
- self.alpha = default_player_alpha;
- self.exteriorweaponentity.alpha = default_weapon_alpha;
- self.effects = self.effects | EF_FULLBRIGHT;
- }
- else
- {
- self.effects -= self.effects & EF_NODRAW;
- }
- self.items = self.items - (self.items & IT_STRENGTH);
+ self.alpha = default_player_alpha;
+ self.exteriorweaponentity.alpha = default_weapon_alpha;
+ self.items &~= IT_STRENGTH;
sprint(self, "^3Invisibility has worn off\n");
}
}
@@ -1548,17 +1540,9 @@
{
if (time < self.strength_finished)
{
- if (g_minstagib_invis_alpha > 0)
- {
- self.alpha = g_minstagib_invis_alpha;
- self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
- self.effects -= self.effects & EF_FULLBRIGHT;
- }
- else
- {
- self.effects = self.effects | EF_NODRAW;
- }
- self.items = self.items | IT_STRENGTH;
+ self.alpha = g_minstagib_invis_alpha;
+ self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
+ self.items |= IT_STRENGTH;
sprint(self, "^3You are invisible\n");
}
}
@@ -2108,8 +2092,6 @@
self.teleport_time = 0;
if(! (self.items & IT_STRENGTH))
self.effects = self.effects - (self.effects & EF_NODRAW);
- if(self.weaponentity)
- self.weaponentity.flags = self.weaponentity.flags - (self.weaponentity.flags & EF_NODRAW);
}
Nixnex_GiveCurrentWeapon();
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-01-27 21:56:10 UTC (rev 5682)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2009-01-28 11:41:03 UTC (rev 5683)
@@ -279,21 +279,13 @@
if (self.flags & FL_FLY)
// owner is currently being teleported, so don't apply EF_NODRAW otherwise the viewmodel would "blink"
- self.effects = self.effects - (self.effects & EF_NODRAW);
+ self.effects &~= EF_NODRAW;
- if(self.owner.alpha >= 0)
+ if(self.owner.alpha != 0)
self.alpha = self.owner.alpha;
else
self.alpha = 1;
- /* Minstagib invis doesnt set alpha with perfect invis,
- * but only sets EF_NODRAW, so we have to copy it, too.
- */
- if(self.owner.effects & EF_NODRAW)
- self.effects |= EF_NODRAW;
- else
- self.effects -= self.effects & EF_NODRAW;
-
self.colormap = self.owner.colormap;
self.angles = '0 0 0';
@@ -349,19 +341,11 @@
}
self.effects = self.owner.effects | EF_LOWPRECISION;
self.effects = self.effects & EFMASK_CHEAP; // eat performance
- if(self.owner.alpha >= 0)
+ if(self.owner.alpha != 0)
self.alpha = self.owner.alpha;
else
self.alpha = 1;
- /* Minstagib invis doesnt set alpha with perfect invis,
- * but only sets EF_NODRAW, so we have to copy it, too.
- */
- if(self.owner.effects & EF_NODRAW)
- self.effects |= EF_NODRAW;
- else
- self.effects -= self.effects & EF_NODRAW;
-
self.colormap = self.owner.colormap;
};
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2009-01-27 21:56:10 UTC (rev 5682)
+++ trunk/data/qcsrc/server/g_world.qc 2009-01-28 11:41:03 UTC (rev 5683)
@@ -23,7 +23,7 @@
else
{
default_player_alpha = cvar("g_player_alpha");
- if(default_player_alpha <= 0)
+ if(default_player_alpha == 0)
default_player_alpha = 1;
default_weapon_alpha = default_player_alpha;
}
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2009-01-27 21:56:10 UTC (rev 5682)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2009-01-28 11:41:03 UTC (rev 5683)
@@ -831,6 +831,9 @@
weapon_action(WEP_MINSTANEX, WR_PRECACHE);
start_ammo_cells = cvar("g_minstagib_ammo_start");
g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
+
+ if(g_minstagib_invis_alpha <= 0)
+ g_minstagib_invis_alpha = -1;
}
else
{
More information about the nexuiz-commits
mailing list