|
@@ -389,6 +389,23 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
389
|
389
|
getConsole().print("Invalid use of ralpha-command!");
|
390
|
390
|
return -25;
|
391
|
391
|
}
|
|
392
|
+ } else if (strcmp(command, "portal") == 0) {
|
|
393
|
+
|
|
394
|
+ if (args->size() > 0) {
|
|
395
|
+ bool b;
|
|
396
|
+ if (readBool(args->at(0), &b) < 0) {
|
|
397
|
+ getConsole().print("Pass BOOL to portal command!");
|
|
398
|
+ return -26;
|
|
399
|
+ }
|
|
400
|
+ if (b)
|
|
401
|
+ getRender().setFlags(Render::fPortals);
|
|
402
|
+ else
|
|
403
|
+ getRender().clearFlags(Render::fPortals);
|
|
404
|
+ getConsole().print("Portals are now %s", b ? "on" : "off");
|
|
405
|
+ } else {
|
|
406
|
+ getConsole().print("Invalid use of portal-command!");
|
|
407
|
+ return -27;
|
|
408
|
+ }
|
392
|
409
|
} else if (strcmp(command, "help") == 0) {
|
393
|
410
|
if (args->size() == 0) {
|
394
|
411
|
getConsole().print("Available commands:");
|
|
@@ -407,6 +424,7 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
407
|
424
|
getConsole().print(" pos - Print position info");
|
408
|
425
|
getConsole().print(" vmodel - BOOL - View Model");
|
409
|
426
|
getConsole().print(" ralpha - BOOL - Room Alpha");
|
|
427
|
+ getConsole().print(" portal - BOOL");
|
410
|
428
|
getConsole().print(" help - print command help");
|
411
|
429
|
getConsole().print(" quit - exit OpenRaider");
|
412
|
430
|
getConsole().print("Use help COMMAND to get additional info");
|
|
@@ -414,11 +432,11 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
414
|
432
|
return help(args->at(0));
|
415
|
433
|
} else {
|
416
|
434
|
getConsole().print("Invalid use of help-command");
|
417
|
|
- return -26;
|
|
435
|
+ return -28;
|
418
|
436
|
}
|
419
|
437
|
} else {
|
420
|
438
|
getConsole().print("Unknown command: %s ", command);
|
421
|
|
- return -27;
|
|
439
|
+ return -29;
|
422
|
440
|
}
|
423
|
441
|
|
424
|
442
|
return 0;
|