Keep the camera looking to the same kart when changing view type (#3205)
Except for first-person view which keeps resetting to the player kart (the FP view itself is linked to it)
This commit is contained in:
parent
c23f1bbc5b
commit
539ab45b08
@ -550,21 +550,25 @@ bool handleContextMenuAction(s32 cmd_id)
|
||||
case DEBUG_GUI_CAM_TOP:
|
||||
CameraDebug::setDebugType(CameraDebug::CM_DEBUG_TOP_OF_KART);
|
||||
Camera::changeCamera(0, Camera::CM_TYPE_DEBUG);
|
||||
Camera::getActiveCamera()->setKart(World::getWorld()->getKart(kart_num));
|
||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||
break;
|
||||
case DEBUG_GUI_CAM_WHEEL:
|
||||
CameraDebug::setDebugType(CameraDebug::CM_DEBUG_GROUND);
|
||||
Camera::changeCamera(0, Camera::CM_TYPE_DEBUG);
|
||||
Camera::getActiveCamera()->setKart(World::getWorld()->getKart(kart_num));
|
||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||
break;
|
||||
case DEBUG_GUI_CAM_BEHIND_KART:
|
||||
CameraDebug::setDebugType(CameraDebug::CM_DEBUG_BEHIND_KART);
|
||||
Camera::changeCamera(0, Camera::CM_TYPE_DEBUG);
|
||||
Camera::getActiveCamera()->setKart(World::getWorld()->getKart(kart_num));
|
||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||
break;
|
||||
case DEBUG_GUI_CAM_SIDE_OF_KART:
|
||||
CameraDebug::setDebugType(CameraDebug::CM_DEBUG_SIDE_OF_KART);
|
||||
Camera::changeCamera(0, Camera::CM_TYPE_DEBUG);
|
||||
Camera::getActiveCamera()->setKart(World::getWorld()->getKart(kart_num));
|
||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||
break;
|
||||
case DEBUG_GUI_CAM_FREE:
|
||||
@ -585,6 +589,7 @@ bool handleContextMenuAction(s32 cmd_id)
|
||||
{
|
||||
Camera *camera = Camera::getActiveCamera();
|
||||
Camera::changeCamera(camera->getIndex(), Camera::CM_TYPE_NORMAL);
|
||||
Camera::getActiveCamera()->setKart(World::getWorld()->getKart(kart_num));
|
||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user