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

Function tempmmcmp

source/src/rendermodel.cpp:225–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223struct tempmmslot { mapmodelinfo m; vector<int> oldslot; bool used; };
224
225int tempmmcmp(tempmmslot *a, tempmmslot *b)
226{
227 int n = strcmp(a->m.name, b->m.name);
228 if(n) return n;
229 if(a->m.rad != b->m.rad) return a->m.rad - b->m.rad;
230 if(a->m.h != b->m.h) return a->m.h - b->m.h;
231 if(a->m.zoff != b->m.zoff) return a->m.zoff - b->m.zoff;
232 if(a->m.scale != b->m.scale) return int((a->m.scale - b->m.scale) * 1e6);
233 return 0;
234}
235
236int tempmmsort(tempmmslot *a, tempmmslot *b)
237{

Callers 2

tempmmsortFunction · 0.85
sortmapmodelslotsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected