diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-31 23:53:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-31 23:53:53 +0300 |
commit | 1f96c689d074b5986243a8671154c0374f51af43 (patch) | |
tree | cabc8f3ce4361e53e59a57bd1d157d3457df357f /src | |
parent | 7ace68ca489ea19ae5025ad9f56465e3df930490 (diff) | |
download | plus-1f96c689d074b5986243a8671154c0374f51af43.tar.gz plus-1f96c689d074b5986243a8671154c0374f51af43.tar.bz2 plus-1f96c689d074b5986243a8671154c0374f51af43.tar.xz plus-1f96c689d074b5986243a8671154c0374f51af43.zip |
Add char command /restorecamera for restore camera to default state.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 9 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/dyetool/actions/commands.cpp | 1 | ||||
-rw-r--r-- | src/enums/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 6 |
5 files changed, 18 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index b9894aba6..b25600835 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -522,6 +522,15 @@ impHandler(moveCamera) return true; } +impHandler0(restoreCamera) +{ + if (!viewport) + return false; + + viewport->returnCamera(); + return true; +} + impHandler(imitation) { if (!localPlayer) diff --git a/src/actions/commands.h b/src/actions/commands.h index d2b6e5eeb..ea7e7d278 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -50,6 +50,7 @@ namespace Actions decHandler(navigate); decHandler(navigateTo); decHandler(moveCamera); + decHandler(restoreCamera); decHandler(imitation); decHandler(sendMail); decHandler(info); diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp index 5fa4c2c4b..369d25009 100644 --- a/src/dyetool/actions/commands.cpp +++ b/src/dyetool/actions/commands.cpp @@ -50,6 +50,7 @@ impHandlerVoid(follow) impHandlerVoid(navigate) impHandlerVoid(navigateTo) impHandlerVoid(moveCamera) +impHandlerVoid(restoreCamera) impHandlerVoid(imitation) impHandlerVoid(sendMail) impHandlerVoid(info) diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h index 3a2186f47..263613cbc 100644 --- a/src/enums/input/inputaction.h +++ b/src/enums/input/inputaction.h @@ -671,6 +671,7 @@ enumStart(InputAction) ADOPT_CHILD, DUMP_MEMORY_USAGE, SET_EMOTE_TYPE, + CAMERA_RESTORE, TOTAL } enumEnd(InputAction); diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index ad2517acc..d3a5257f4 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -5515,6 +5515,12 @@ static const InputActionData inputActionData "setemotetype", UseArgs_true, Protected_true}, + {"keyCameraRestore", + defaultAction(&Actions::restoreCamera), + InputCondition::INGAME, + "restorecamera|returncamera|camerarestore", + UseArgs_false, + Protected_false}, }; #undef defaultAction |