| 131 | } |
| 132 | |
| 133 | bool FlyingVehicleData::preload(bool server, String &errorStr) |
| 134 | { |
| 135 | if (!Parent::preload(server, errorStr)) |
| 136 | return false; |
| 137 | |
| 138 | TSShapeInstance* si = new TSShapeInstance(mShape, false); |
| 139 | |
| 140 | // Resolve objects transmitted from server |
| 141 | if (!server) { |
| 142 | for (S32 i = 0; i < MaxSounds; i++) |
| 143 | { |
| 144 | if (mFlyingSounds[i]) |
| 145 | { |
| 146 | _setFlyingSounds(getFlyingSounds(i), i); |
| 147 | } |
| 148 | } |
| 149 | for (S32 j = 0; j < MaxJetEmitters; j++) |
| 150 | if (jetEmitter[j]) |
| 151 | Sim::findObject(SimObjectId((uintptr_t)jetEmitter[j]),jetEmitter[j]); |
| 152 | } |
| 153 | |
| 154 | // Extract collision planes from shape collision detail level |
| 155 | if (collisionDetails[0] != -1) |
| 156 | { |
| 157 | MatrixF imat(1); |
| 158 | PlaneExtractorPolyList polyList; |
| 159 | polyList.mPlaneList = &rigidBody.mPlaneList; |
| 160 | polyList.setTransform(&imat, Point3F(1,1,1)); |
| 161 | si->animate(collisionDetails[0]); |
| 162 | si->buildPolyList(&polyList,collisionDetails[0]); |
| 163 | } |
| 164 | |
| 165 | // Resolve jet nodes |
| 166 | for (S32 j = 0; j < MaxJetNodes; j++) |
| 167 | jetNode[j] = mShape->findNode(sJetNode[j]); |
| 168 | |
| 169 | // |
| 170 | maxSpeed = maneuveringForce / minDrag; |
| 171 | |
| 172 | delete si; |
| 173 | return true; |
| 174 | } |
| 175 | |
| 176 | void FlyingVehicleData::initPersistFields() |
| 177 | { |
nothing calls this directly
no test coverage detected