r4200 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 26 10:04:44 EDT 2008


Author: div0
Date: 2008-08-26 10:04:43 -0400 (Tue, 26 Aug 2008)
New Revision: 4200

Modified:
   trunk/data/qcsrc/server/t_plats.qc
Log:
allow displaying the locked door message more than once


Modified: trunk/data/qcsrc/server/t_plats.qc
===================================================================
--- trunk/data/qcsrc/server/t_plats.qc	2008-08-26 13:54:21 UTC (rev 4199)
+++ trunk/data/qcsrc/server/t_plats.qc	2008-08-26 14:04:43 UTC (rev 4200)
@@ -791,10 +791,12 @@
 {
 	local entity 	oself;
 	local entity	starte;
+	string oldmessage;
 
 	if (self.owner != self)
 		objerror ("door_fire: self.owner != self");
 
+	oldmessage = self.message;
 	self.message = ""; // no more message
 	oself = self;
 
@@ -821,6 +823,8 @@
 		self = self.enemy;
 	} while ( (self != starte) && (self != world) );
 	self = oself;
+
+	self.message = oldmessage;
 };
 
 
@@ -829,12 +833,7 @@
 	local entity oself;
 
 	//dprint("door_use (model: ");dprint(self.model);dprint(")\n");
-	self.message = "";			// door message are for touch only
 	if (self.owner)
-		self.owner.message = "";
-	if (self.enemy)
-		self.enemy.message = "";
-	if (self.owner)
 	{
 		oself = self;
 		self = self.owner;
@@ -1157,6 +1156,7 @@
 void fd_secret_use()
 {
 	local float temp;
+	string message_save;
 
 	self.health = 10000;
 	self.bot_attack = TRUE;
@@ -1165,9 +1165,10 @@
 	if (self.origin != self.oldorigin)
 		return;
 
+	message_save = self.message;
 	self.message = ""; // no more message
-
 	SUB_UseTargets();				// fire all targets / killtargets
+	self.message = message_save;
 
 	self.velocity = '0 0 0';
 




More information about the nexuiz-commits mailing list