diff --git a/Generals/Code/GameEngine/Include/Common/MessageStream.h b/Generals/Code/GameEngine/Include/Common/MessageStream.h index a36aeed7ad..8c5e6c188e 100644 --- a/Generals/Code/GameEngine/Include/Common/MessageStream.h +++ b/Generals/Code/GameEngine/Include/Common/MessageStream.h @@ -263,8 +263,10 @@ class GameMessage : public MemoryPoolObject MSG_META_BEGIN_CAMERA_ROTATE_LEFT, MSG_META_END_CAMERA_ROTATE_LEFT, + MSG_META_ALT_CAMERA_ROTATE_LEFT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments MSG_META_BEGIN_CAMERA_ROTATE_RIGHT, MSG_META_END_CAMERA_ROTATE_RIGHT, + MSG_META_ALT_CAMERA_ROTATE_RIGHT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments MSG_META_BEGIN_CAMERA_ZOOM_IN, MSG_META_END_CAMERA_ZOOM_IN, MSG_META_BEGIN_CAMERA_ZOOM_OUT, diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index f71498c242..1d4dd5189a 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -3271,6 +3271,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingLeft(), ("Clearing rotate camera left, but it's already clear!")); TheInGameUI->setCameraRotateLeft( false ); break; + case GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT: + if (TheTacticalView->isCameraMovementFinished()) + TheTacticalView->rotateCamera(-1.0f / 8.0f, 500); + break; case GameMessage::MSG_META_BEGIN_CAMERA_ROTATE_RIGHT: DEBUG_ASSERTCRASH(!TheInGameUI->isCameraRotatingRight(), ("Setting rotate camera right, but it's already set!")); TheInGameUI->setCameraRotateRight( true ); @@ -3279,6 +3283,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingRight(), ("Clearing rotate camera right, but it's already clear!")); TheInGameUI->setCameraRotateRight( false ); break; + case GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT: + if (TheTacticalView->isCameraMovementFinished()) + TheTacticalView->rotateCamera(1.0f / 8.0f, 500); + break; case GameMessage::MSG_META_BEGIN_CAMERA_ZOOM_IN: DEBUG_ASSERTCRASH(!TheInGameUI->isCameraZoomingIn(), ("Setting zoom camera in, but it's already set!")); TheInGameUI->setCameraZoomIn( true ); diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp index 2b8b0c18a0..82e81e29f7 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp @@ -793,6 +793,24 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t) map->m_displayName = TheGameText->FETCH_OR_SUBSTITUTE("GUI:SelectNextIdleWorker", L"Next Idle Worker"); } } + { + MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT); + if (map->m_key == MK_NONE) { + map->m_key = MK_KP4; + map->m_transition = DOWN; + map->m_modState = CTRL; + map->m_usableIn = COMMANDUSABLE_GAME; + } + } + { + MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT); + if (map->m_key == MK_NONE) { + map->m_key = MK_KP6; + map->m_transition = DOWN; + map->m_modState = CTRL; + map->m_usableIn = COMMANDUSABLE_GAME; + } + } #if defined(RTS_DEBUG) { diff --git a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h index 324f28cfdc..b0ae5db5e4 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h @@ -263,8 +263,10 @@ class GameMessage : public MemoryPoolObject MSG_META_BEGIN_CAMERA_ROTATE_LEFT, MSG_META_END_CAMERA_ROTATE_LEFT, + MSG_META_ALT_CAMERA_ROTATE_LEFT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments MSG_META_BEGIN_CAMERA_ROTATE_RIGHT, MSG_META_END_CAMERA_ROTATE_RIGHT, + MSG_META_ALT_CAMERA_ROTATE_RIGHT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments MSG_META_BEGIN_CAMERA_ZOOM_IN, MSG_META_END_CAMERA_ZOOM_IN, MSG_META_BEGIN_CAMERA_ZOOM_OUT, diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index 633474ef7f..b401e979cf 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -3416,6 +3416,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingLeft(), ("Clearing rotate camera left, but it's already clear!")); TheInGameUI->setCameraRotateLeft( false ); break; + case GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT: + if (TheTacticalView->isCameraMovementFinished()) + TheTacticalView->rotateCamera(-1.0f / 8.0f, 500, 100, 400); + break; case GameMessage::MSG_META_BEGIN_CAMERA_ROTATE_RIGHT: DEBUG_ASSERTCRASH(!TheInGameUI->isCameraRotatingRight(), ("Setting rotate camera right, but it's already set!")); TheInGameUI->setCameraRotateRight( true ); @@ -3424,6 +3428,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingRight(), ("Clearing rotate camera right, but it's already clear!")); TheInGameUI->setCameraRotateRight( false ); break; + case GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT: + if (TheTacticalView->isCameraMovementFinished()) + TheTacticalView->rotateCamera(1.0f / 8.0f, 500, 100, 400); + break; case GameMessage::MSG_META_BEGIN_CAMERA_ZOOM_IN: DEBUG_ASSERTCRASH(!TheInGameUI->isCameraZoomingIn(), ("Setting zoom camera in, but it's already set!")); TheInGameUI->setCameraZoomIn( true ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp index 2a7f4097fc..aeaf2287b4 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp @@ -851,6 +851,24 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t) map->m_displayName = TheGameText->FETCH_OR_SUBSTITUTE("GUI:SelectNextIdleWorker", L"Next Idle Worker"); } } + { + MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT); + if (map->m_key == MK_NONE) { + map->m_key = MK_KP4; + map->m_transition = DOWN; + map->m_modState = CTRL; + map->m_usableIn = COMMANDUSABLE_GAME; + } + } + { + MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT); + if (map->m_key == MK_NONE) { + map->m_key = MK_KP6; + map->m_transition = DOWN; + map->m_modState = CTRL; + map->m_usableIn = COMMANDUSABLE_GAME; + } + } #if defined(RTS_DEBUG) {