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

Method unpackUpdate

Engine/source/T3D/components/render/meshComponent.cpp:240–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void MeshComponent::unpackUpdate(NetConnection *con, BitStream *stream)
241{
242 Parent::unpackUpdate(con, stream);
243
244 if(stream->readFlag())
245 {
246 mShapeName = stream->readSTString();
247 setMeshAsset(mShapeName);
248 updateShape();
249 }
250
251 if(stream->readFlag())
252 {
253 mChangingMaterials.clear();
254 U32 materialCount = stream->readInt(16);
255
256 for(U32 i=0; i < materialCount; i++)
257 {
258 matMap newMatMap;
259 newMatMap.slot = stream->readInt(16);
260 newMatMap.matName = String(con->unpackNetStringHandleU(stream).getString());
261
262 mChangingMaterials.push_back(newMatMap);
263 }
264
265 updateMaterials();
266 }
267}
268
269void MeshComponent::prepRenderImage( SceneRenderState *state )
270{

Callers

nothing calls this directly

Calls 8

readFlagMethod · 0.80
readIntMethod · 0.80
StringClass · 0.50
readSTStringMethod · 0.45
clearMethod · 0.45
getStringMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected