|
@@ -339,7 +339,7 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
339
|
339
|
getConsole().print("Invalid use of hop-command!");
|
340
|
340
|
return -20;
|
341
|
341
|
}
|
342
|
|
- } else if (strcmp(command, "viewmodel") == 0) {
|
|
342
|
+ } else if (strcmp(command, "viewmodel") == 0) {
|
343
|
343
|
if (getGame().mLara) {
|
344
|
344
|
SkeletalModel *smdl = static_cast<SkeletalModel *>(getGame().mLara->tmpHook);
|
345
|
345
|
skeletal_model_t *mdl = getWorld().getModel(atoi(args->at(0)));
|
|
@@ -347,6 +347,16 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
347
|
347
|
smdl->setModel(mdl);
|
348
|
348
|
}
|
349
|
349
|
//m_render.ViewModel(LARA, atoi(cmd));
|
|
350
|
+ } else if (strcmp(command, "pos") == 0) {
|
|
351
|
+ if (getGame().mLara) {
|
|
352
|
+ getConsole().print("Position:");
|
|
353
|
+ getConsole().print(" Room %i (0x%X)", getGame().mLara->room, getWorld().getRoomInfo(getGame().mLara->room));
|
|
354
|
+ getConsole().print(" %.1fx %.1fy %.1fz", getGame().mLara->pos[0], getGame().mLara->pos[1], getGame().mLara->pos[2]);
|
|
355
|
+ getConsole().print(" %.1f Yaw %.1f Pitch", OR_RAD_TO_DEG(getGame().mLara->angles[1]), OR_RAD_TO_DEG(getGame().mLara->angles[2]));
|
|
356
|
+ } else {
|
|
357
|
+ getConsole().print("Load a level to get Laras position!");
|
|
358
|
+ return -21;
|
|
359
|
+ }
|
350
|
360
|
} else if (strcmp(command, "help") == 0) {
|
351
|
361
|
if (args->size() == 0) {
|
352
|
362
|
getConsole().print("Available commands:");
|
|
@@ -362,6 +372,7 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
362
|
372
|
getConsole().print(" fog - BOOL - GL Fog");
|
363
|
373
|
getConsole().print(" hop - BOOL - Room hop");
|
364
|
374
|
getConsole().print(" viewmodel - INT - Change Laras model");
|
|
375
|
+ getConsole().print(" pos - Print position info");
|
365
|
376
|
getConsole().print(" help - print command help");
|
366
|
377
|
getConsole().print(" quit - exit OpenRaider");
|
367
|
378
|
getConsole().print("Use help COMMAND to get additional info");
|
|
@@ -369,11 +380,11 @@ int OpenRaider::command(const char *command, std::vector<char *> *args) {
|
369
|
380
|
return help(args->at(0));
|
370
|
381
|
} else {
|
371
|
382
|
getConsole().print("Invalid use of help-command");
|
372
|
|
- return -21;
|
|
383
|
+ return -22;
|
373
|
384
|
}
|
374
|
385
|
} else {
|
375
|
386
|
getConsole().print("Unknown command: %s ", command);
|
376
|
|
- return -22;
|
|
387
|
+ return -23;
|
377
|
388
|
}
|
378
|
389
|
|
379
|
390
|
return 0;
|