static void addtnormal(const vec &pos, int smooth, float offset, int normal1, int normal2, const vec &pos1, const vec &pos2) { normalkey key = { pos, smooth }; normalgroup &g = normalgroups.access(key, key); tnormal &n = tnormals.add(); n.next = g.tnormals; n.offset = offset; n.normals[0] = normal1; n.normals[1] = normal2; normalkey key1 = { pos1, smooth }, key2 = { pos2, smooth }; n.groups[0] = normalgroups.access(key1); n.groups[1] = normalgroups.access(key2); g.tnormals = tnormals.length()-1; }
static int addnormal(const vec &pos, int smooth, int axis) { normalkey key = { pos, smooth }; normalgroup &g = normalgroups.access(key, key); g.flat += 1<<(4*axis); return axis - 6; }
static int addnormal(const vec &key, const vec &surface) { normalgroup &g = normalgroups.access(key, key); normal &n = normals.add(); n.next = g.normals; n.surface = surface; return g.normals = normals.length()-1; }
static int addnormal(const vec &pos, int smooth, const vec &surface) { normalkey key = { pos, smooth }; normalgroup &g = normalgroups.access(key, key); normal &n = normals.add(); n.next = g.normals; n.surface = surface; return g.normals = normals.length()-1; }
static void addtnormal(const vec &key, float offset, int normal1, int normal2, normalgroup *group1, normalgroup *group2) { normalgroup &g = normalgroups.access(key, key); tnormal &n = tnormals.add(); n.next = g.tnormals; n.offset = offset; n.normals[0] = normal1; n.normals[1] = normal2; n.groups[0] = group1; n.groups[1] = group2; g.tnormals = tnormals.length()-1; }
teaminfo *getteaminfo(const char *team) { return teaminfos.access(team); }
void setteaminfo(const char *team, int frags) { teaminfo *t = teaminfos.access(team); if(!t) { t = &teaminfos[team]; copystring(t->team, team, sizeof(t->team)); } t->frags = frags; }
static int addnormal(const vec &key, int axis) { normalgroup &g = normalgroups.access(key, key); g.flat += 1<<(4*axis); return axis - 6; }