瀏覽代碼

Added ponytail command

Thomas Buck 11 年之前
父節點
當前提交
18daa90937
共有 1 個檔案被更改,包括 19 行新增2 行删除
  1. 19
    2
      src/OpenRaider.cpp

+ 19
- 2
src/OpenRaider.cpp 查看文件

533
             getConsole().print("Invalid use of allrooms-command!");
533
             getConsole().print("Invalid use of allrooms-command!");
534
             return -43;
534
             return -43;
535
         }
535
         }
536
+    } else if (strcmp(command, "ponytail") == 0) {
537
+        if (args->size() > 0) {
538
+            bool b;
539
+            if (readBool(args->at(0), &b) < 0) {
540
+                getConsole().print("Pass BOOL to ponytail command!");
541
+                return -44;
542
+            }
543
+            if (b)
544
+                getRender().setFlags(Render::fRenderPonytail);
545
+            else
546
+                getRender().clearFlags(Render::fRenderPonytail);
547
+            getConsole().print("Ponytail is now %s", b ? "on" : "off");
548
+        } else {
549
+            getConsole().print("Invalid use of ponytail-command!");
550
+            return -45;
551
+        }
536
     } else if (strcmp(command, "help") == 0) {
552
     } else if (strcmp(command, "help") == 0) {
537
         if (args->size() == 0) {
553
         if (args->size() == 0) {
538
             getConsole().print("Available commands:");
554
             getConsole().print("Available commands:");
560
             getConsole().print("  entmodel  - BOOL");
576
             getConsole().print("  entmodel  - BOOL");
561
             getConsole().print("  oneroom   - BOOL");
577
             getConsole().print("  oneroom   - BOOL");
562
             getConsole().print("  allrooms  - BOOL");
578
             getConsole().print("  allrooms  - BOOL");
579
+            getConsole().print("  ponytail  - BOOL");
563
             getConsole().print("  help      - print command help");
580
             getConsole().print("  help      - print command help");
564
             getConsole().print("  quit      - exit OpenRaider");
581
             getConsole().print("  quit      - exit OpenRaider");
565
             getConsole().print("Use help COMMAND to get additional info");
582
             getConsole().print("Use help COMMAND to get additional info");
567
             return help(args->at(0));
584
             return help(args->at(0));
568
         } else {
585
         } else {
569
             getConsole().print("Invalid use of help-command");
586
             getConsole().print("Invalid use of help-command");
570
-            return -44;
587
+            return -46;
571
         }
588
         }
572
     } else {
589
     } else {
573
         getConsole().print("Unknown command: %s ", command);
590
         getConsole().print("Unknown command: %s ", command);
574
-        return -45;
591
+        return -47;
575
     }
592
     }
576
 
593
 
577
     return 0;
594
     return 0;

Loading…
取消
儲存