diff --git a/ryzom/client/src/interface_v3/action_handler_game.cpp b/ryzom/client/src/interface_v3/action_handler_game.cpp index 06a97671d..fc7e7db82 100644 --- a/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -844,6 +844,20 @@ protected: }; REGISTER_ACTION_HANDLER( CHandlerContextFreeLook, "context_free_look"); +// *************************************************************************** +class CHandlerToggleFreeLook : public IActionHandler +{ +public: + void execute(CCtrlBase * /* pCaller */, const std::string & /* sParams */) + { + if (UserControls.getFreeLook()) + UserControls.stopFreeLook(); + else + UserControls.startFreeLook(); + } +}; +REGISTER_ACTION_HANDLER( CHandlerToggleFreeLook, "toggle_free_look"); + // *************************************************************************** // GCM Move // ***************************************************************************