| 191 | //------------------------------------------------------------------------------ |
| 192 | |
| 193 | void fxShapeReplicator::CreateShapes(void) |
| 194 | { |
| 195 | F32 HypX, HypY; |
| 196 | F32 Angle; |
| 197 | U32 RelocationRetry; |
| 198 | Point3F ShapePosition; |
| 199 | Point3F ShapeStart; |
| 200 | Point3F ShapeEnd; |
| 201 | Point3F ShapeScale; |
| 202 | EulerF ShapeRotation; |
| 203 | QuatF QRotation; |
| 204 | bool CollisionResult; |
| 205 | RayInfo RayEvent; |
| 206 | TSShape* pShape; |
| 207 | |
| 208 | |
| 209 | // Don't create shapes if we are hiding replications. |
| 210 | if (mFieldData.mHideReplications) return; |
| 211 | |
| 212 | // Cannot continue without shapes! |
| 213 | if (String::compare(mFieldData.mShapeFile, "") == 0) return; |
| 214 | |
| 215 | // Check that we can position somewhere! |
| 216 | if (!( mFieldData.mAllowOnTerrain || |
| 217 | mFieldData.mAllowStatics || |
| 218 | mFieldData.mAllowOnWater)) |
| 219 | { |
| 220 | // Problem ... |
| 221 | Con::warnf(ConsoleLogEntry::General, "[%s] - Could not place object, All alloweds are off!", getName()); |
| 222 | |
| 223 | // Return here. |
| 224 | return; |
| 225 | } |
| 226 | |
| 227 | // Check Shapes. |
| 228 | AssertFatal(mCurrentShapeCount==0,"Shapes already present, this should not be possible!"); |
| 229 | |
| 230 | // Check that we have a shape... |
| 231 | if (!mFieldData.mShapeFile) return; |
| 232 | |
| 233 | // Set Seed. |
| 234 | RandomGen.setSeed(mFieldData.mSeed); |
| 235 | |
| 236 | // Set shape vector. |
| 237 | mReplicatedShapes.clear(); |
| 238 | |
| 239 | // Add shapes. |
| 240 | for (U32 idx = 0; idx < mFieldData.mShapeCount; idx++) |
| 241 | { |
| 242 | fxShapeReplicatedStatic* fxStatic; |
| 243 | |
| 244 | // Create our static shape. |
| 245 | fxStatic = new fxShapeReplicatedStatic(); |
| 246 | |
| 247 | // Set the 'shapeName' field. |
| 248 | fxStatic->setField("shapeName", mFieldData.mShapeFile); |
| 249 | |
| 250 | // Is this Replicator on the Server? |
nothing calls this directly
no test coverage detected