| 1091 | } |
| 1092 | |
| 1093 | void preparectf(bool cleanonly=false) |
| 1094 | { |
| 1095 | loopi(2) initflag(i); |
| 1096 | if(!cleanonly) |
| 1097 | { |
| 1098 | loopv(ents) |
| 1099 | { |
| 1100 | entity &e = ents[i]; |
| 1101 | if(e.type==CTF_FLAG) |
| 1102 | { |
| 1103 | e.spawned = true; |
| 1104 | if(e.attr2>=2) { conoutf("\f3invalid ctf-flag entity (%d)", i); e.attr2 = 0; } |
| 1105 | flaginfo &f = flaginfos[e.attr2]; |
| 1106 | f.flagent = &e; |
| 1107 | f.pos.x = (float) e.x; |
| 1108 | f.pos.y = (float) e.y; |
| 1109 | f.pos.z = (float) e.z; |
| 1110 | } |
| 1111 | } |
| 1112 | } |
| 1113 | } |
| 1114 | |
| 1115 | struct gmdesc { int mode; char *desc; }; |
| 1116 | vector<gmdesc> gmdescs; |