|
@@ -390,7 +390,6 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
390
|
390
|
return -25;
|
391
|
391
|
}
|
392
|
392
|
} else if (strcmp(command, "portal") == 0) {
|
393
|
|
-
|
394
|
393
|
if (args->size() > 0) {
|
395
|
394
|
bool b;
|
396
|
395
|
if (readBool(args->at(0), &b) < 0) {
|
|
@@ -406,6 +405,38 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
406
|
405
|
getConsole().print("Invalid use of portal-command!");
|
407
|
406
|
return -27;
|
408
|
407
|
}
|
|
408
|
+ } else if (strcmp(command, "vis") == 0) {
|
|
409
|
+ if (args->size() > 0) {
|
|
410
|
+ bool b;
|
|
411
|
+ if (readBool(args->at(0), &b) < 0) {
|
|
412
|
+ getConsole().print("Pass BOOL to vis command!");
|
|
413
|
+ return -28;
|
|
414
|
+ }
|
|
415
|
+ if (b)
|
|
416
|
+ getRender().setFlags(Render::fUsePortals);
|
|
417
|
+ else
|
|
418
|
+ getRender().clearFlags(Render::fUsePortals);
|
|
419
|
+ getConsole().print("Portals are now %s", b ? "on" : "off");
|
|
420
|
+ } else {
|
|
421
|
+ getConsole().print("Invalid use of vis-command!");
|
|
422
|
+ return -29;
|
|
423
|
+ }
|
|
424
|
+ } else if (strcmp(command, "upf") == 0) {
|
|
425
|
+ if (args->size() > 0) {
|
|
426
|
+ bool b;
|
|
427
|
+ if (readBool(args->at(0), &b) < 0) {
|
|
428
|
+ getConsole().print("Pass BOOL to upf command!");
|
|
429
|
+ return -30;
|
|
430
|
+ }
|
|
431
|
+ if (b)
|
|
432
|
+ getRender().setFlags(Render::fUpdateRoomListPerFrame);
|
|
433
|
+ else
|
|
434
|
+ getRender().clearFlags(Render::fUpdateRoomListPerFrame);
|
|
435
|
+ getConsole().print("URLPF is now %s", b ? "on" : "off");
|
|
436
|
+ } else {
|
|
437
|
+ getConsole().print("Invalid use of upf-command!");
|
|
438
|
+ return -31;
|
|
439
|
+ }
|
409
|
440
|
} else if (strcmp(command, "help") == 0) {
|
410
|
441
|
if (args->size() == 0) {
|
411
|
442
|
getConsole().print("Available commands:");
|
|
@@ -425,6 +456,8 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
425
|
456
|
getConsole().print(" vmodel - BOOL - View Model");
|
426
|
457
|
getConsole().print(" ralpha - BOOL - Room Alpha");
|
427
|
458
|
getConsole().print(" portal - BOOL");
|
|
459
|
+ getConsole().print(" vis - BOOL - Use Portals");
|
|
460
|
+ getConsole().print(" upf - BOOL - Update Room List Per Frame");
|
428
|
461
|
getConsole().print(" help - print command help");
|
429
|
462
|
getConsole().print(" quit - exit OpenRaider");
|
430
|
463
|
getConsole().print("Use help COMMAND to get additional info");
|
|
@@ -432,11 +465,11 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
432
|
465
|
return help(args->at(0));
|
433
|
466
|
} else {
|
434
|
467
|
getConsole().print("Invalid use of help-command");
|
435
|
|
- return -28;
|
|
468
|
+ return -32;
|
436
|
469
|
}
|
437
|
470
|
} else {
|
438
|
471
|
getConsole().print("Unknown command: %s ", command);
|
439
|
|
- return -29;
|
|
472
|
+ return -33;
|
440
|
473
|
}
|
441
|
474
|
|
442
|
475
|
return 0;
|