r2423 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Apr 30 14:40:03 EDT 2007


Author: div0
Date: 2007-04-30 14:40:03 -0400 (Mon, 30 Apr 2007)
New Revision: 2423

Modified:
   trunk/data/qcsrc/server/keyhunt.qc
Log:
kh: higher score when more teams are on the map


Modified: trunk/data/qcsrc/server/keyhunt.qc
===================================================================
--- trunk/data/qcsrc/server/keyhunt.qc	2007-04-30 17:08:01 UTC (rev 2422)
+++ trunk/data/qcsrc/server/keyhunt.qc	2007-04-30 18:40:03 UTC (rev 2423)
@@ -254,12 +254,12 @@
 
 void kh_Key_Collect(entity key, entity player)
 {
+	sound(key, CHAN_AUTO, kh_sound_collect, 1, ATTN_NORM);
+
 	kh_Scores_Event(player, key, "collect", 1, 0);
 	bprint(player.netname, "^7 collected the ", key.netname, "\n");
 	kh_Key_AssignTo(key, player, TRUE);
 
-	sound(key, CHAN_AUTO, kh_sound_collect, 1, ATTN_NORM);
-
 	FOR_EACH_KH_KEY(key)
 		if(!key.owner || key.team != player.team)
 			goto notallowned;
@@ -285,7 +285,7 @@
 			kh_Key_AssignTo(key, world, TRUE);
 			key.pusher = mypusher;
 		}
-		sound(world, CHAN_AUTO, kh_sound_drop, 1, ATTN_NORM);
+		sound(player, CHAN_AUTO, kh_sound_drop, 1, ATTN_NORM);
 	}
 }
 
@@ -323,8 +323,8 @@
 			self.pusher = world;
 			kh_Scores_Event(self.owner, self, "dropkey", 0, 0);
 			bprint(self.owner.netname, "^7 dropped the ", self.netname, "\n");
+			sound(self.owner, CHAN_AUTO, kh_sound_drop, 1, ATTN_NORM);
 			kh_Key_AssignTo(self, world, TRUE);
-			sound(world, CHAN_AUTO, kh_sound_drop, 1, ATTN_NONE);
 		}
 	}
 
@@ -379,7 +379,9 @@
 	float first;
 	entity key;
 	float score;
-	score = 1.0 / kh_teams;
+	score = (kh_teams - 1) / kh_teams;
+	// twice the score for 3 team games, three times the score for 4 team games!
+	// note: for a win by destroying the key, this should NOT be applied
 	first = TRUE;
 	FOR_EACH_KH_KEY(key)
 	{




More information about the nexuiz-commits mailing list