| 204 | } |
| 205 | |
| 206 | void 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 | //---------------------------------------------------------------------------- |