r5180 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Dec 9 01:19:42 EST 2008


Author: div0
Date: 2008-12-09 01:19:42 -0500 (Tue, 09 Dec 2008)
New Revision: 5180

Modified:
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/cl_physics.qc
   trunk/data/qcsrc/server/ctf.qc
   trunk/data/qcsrc/server/g_hook.qc
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/qcsrc/server/w_hook.qc
Log:
get rid of the stupid (-) operator, use the more readable &~= (so QC newbies can guess what it means too)


Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2008-12-09 06:17:04 UTC (rev 5179)
+++ trunk/data/qcsrc/server/cl_client.qc	2008-12-09 06:19:42 UTC (rev 5180)
@@ -1335,7 +1335,7 @@
 
 	// Here, everything has been done that requires this player to be a client.
 
-	self.flags (-) FL_CLIENT;
+	self.flags &~= FL_CLIENT;
 
 	if (self.chatbubbleentity)
 		remove (self.chatbubbleentity);

Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc	2008-12-09 06:17:04 UTC (rev 5179)
+++ trunk/data/qcsrc/server/cl_physics.qc	2008-12-09 06:19:42 UTC (rev 5180)
@@ -289,7 +289,7 @@
 		else
 		{
 			// now set angles_x so that the car points forward, but is tilted in velocity direction
-			self.flags (-) FL_ONGROUND;
+			self.flags &~= FL_ONGROUND;
 		}
 
 		self.velocity = (neworigin - self.origin) * (1.0 / frametime);

Modified: trunk/data/qcsrc/server/ctf.qc
===================================================================
--- trunk/data/qcsrc/server/ctf.qc	2008-12-09 06:17:04 UTC (rev 5179)
+++ trunk/data/qcsrc/server/ctf.qc	2008-12-09 06:19:42 UTC (rev 5180)
@@ -921,11 +921,11 @@
 
 void ctf_setstatus()
 {
-	self.items (-) IT_RED_FLAG_TAKEN;
-	self.items (-) IT_RED_FLAG_LOST;
-	self.items (-) IT_BLUE_FLAG_TAKEN;
-	self.items (-) IT_BLUE_FLAG_LOST;
-	self.items (-) IT_CTF_SHIELDED;
+	self.items &~= IT_RED_FLAG_TAKEN;
+	self.items &~= IT_RED_FLAG_LOST;
+	self.items &~= IT_BLUE_FLAG_TAKEN;
+	self.items &~= IT_BLUE_FLAG_LOST;
+	self.items &~= IT_CTF_SHIELDED;
 
 	if (g_ctf) {
 		local entity flag;

Modified: trunk/data/qcsrc/server/g_hook.qc
===================================================================
--- trunk/data/qcsrc/server/g_hook.qc	2008-12-09 06:17:04 UTC (rev 5179)
+++ trunk/data/qcsrc/server/g_hook.qc	2008-12-09 06:19:42 UTC (rev 5180)
@@ -232,7 +232,7 @@
 					}
 				}
 
-				self.owner.flags (-) FL_ONGROUND;
+				self.owner.flags &~= FL_ONGROUND;
 			}
 		}
 		else
@@ -248,7 +248,7 @@
 			self.owner.velocity = dir*spd;
 			self.owner.movetype = MOVETYPE_FLY;
 
-			self.owner.flags (-) FL_ONGROUND;
+			self.owner.flags &~= FL_ONGROUND;
 		}
 	}
 
@@ -392,25 +392,25 @@
 		else
 		{
 			self.hook_state |= HOOK_REMOVING;
-			self.hook_state (-) HOOK_WAITING_FOR_RELEASE;
+			self.hook_state &~= HOOK_WAITING_FOR_RELEASE;
 		}
 
-		self.hook_state (-) HOOK_RELEASING;
+		self.hook_state &~= HOOK_RELEASING;
 		if(self.BUTTON_CROUCH)
 		{
-			self.hook_state (-) HOOK_PULLING;
+			self.hook_state &~= HOOK_PULLING;
 			//self.hook_state |= HOOK_RELEASING;
 		}
 		else
 		{
 			self.hook_state |= HOOK_PULLING;
-			//self.hook_state (-) HOOK_RELEASING;
+			//self.hook_state &~= HOOK_RELEASING;
 		}
 	}
 
 	if(!g_grappling_hook && self.weapon != WEP_HOOK)
 	{
-		self.hook_state (-) HOOK_FIRING;
+		self.hook_state &~= HOOK_FIRING;
 		self.hook_state |= HOOK_REMOVING;
 	}
 
@@ -419,13 +419,13 @@
 		if (self.hook)
 			RemoveGrapplingHook(self);
 		FireGrapplingHook();
-		self.hook_state (-) HOOK_FIRING;
+		self.hook_state &~= HOOK_FIRING;
 	}
 	else if(self.hook_state & HOOK_REMOVING)
 	{
 		if (self.hook)
 			RemoveGrapplingHook(self);
-		self.hook_state (-) HOOK_REMOVING;
+		self.hook_state &~= HOOK_REMOVING;
 	}
 	/*
 	// if I have no hook or it's not pulling yet, make sure I'm not flying!

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2008-12-09 06:17:04 UTC (rev 5179)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2008-12-09 06:19:42 UTC (rev 5180)
@@ -911,8 +911,8 @@
 
 	if(g_grappling_hook) // offhand hook
 	{
-		start_weapons (-) WEPBIT_HOOK;
-		warmup_start_weapons (-) WEPBIT_HOOK;
+		start_weapons &~= WEPBIT_HOOK;
+		warmup_start_weapons &~= WEPBIT_HOOK;
 	}
 }
 

Modified: trunk/data/qcsrc/server/w_hook.qc
===================================================================
--- trunk/data/qcsrc/server/w_hook.qc	2008-12-09 06:17:04 UTC (rev 5179)
+++ trunk/data/qcsrc/server/w_hook.qc	2008-12-09 06:19:42 UTC (rev 5180)
@@ -136,16 +136,16 @@
 
 		if (self.BUTTON_CROUCH)
 		{
-			self.hook_state (-) HOOK_PULLING;
+			self.hook_state &~= HOOK_PULLING;
 			if (self.BUTTON_ATCK || self.BUTTON_HOOK)
-				self.hook_state (-) HOOK_RELEASING;
+				self.hook_state &~= HOOK_RELEASING;
 			else
 				self.hook_state |= HOOK_RELEASING;
 		}
 		else
 		{
 			self.hook_state |= HOOK_PULLING;
-			self.hook_state (-) HOOK_RELEASING;
+			self.hook_state &~= HOOK_RELEASING;
 
 			if (self.BUTTON_ATCK || self.BUTTON_HOOK)
 			{
@@ -156,7 +156,7 @@
 			else
 			{
 				self.hook_state |= HOOK_REMOVING;
-				self.hook_state (-) HOOK_WAITING_FOR_RELEASE;
+				self.hook_state &~= HOOK_WAITING_FOR_RELEASE;
 			}
 		}
 	}




More information about the nexuiz-commits mailing list