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

Method parsePacketEntities

client/src/main/java/jake2/client/CL_ents.java:351–378  ·  view source on GitHub ↗
(frame_t old, PacketEntitiesMessage m)

Source from the content-addressed store, hash-verified

349 * ================ CL_ParseFrame ================
350 */
351 public static void parsePacketEntities(frame_t old, PacketEntitiesMessage m) {
352
353 ParsePacketEntities(old, ClientGlobals.cl.frame, m);
354
355 // save the frame off in the backup array for later delta comparisons
356 ClientGlobals.cl.frames[ClientGlobals.cl.frame.serverframe & Defines.UPDATE_MASK].set(ClientGlobals.cl.frame);
357
358 if (ClientGlobals.cl.frame.valid) {
359 // getting a valid frame message ends the connection process
360 if (ClientGlobals.cls.state != Defines.ca_active) {
361 ClientGlobals.cls.state = Defines.ca_active;
362 ClientGlobals.cl.force_refdef = true;
363
364 ClientGlobals.cl.predicted_origin[0] = ClientGlobals.cl.frame.playerstate.pmove.origin[0] * 0.125f;
365 ClientGlobals.cl.predicted_origin[1] = ClientGlobals.cl.frame.playerstate.pmove.origin[1] * 0.125f;
366 ClientGlobals.cl.predicted_origin[2] = ClientGlobals.cl.frame.playerstate.pmove.origin[2] * 0.125f;
367
368 Math3D.VectorCopy(ClientGlobals.cl.frame.playerstate.viewangles, ClientGlobals.cl.predicted_angles);
369 if (ClientGlobals.cls.disable_servercount != ClientGlobals.cl.servercount && ClientGlobals.cl.refresh_prepped)
370 SCR.EndLoadingPlaque(); // get rid of loading plaque
371 }
372 ClientGlobals.cl.sound_prepped = true; // can start mixing ambient sounds
373
374 // fire entity events
375 FireEntityEvents(ClientGlobals.cl.frame);
376 CL_pred.CheckPredictionError();
377 }
378 }
379
380 /*
381 * ==========================================================================

Callers 1

ParseServerMessageMethod · 0.95

Calls 6

ParsePacketEntitiesMethod · 0.95
VectorCopyMethod · 0.95
EndLoadingPlaqueMethod · 0.95
FireEntityEventsMethod · 0.95
CheckPredictionErrorMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected