From c8a6dd9ee1b43f98d4d98e9feb981bde02ac8772 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 11 Feb 2017 18:50:30 +0100 Subject: [PATCH] Devtools: Improve fixtype cmd and document it --- Docs/DEVTOOLS.txt | 3 +++ Source/Devtools/ConsoleCmds.cpp | 13 +++++++------ Source/Objects/Person.hpp | 5 ----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Docs/DEVTOOLS.txt b/Docs/DEVTOOLS.txt index 7312be8..cfb8232 100644 --- a/Docs/DEVTOOLS.txt +++ b/Docs/DEVTOOLS.txt @@ -234,7 +234,10 @@ fixdialog (int) (string) - replaces the dialog of given index by the one described in the "string.txt" file. ddialog (int) - deletes given dialog (if no argument or -1, deletes the last dialog). Does not work when actually playing a dialog. +fixtype (int) (int) - fixes the type (2nd arg) of the given dialog (1st arg). play (int) - plays given dialog. +fixrotation - when playing a dialog, sets the in-dialog yaw of the current + participant to its out-of-dialog yaw value. Graphics ~~~~~~~~ diff --git a/Source/Devtools/ConsoleCmds.cpp b/Source/Devtools/ConsoleCmds.cpp index 3ae5e20..63063ed 100644 --- a/Source/Devtools/ConsoleCmds.cpp +++ b/Source/Devtools/ConsoleCmds.cpp @@ -598,19 +598,20 @@ void ch_dialog(const char* args) void ch_fixdialog(const char* args) { char buf1[32]; - int whichdi; + int whichdlg = 0; - sscanf(args, "%d %31s", &whichdi, buf1); + sscanf(args, "%d %31s", &whichdlg, buf1); std::string filename = std::string("Dialogues/") + buf1 + ".txt"; - Dialog::dialogs[whichdi] = Dialog(Dialog::dialogs[whichdi].type, filename); + Dialog::dialogs[whichdlg] = Dialog(Dialog::dialogs[whichdlg].type, filename); } void ch_fixtype(const char* args) { - int dlg; - sscanf(args, "%d", &dlg); - Dialog::dialogs[0].type = dlg; + int whichdlg = 0; + int type = 0; + sscanf(args, "%d %d", &whichdlg, &type); + Dialog::dialogs[whichdlg].type = type; } void ch_fixrotation(const char*) diff --git a/Source/Objects/Person.hpp b/Source/Objects/Person.hpp index 322bdee..0734eaa 100644 --- a/Source/Objects/Person.hpp +++ b/Source/Objects/Person.hpp @@ -96,11 +96,6 @@ public: XYZ coords; XYZ velocity; - //~ XYZ proportionhead; - //~ XYZ proportionlegs; - //~ XYZ proportionarms; - //~ XYZ proportionbody; - float unconscioustime; bool immobile; -- 2.39.2