MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / CalculateError

Method CalculateError

engine/Poseidon/Network/Network.cpp:432–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432float NetworkObject::CalculateError(NetworkMessageContext& ctx)
433{
434 switch (ctx.GetClass())
435 {
436 case NMCUpdatePosition:
437 return ERR_COEF_TIME_POSITION * (Glob.time - ctx.GetMsgTime());
438 default:
439 return ERR_COEF_TIME_GENERIC * (Glob.time - ctx.GetMsgTime());
440 }
441}
442
443float NetworkObject::CalculateErrorCoef(Vector3Par position, Vector3Par cameraPosition)
444{

Callers 1

CreateObjectsListMethod · 0.45

Calls 7

GetClassMethod · 0.80
GetMsgTimeMethod · 0.80
GetCameraMethod · 0.80
GetIndicesMethod · 0.45
IdxTransferMethod · 0.45
Distance2Method · 0.45
PositionMethod · 0.45

Tested by

no test coverage detected