| 238 | } |
| 239 | |
| 240 | void 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 | |
| 269 | void MeshComponent::prepRenderImage( SceneRenderState *state ) |
| 270 | { |
nothing calls this directly
no test coverage detected