Bläddra i källkod

Added ponypos command

Thomas Buck 11 år sedan
förälder
incheckning
a0cdd7aa21
1 ändrade filer med 13 tillägg och 2 borttagningar
  1. 13
    2
      src/OpenRaider.cpp

+ 13
- 2
src/OpenRaider.cpp Visa fil

571
             getConsole().print("Invalid use of pigtail-command!");
571
             getConsole().print("Invalid use of pigtail-command!");
572
             return -47;
572
             return -47;
573
         }
573
         }
574
+    } else if (strcmp(command, "ponypos") == 0) {
575
+        if (args->size() > 3) {
576
+            gLaraModel->ponytail[0] = (float)atof(args->at(0));
577
+            gLaraModel->ponytail[1] = (float)atof(args->at(1));
578
+            gLaraModel->ponytail[2] = (float)atof(args->at(2));
579
+            gLaraModel->ponytailAngle = (float)atof(args->at(3));
580
+        } else {
581
+            getConsole().print("Invalid use of ponypos-command!");
582
+            return -48;
583
+        }
574
     } else if (strcmp(command, "help") == 0) {
584
     } else if (strcmp(command, "help") == 0) {
575
         if (args->size() == 0) {
585
         if (args->size() == 0) {
576
             getConsole().print("Available commands:");
586
             getConsole().print("Available commands:");
600
             getConsole().print("  allrooms  - BOOL");
610
             getConsole().print("  allrooms  - BOOL");
601
             getConsole().print("  ponytail  - BOOL");
611
             getConsole().print("  ponytail  - BOOL");
602
             getConsole().print("  pigtail   - BOOL");
612
             getConsole().print("  pigtail   - BOOL");
613
+            getConsole().print("  ponypos   - FLOAT FLOAT FLOAT FLOAT - x y z angle");
603
             getConsole().print("  help      - print command help");
614
             getConsole().print("  help      - print command help");
604
             getConsole().print("  quit      - exit OpenRaider");
615
             getConsole().print("  quit      - exit OpenRaider");
605
             getConsole().print("Use help COMMAND to get additional info");
616
             getConsole().print("Use help COMMAND to get additional info");
607
             return help(args->at(0));
618
             return help(args->at(0));
608
         } else {
619
         } else {
609
             getConsole().print("Invalid use of help-command");
620
             getConsole().print("Invalid use of help-command");
610
-            return -48;
621
+            return -49;
611
         }
622
         }
612
     } else {
623
     } else {
613
         getConsole().print("Unknown command: %s ", command);
624
         getConsole().print("Unknown command: %s ", command);
614
-        return -49;
625
+        return -50;
615
     }
626
     }
616
 
627
 
617
     return 0;
628
     return 0;

Laddar…
Avbryt
Spara