MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SV_CreateBaseline

Function SV_CreateBaseline

code/server/sv_init.cpp:143–162  ·  view source on GitHub ↗

================ SV_CreateBaseline Entity baselines are used to compress non-delta messages to the clients -- only the fields that differ from the baseline will be transmitted ================ */

Source from the content-addressed store, hash-verified

141================
142*/
143void SV_CreateBaseline( void ) {
144 gentity_t *svent;
145 int entnum;
146
147 for ( entnum = 0; entnum < ge->num_entities ; entnum++ ) {
148 svent = SV_GentityNum(entnum);
149 if (!svent->inuse) {
150 continue;
151 }
152 if (!svent->linked) {
153 continue;
154 }
155 svent->s.number = entnum;
156
157 //
158 // take current state as baseline
159 //
160 sv.svEntities[entnum].baseline = svent->s;
161 }
162}
163
164
165

Callers 1

SV_SpawnServerFunction · 0.70

Calls 1

SV_GentityNumFunction · 0.70

Tested by

no test coverage detected