r2418 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Apr 30 11:51:49 EDT 2007


Author: div0
Date: 2007-04-30 11:51:49 -0400 (Mon, 30 Apr 2007)
New Revision: 2418

Modified:
   trunk/data/default.cfg
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/keyhunt.qc
Log:
delay interfere message; add point limit to default.cfg


Modified: trunk/data/default.cfg
===================================================================
--- trunk/data/default.cfg	2007-04-30 15:33:59 UTC (rev 2417)
+++ trunk/data/default.cfg	2007-04-30 15:51:49 UTC (rev 2418)
@@ -236,6 +236,7 @@
 seta g_ctf_capture_limit -1
 seta g_domination_point_limit -1
 seta g_runematch_point_limit -1
+set g_keyhunt_point_limit -1
 
 // respawn delay
 set g_respawn_delay 2
@@ -730,4 +731,4 @@
 set g_balance_keyhunt_score_destroyed 50
 set g_balance_keyhunt_score_destroyed_ownfactor 1
 set g_keyhunt_teams_override 0
-set g_keyhunt_teams 0
+set g_keyhunt_teams 0 // mapcfgs NEED to specify this!

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2007-04-30 15:33:59 UTC (rev 2417)
+++ trunk/data/qcsrc/server/g_world.qc	2007-04-30 15:51:49 UTC (rev 2418)
@@ -465,6 +465,8 @@
 		return "rune";
 	else if (game == GAME_LMS)
 		return "lms";
+	else if (game == GAME_KEYHUNT)
+		return "kh";
 	return "dm";
 }
 

Modified: trunk/data/qcsrc/server/keyhunt.qc
===================================================================
--- trunk/data/qcsrc/server/keyhunt.qc	2007-04-30 15:33:59 UTC (rev 2417)
+++ trunk/data/qcsrc/server/keyhunt.qc	2007-04-30 15:51:49 UTC (rev 2418)
@@ -17,6 +17,7 @@
 entity kh_controller;
 float kh_tracking_enabled;
 float kh_teams;
+float kh_interferemsg_time, kh_interferemsg_team;
 .entity kh_next, kh_prev; // linked list
 .float kh_droptime;
 
@@ -238,8 +239,6 @@
 
 void kh_Key_Collect(entity key, entity player)
 {
-	entity head;
-
 	kh_Scores_Event(player, key, "collect", 1, 0);
 	bprint(player.netname, "^7 collected the ", key.netname, "\n");
 	kh_Key_AssignTo(key, player, TRUE);
@@ -247,16 +246,8 @@
 	FOR_EACH_KH_KEY(key)
 		if(!key.owner || key.team != player.team)
 			goto notallowned;
-	FOR_EACH_PLAYER(head)
-	{
-		if(head.team == player.team)
-			if(head.kh_next)
-				centerprint(head, "All keys are in your team's hands!\n\nMeet the other key carriers ^1NOW^7!\n");
-			else
-				centerprint(head, "All keys are in your team's hands!\n\nHelp the key carriers to meet!\n");
-		else
-			centerprint(head, "All keys are in the enemy's hands!\n\nInterfere ^1NOW^7!\n");
-	}
+	kh_interferemsg_time = time + 0.2;
+	kh_interferemsg_team = player.team;
 :notallowned
 }
 
@@ -294,6 +285,8 @@
 
 void kh_Key_Think()
 {
+	entity head;
+
 	self.angles_y = math_mod(self.angles_y + 0.05 * 135, 360);
 
 	if(self.owner)
@@ -340,6 +333,21 @@
 :not_winning
 	}
 
+	if(kh_interferemsg_time && time > kh_interferemsg_time)
+	{
+		kh_interferemsg_time = 0;
+		FOR_EACH_PLAYER(head)
+		{
+			if(head.team == kh_interferemsg_team)
+				if(head.kh_next)
+					centerprint(head, "All keys are in your team's hands!\n\nMeet the other key carriers ^1NOW^7!\n");
+				else
+					centerprint(head, "All keys are in your team's hands!\n\nHelp the key carriers to meet!\n");
+			else
+				centerprint(head, "All keys are in the enemy's hands!\n\nInterfere ^1NOW^7!\n");
+		}
+	}
+
 	self.nextthink = time + 0.05;
 }
 
@@ -416,6 +424,7 @@
 void kh_FinishRound()
 {
 	// prepare next round
+	kh_interferemsg_time = 0;
 	entity key;
 	FOR_EACH_KH_KEY(key)
 		kh_Key_Remove(key);




More information about the nexuiz-commits mailing list