MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / unpackUpdate

Method unpackUpdate

Engine/source/navigation/navPath.cpp:677–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677void NavPath::unpackUpdate(NetConnection *conn, BitStream *stream)
678{
679 Parent::unpackUpdate(conn, stream);
680
681 mIsLooping = stream->readFlag();
682 mAlwaysRender = stream->readFlag();
683 mXray = stream->readFlag();
684 mRenderSearch = stream->readFlag();
685
686 if((mFromSet = stream->readFlag()) == true)
687 mathRead(*stream, &mFrom);
688 if((mToSet = stream->readFlag()) == true)
689 mathRead(*stream, &mTo);
690
691 if(stream->readFlag())
692 {
693 mPoints.clear();
694 mFlags.clear();
695 mPoints.setSize(stream->readInt(32));
696 mFlags.setSize(mPoints.size());
697 for(U32 i = 0; i < mPoints.size(); i++)
698 {
699 Point3F p;
700 mathRead(*stream, &p);
701 mPoints[i] = p;
702 mFlags[i] = stream->readInt(16);
703 }
704 resize();
705 }
706}
707
708DefineEngineMethod(NavPath, plan, bool, (),,
709 "@brief Find a path using the already-specified path properties.")

Callers

nothing calls this directly

Calls 7

mathReadFunction · 0.85
readFlagMethod · 0.80
readIntMethod · 0.80
resizeFunction · 0.50
clearMethod · 0.45
setSizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected