[nexuiz-commits] r7268 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Jul 25 14:53:01 EDT 2009
Author: div0
Date: 2009-07-25 14:53:00 -0400 (Sat, 25 Jul 2009)
New Revision: 7268
Modified:
trunk/data/qcsrc/server/g_triggers.qc
Log:
restructure voice script code a little
Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc 2009-07-25 18:15:03 UTC (rev 7267)
+++ trunk/data/qcsrc/server/g_triggers.qc 2009-07-25 18:53:00 UTC (rev 7268)
@@ -1530,23 +1530,23 @@
{
play2(pl, strcat(vs.netname, "/", argv(i), ".wav"));
dt = stof(argv(i + 1));
- if(dt > 0)
+ if(dt >= 0)
+ {
pl.voicescript_voiceend = time + dt;
+ pl.voicescript_nextthink = pl.voicescript_voiceend + vs.wait * (0.5 + random());
+ }
else
+ {
pl.voicescript_voiceend = time - dt;
+ pl.voicescript_nextthink = pl.voicescript_voiceend;
+ }
+
+ pl.voicescript_index += 1;
}
else
{
- pl.voicescript = world;
- dt = 0;
+ pl.voicescript = world; // stop trying then
}
-
- pl.voicescript_index += 1;
-
- if(dt > 0)
- pl.voicescript_nextthink = pl.voicescript_voiceend + vs.wait * (0.5 + random());
- else
- pl.voicescript_nextthink = pl.voicescript_voiceend;
}
}
}
More information about the nexuiz-commits
mailing list