r3219 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Jan 22 05:05:22 EST 2008
Author: div0
Date: 2008-01-22 05:05:10 -0500 (Tue, 22 Jan 2008)
New Revision: 3219
Modified:
trunk/data/qcsrc/server/t_items.qc
Log:
new entity "func_wall", takes a model (or submodel) and _use colormaps it to the activator's team (or a random color in non-teamplay)
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2008-01-22 08:21:44 UTC (rev 3218)
+++ trunk/data/qcsrc/server/t_items.qc 2008-01-22 10:05:10 UTC (rev 3219)
@@ -812,10 +812,28 @@
setsize (self, self.mins, self.maxs);
}
+void func_wall_use (void)
+{
+ if(teams_matter)
+ {
+ if(activator.team)
+ self.colormap = (activator.team - 1) * 0x11;
+ else
+ self.colormap = 0x00;
+ }
+ else
+ self.colormap = ceil(random() * 256) - 1;
+}
+void func_wall (void)
+{
+ precache_model (self.model);
+ setmodel (self, self.model); // precision set by mapper
+ setsize (self, self.mins, self.maxs);
+ self.solid = SOLID_BSP;
+ self.use = func_wall_use;
+}
-
-
floatfield Item_CounterField(float it)
{
switch(it)
More information about the nexuiz-commits
mailing list