MCPcopy Create free account
hub / github.com/assaultcube/AC / voptimize

Function voptimize

source/src/worldio.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29inline bool nhf(sqr *s) { return s->type!=FHF && s->type!=CHF; }
30
31void voptimize() // reset vdeltas on non-hf cubes
32{
33 loop(y, ssize) loop(x, ssize)
34 {
35 sqr *s = S(x, y);
36 if(x && y) { if(nhf(s) && nhf(S(x-1, y)) && nhf(S(x-1, y-1)) && nhf(S(x, y-1))) s->vdelta = 0; }
37 else s->vdelta = 0;
38 }
39}
40
41// these two are used by getmap/sendmap.. transfers compressed maps directly
42

Callers 1

save_worldFunction · 0.85

Calls 1

loopFunction · 0.70

Tested by

no test coverage detected