| 352 | } |
| 353 | |
| 354 | Command::Result cHermiteCatmullSpline(const Command::ArgumentList_t& args, ConsoleInterface& c, AbstractModeManager&) |
| 355 | { |
| 356 | //TODO: only works on larger maps with coordinates > 10 |
| 357 | if(args.size() < 5) |
| 358 | { |
| 359 | c.print("\nERROR: You need to specify at least two coordinate's pair.\n"); |
| 360 | return Command::Result::INVALID_ARGUMENT; |
| 361 | } |
| 362 | |
| 363 | |
| 364 | CameraManager* cm = ODFrameListener::getSingleton().getCameraManager(); |
| 365 | std::size_t numPairs = (args.size() - 1) / 2; |
| 366 | |
| 367 | cm->resetHCSNodes(numPairs); |
| 368 | for(std::size_t i = 1; i < args.size() - 1; i +=2) |
| 369 | { |
| 370 | int a = Helper::toInt(args[i]); |
| 371 | int b = Helper::toInt(args[i + 1]); |
| 372 | //TODO: Why are the points specified as integers? |
| 373 | cm->addHCSNodes(a, b); |
| 374 | c.print("Adding nodes: " + args[i] + ", " + args[i + 1]); |
| 375 | } |
| 376 | |
| 377 | cm->setCatmullSplineMode(true); |
| 378 | return Command::Result::SUCCESS; |
| 379 | } |
| 380 | |
| 381 | Command::Result cSrvAddGold(const Command::ArgumentList_t& args, ConsoleInterface& c, GameMap& gameMap) |
| 382 | { |
nothing calls this directly
no test coverage detected