|
@@ -324,6 +324,7 @@ int Game::command(std::vector<char *> *args) {
|
324
|
324
|
getConsole().print(" mode MODE");
|
325
|
325
|
getConsole().print(" animate [BOOL|n|p]");
|
326
|
326
|
getConsole().print(" light BOOL");
|
|
327
|
+ getConsole().print(" fog BOOL");
|
327
|
328
|
} else if (strcmp(args->at(1), "sound") == 0) {
|
328
|
329
|
getConsole().print("game-sound-command Usage:");
|
329
|
330
|
getConsole().print(" game sound INT");
|
|
@@ -371,9 +372,25 @@ int Game::command(std::vector<char *> *args) {
|
371
|
372
|
getConsole().print("Invalid use of game-light-command!");
|
372
|
373
|
return -16;
|
373
|
374
|
}
|
|
375
|
+ } else if (strcmp(cmd, "fog") == 0) {
|
|
376
|
+ if (args->size() >= 2) {
|
|
377
|
+ bool b;
|
|
378
|
+ if (readBool(args->at(1), &b) < 0) {
|
|
379
|
+ getConsole().print("Pass BOOL to fog command!");
|
|
380
|
+ return -17;
|
|
381
|
+ }
|
|
382
|
+ if (b)
|
|
383
|
+ mRender->setFlags(Render::fFog);
|
|
384
|
+ else
|
|
385
|
+ mRender->clearFlags(Render::fFog);
|
|
386
|
+ getConsole().print("Fog is now %s", b ? "on" : "off");
|
|
387
|
+ } else {
|
|
388
|
+ getConsole().print("Invalid use of game-fog-command!");
|
|
389
|
+ return -18;
|
|
390
|
+ }
|
374
|
391
|
} else {
|
375
|
392
|
getConsole().print("Invalid use of game-command (%s)!", cmd);
|
376
|
|
- return -17;
|
|
393
|
+ return -19;
|
377
|
394
|
}
|
378
|
395
|
|
379
|
396
|
return 0;
|