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

Method unpackData

Engine/source/T3D/item.cpp:206–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void ItemData::unpackData(BitStream* stream)
207{
208 Parent::unpackData(stream);
209 friction = stream->readFloat(10);
210 elasticity = stream->readFloat(10);
211 sticky = stream->readFlag();
212 if(stream->readFlag())
213 gravityMod = stream->readFloat(10);
214 else
215 gravityMod = 1.0;
216
217 if(stream->readFlag())
218 stream->read(&maxVelocity);
219 else
220 maxVelocity = -1;
221
222 if(stream->readFlag())
223 {
224 lightType = stream->readInt(2);
225 lightColor.red = stream->readFloat(7);
226 lightColor.green = stream->readFloat(7);
227 lightColor.blue = stream->readFloat(7);
228 lightColor.alpha = stream->readFloat(7);
229 stream->read(&lightTime);
230 stream->read(&lightRadius);
231 lightOnlyStatic = stream->readFlag();
232 }
233 else
234 lightType = Item::NoLight;
235
236 simpleServerCollision = stream->readFlag();
237}
238
239
240//----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

readFloatMethod · 0.80
readFlagMethod · 0.80
readIntMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected