r5101 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Nov 26 03:52:50 EST 2008


Author: div0
Date: 2008-11-26 03:52:48 -0500 (Wed, 26 Nov 2008)
New Revision: 5101

Modified:
   trunk/data/qcsrc/server/assault.qc
   trunk/data/qcsrc/server/func_breakable.qc
Log:
assault: (untested) make breakables show a radar wave when attacked


Modified: trunk/data/qcsrc/server/assault.qc
===================================================================
--- trunk/data/qcsrc/server/assault.qc	2008-11-26 08:29:31 UTC (rev 5100)
+++ trunk/data/qcsrc/server/assault.qc	2008-11-26 08:52:48 UTC (rev 5101)
@@ -141,6 +141,7 @@
 			WaypointSprite_UpdateSprites(spr, "as-defend", "as-destroy", "as-destroy");
 		else
 			WaypointSprite_UpdateSprites(spr, "as-defend", "as-push", "as-push");
+		WaypointSprite_UpdateTeamRadar(spr, RADARICON_OBJECTIVE, '1 0.5 0');
 	}
 }
 
@@ -256,8 +257,7 @@
 	assault_attacker_team = COLOR_TEAM1;
 	self.classname = "target_assault_roundstart";
 	self.use = assault_roundstart_use;
-	self.think = assault_roundstart_use;
-	self.nextthink = time + 0.1;
+	InitializeEntity(self, assault_roundstart_use, INITPRIO_FINDTARGET);
 }
 
 // trigger new round

Modified: trunk/data/qcsrc/server/func_breakable.qc
===================================================================
--- trunk/data/qcsrc/server/func_breakable.qc	2008-11-26 08:29:31 UTC (rev 5100)
+++ trunk/data/qcsrc/server/func_breakable.qc	2008-11-26 08:52:48 UTC (rev 5101)
@@ -1,4 +1,5 @@
-// TODO add assault's colormodding to this, make assault redirect to this one
+.entity sprite;
+
 // TODO add the fields this uses to the entities.def when done
 
 .string mdl_dead; // or "" to hide when broken
@@ -133,6 +134,11 @@
 {
 	if(self.state == 1)
 		return;
+	if(self.team)
+		if(attacker.team == self.team)
+			return;
+	if(self.sprite)
+		WaypointSprite_Ping(self.sprite);
 	self.health = self.health - damage;
 	if(self.health < 0)
 	{




More information about the nexuiz-commits mailing list