MCPcopy Index your code
hub / github.com/assaultcube/AC / loopk

Function loopk

source/src/tools.cpp:213–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 pp.val2 = int(r - _servworld);
212 int area = 0, volume = 0, frac;
213 loopk(MAS_RESOLUTION)
214 {
215 #define RAYS(da, db) \
216 rr = r; frac = 0; \
217 for(;;) \
218 { \
219 if((frac += k) >= MAS_RESOLUTION) rr += da, frac -= MAS_RESOLUTION; \
220 rr += db; \
221 if(SOLID(rr)) break; \
222 if(rr->vdelta != epoch) { area += 1; volume += rr->ceil - rr->floor; } \
223 rr->vdelta = epoch; \
224 }
225 RAYS(_ssize, 1);
226 RAYS(_ssize, -1);
227 RAYS(-_ssize, 1);
228 RAYS(-_ssize, -1);
229 RAYS(1, _ssize);
230 RAYS(1, -_ssize);
231 RAYS(-1, _ssize);
232 RAYS(-1, -_ssize);
233 #undef RAYS
234 }
235 pp.val1 = volume;
236 pp.key = area;
237 tab.add(pp);

Callers 15

empty_worldFunction · 0.70
textureslotusagegeometryFunction · 0.70
deletetextureslotFunction · 0.70
sorttextureslotsFunction · 0.70
resettexturelistsFunction · 0.70
loadMethod · 0.70
initmapMethod · 0.70
parsevitasFunction · 0.70
parsemessagesFunction · 0.70
sortmapmodelslotsFunction · 0.70
rebuildcerttreeFunction · 0.70
removeconnectivityMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected