MCPcopy Create free account
hub / github.com/demoth/jake2 / SV_CreateBaseline

Method SV_CreateBaseline

server/src/main/java/jake2/server/SV_GAME.java:244–260  ·  view source on GitHub ↗

SV_CreateBaseline Entity baselines are used to compress the update messages to the clients -- only the fields that differ from the baseline will be transmitted.

()

Source from the content-addressed store, hash-verified

242 * only the fields that differ from the baseline will be transmitted.
243 */
244 void SV_CreateBaseline() {
245 for (int entnum = 1; entnum < gameImports.gameExports.getNumEdicts(); entnum++) {
246 edict_t svent = gameImports.gameExports.getEdict(entnum);
247
248 if (!svent.inuse)
249 continue;
250 if (0 == svent.s.modelindex && 0 == svent.s.sound
251 && 0 == svent.s.effects)
252 continue;
253
254 svent.s.number = entnum;
255
256 // take current state as baseline
257 Math3D.VectorCopy(svent.s.origin, svent.s.old_origin);
258 gameImports.sv.baselines[entnum].set(svent.s);
259 }
260 }
261
262 /**
263 * SV_CheckForSavegame.

Callers 1

spawnServerInstanceMethod · 0.80

Calls 4

VectorCopyMethod · 0.95
getNumEdictsMethod · 0.65
getEdictMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected