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

Function createservworld

source/src/tools.cpp:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98// map geometry statistics
99
100servsqr *createservworld(const sqr *s, int _cubicsize) // create a server-style floorplan on the client, to use same statistics functions on client and server
101{
102 servsqr *res = new servsqr[_cubicsize], *d = res;
103 loopirev(_cubicsize)
104 {
105 d->type = s->type == SOLID ? SOLID : ((s->type & TAGTRIGGERMASK) | (s->tag & ~TAGTRIGGERMASK)); // guaranteed to not have tagclips on SOLID cubes - so we can check for SOLID without masks
106 d->ceil = s->ceil;
107 d->floor = s->floor;
108 d->vdelta = s->vdelta;
109 d++;
110 s++;
111 }
112 return res;
113}
114
115int calcmapdims(mapdim_s &md, const servsqr *s, int _ssize)
116{

Callers 4

empty_worldFunction · 0.85
mapareacheckFunction · 0.85
calclightFunction · 0.85
load_worldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected