r5966 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Feb 25 09:59:55 EST 2009


Author: div0
Date: 2009-02-25 09:59:55 -0500 (Wed, 25 Feb 2009)
New Revision: 5966

Modified:
   trunk/data/qcsrc/server/assault.qc
Log:
remove assault entities in non-assault games


Modified: trunk/data/qcsrc/server/assault.qc
===================================================================
--- trunk/data/qcsrc/server/assault.qc	2009-02-25 11:24:29 UTC (rev 5965)
+++ trunk/data/qcsrc/server/assault.qc	2009-02-25 14:59:55 UTC (rev 5966)
@@ -51,6 +51,11 @@
 }
 
 void spawnfunc_target_objective() {
+	if(!g_assault)
+	{
+		remove(self);
+		return;
+	}
 	self.classname = "target_objective";
 	self.use = assault_objective_use;
 	assault_objective_reset();
@@ -155,6 +160,11 @@
 //=============================================================================
 
 void spawnfunc_target_objective_decrease() {
+	if(!g_assault)
+	{
+		remove(self);
+		return;
+	}
 
 	self.classname = "target_objective_decrease";
 
@@ -171,6 +181,11 @@
 
 // destructible walls that can be used to trigger target_objective_decrease
 void spawnfunc_func_assault_destructible() {
+	if(!g_assault)
+	{
+		remove(self);
+		return;
+	}
 	self.spawnflags = 3;
 	spawnfunc_func_breakable();
 }
@@ -188,6 +203,11 @@
 }
 
 void spawnfunc_func_assault_wall() {
+	if(!g_assault)
+	{
+		remove(self);
+		return;
+	}
 	self.classname = "func_assault_wall";
 	self.mdl = self.model;
 	setmodel(self, self.mdl);
@@ -209,6 +229,11 @@
 }
 
 void spawnfunc_target_assault_roundend() {
+	if(!g_assault)
+	{
+		remove(self);
+		return;
+	}
 	self.winning = 0; // round not yet won by attackers
 	self.classname = "target_assault_roundend";
 	self.use = target_assault_roundend_use;
@@ -250,6 +275,11 @@
 }
 
 void spawnfunc_target_assault_roundstart() {
+	if(!g_assault)
+	{
+		remove(self);
+		return;
+	}
 	assault_attacker_team = COLOR_TEAM1;
 	self.classname = "target_assault_roundstart";
 	self.use = assault_roundstart_use;




More information about the nexuiz-commits mailing list