| 341 |  |  | 
| 342 |  | nTokens = tokenizer.countTokens(); | 
| 343 |  |  | 
| 344 | < | if (nTokens < 2) { | 
| 344 | > | if (nTokens < 2) { | 
| 345 |  | sprintf(painCave.errMsg, | 
| 346 |  | "DumpReader Error: Not enough Tokens.\n%s\n", line.c_str()); | 
| 347 |  | painCave.isFatal = 1; | 
| 357 |  | } | 
| 358 |  | std::string type = tokenizer.nextToken(); | 
| 359 |  | int size = type.size(); | 
| 360 | + |  | 
| 361 | + | size_t found; | 
| 362 | + |  | 
| 363 | + | if (needPos_) { | 
| 364 | + | found = type.find("p"); | 
| 365 | + | if (found == std::string::npos) { | 
| 366 | + | sprintf(painCave.errMsg, | 
| 367 | + | "DumpReader Error: StuntDouble %d has no Position\n" | 
| 368 | + | "\tField (\"p\") specified.\n%s\n", index, | 
| 369 | + | line.c_str()); | 
| 370 | + | painCave.isFatal = 1; | 
| 371 | + | simError(); | 
| 372 | + | } | 
| 373 | + | } | 
| 374 | + |  | 
| 375 | + | if (integrableObject->isDirectional()) { | 
| 376 | + | if (needQuaternion_) { | 
| 377 | + | found = type.find("q"); | 
| 378 | + | if (found == std::string::npos) { | 
| 379 | + | sprintf(painCave.errMsg, | 
| 380 | + | "DumpReader Error: Directional StuntDouble %d has no\n" | 
| 381 | + | "\tQuaternion Field (\"q\") specified.\n%s\n", index, | 
| 382 | + | line.c_str()); | 
| 383 | + | painCave.isFatal = 1; | 
| 384 | + | simError(); | 
| 385 | + | } | 
| 386 | + | } | 
| 387 | + | } | 
| 388 |  |  | 
| 389 |  | for(int i = 0; i < size; ++i) { | 
| 390 |  | switch(type[i]) { |