| 125 | } |
| 126 | |
| 127 | void PhysicsComponent::unpackUpdate(NetConnection *con, BitStream *stream) |
| 128 | { |
| 129 | Parent::unpackUpdate(con, stream); |
| 130 | |
| 131 | if(stream->readFlag()) |
| 132 | mathRead( *stream, &mVelocity ); |
| 133 | |
| 134 | if(stream->readFlag()) |
| 135 | { |
| 136 | mStatic = stream->readFlag(); |
| 137 | mAtRest = stream->readFlag(); |
| 138 | mAtRestCounter = stream->readInt(8); |
| 139 | |
| 140 | mathRead( *stream, &mGravity ); |
| 141 | |
| 142 | mDrag = stream->readFloat(12); |
| 143 | //mMass = stream->readFloat(12); |
| 144 | |
| 145 | mGravityMod = stream->readFloat(12); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | // |
| 150 | void PhysicsComponent::interpolateTick(F32 dt) |