new command looplisti

same as looplist, but it automatically counts the loops in "i", starting
with 0.

Example:

  a = [u v w] ; b = [x y z]
  looplisti $a m [echo $m (at $b $i) $i]

  u x 0
  v y 1
  w z 2

DOCREF looplisti
This commit is contained in:
ac-stef
2016-09-02 21:58:39 +02:00
parent a8db184eef
commit a6bffc1858
8 changed files with 38 additions and 33 deletions
+1 -1
View File
@@ -1051,7 +1051,7 @@ void preparectf(bool cleanonly=false)
if(e.type==CTF_FLAG)
{
e.spawned = true;
if(e.attr2>=2) { conoutf("\f3invalid ctf-flag entity (%i)", i); e.attr2 = 0; }
if(e.attr2>=2) { conoutf("\f3invalid ctf-flag entity (%d)", i); e.attr2 = 0; }
flaginfo &f = flaginfos[e.attr2];
f.flagent = &e;
f.pos.x = (float) e.x;