[nexuiz-commits] r6790 - in trunk/data: qcsrc/client scripts
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri May 29 16:52:23 EDT 2009
Author: div0
Date: 2009-05-29 16:52:23 -0400 (Fri, 29 May 2009)
New Revision: 6790
Modified:
trunk/data/qcsrc/client/wall.qc
trunk/data/scripts/entities.def
Log:
bgmscript: < means angular movement
Modified: trunk/data/qcsrc/client/wall.qc
===================================================================
--- trunk/data/qcsrc/client/wall.qc 2009-05-29 20:28:22 UTC (rev 6789)
+++ trunk/data/qcsrc/client/wall.qc 2009-05-29 20:52:23 UTC (rev 6790)
@@ -1,13 +1,20 @@
.float lip;
+.float bgmscriptangular;
void Ent_Wall_Draw()
{
float f;
vector save;
+ var .vector fld;
InterpolateOrigin_Do();
- save = self.origin;
+ if(self.bgmscriptangular)
+ fld = angles;
+ else
+ fld = origin;
+
+ save = self.fld;
f = BGMScript(self);
if(f >= 0)
{
@@ -15,7 +22,7 @@
self.alpha = 1 + self.lip * f;
else // > 0: alpha goes from 1-|lip| to 1 when toggled (toggling adds lip)
self.alpha = 1 - self.lip * (1 - f);
- self.origin = self.origin + self.movedir * f;
+ self.fld = self.fld + self.movedir * f;
}
else
self.alpha = 1;
@@ -23,7 +30,7 @@
if(self.alpha >= ALPHA_MIN_VISIBLE)
R_AddEntity(self);
- self.origin = save;
+ self.fld = save;
}
void Ent_Wall_Remove()
@@ -84,9 +91,20 @@
}
else
self.mins = self.maxs = '0 0 0';
+
if(self.bgmscript)
strunzone(self.bgmscript);
- self.bgmscript = strzone(ReadString());
+ self.bgmscript = ReadString();
+ if(substring(self.bgmscript, 0, 1) == "<")
+ {
+ self.bgmscript = strzone(substring(self.bgmscript, 1, -1));
+ self.bgmscriptangular = 1;
+ }
+ else
+ {
+ self.bgmscript = strzone(self.bgmscript);
+ self.bgmscriptangular = 0;
+ }
if(self.bgmscript != "")
{
self.bgmscriptattack = ReadByte() / 64.0;
Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def 2009-05-29 20:28:22 UTC (rev 6789)
+++ trunk/data/scripts/entities.def 2009-05-29 20:52:23 UTC (rev 6790)
@@ -748,7 +748,7 @@
colormap: 1024 + 16 * pantscolor + shirtcolor
angles: initial looking direction
targetname: when invoking it by a button etc., it changes the color to the initiator of the action (e.g. the one pressing a button). In Onslaught, this can be used to color control points for team who owns them. In other game types, this can be used as a fun feature. Works only with _shirt and _pants textures.
-bgmscript: emitter class from the BGM script
+bgmscript: emitter class from the BGM script (if prefixed with <, movedir is treated as an angle value)
bgmscriptattack: attack time of the effect strength (0 to 3.9)
bgmscriptdecay: decay time of the effect strength (0 to 3.9)
bgmscriptsustain: sustain level of the effect strength (0.1 to 1, set to -1 to disable sustain)
More information about the nexuiz-commits
mailing list