mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
Nah
Preview seem to not like removing mCamPositionSet and I have do other things.
This commit is contained in:
parent
c6bc30d6a8
commit
7cd991107c
3 changed files with 13 additions and 3 deletions
|
@ -485,8 +485,8 @@ void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint)
|
|||
while (stream >> ignore1 >> ignore2 >> x >> y)
|
||||
selection.add (CSMWorld::CellCoordinates (x, y));
|
||||
|
||||
// Setup camera
|
||||
mCurrentCamControl->setup(mRootNode, Mask_Reference | Mask_Terrain, CameraController::WorldUp);
|
||||
// Mark that camera needs setup
|
||||
mCamPositionSet=false;
|
||||
}
|
||||
}
|
||||
else if (hint[0]=='r')
|
||||
|
|
|
@ -160,6 +160,7 @@ SceneWidget::SceneWidget(boost::shared_ptr<Resource::ResourceSystem> resourceSys
|
|||
, mFreeCamControl(new FreeCameraController())
|
||||
, mOrbitCamControl(new OrbitCameraController())
|
||||
, mCurrentCamControl(mFreeCamControl.get())
|
||||
, mCamPositionSet(false)
|
||||
{
|
||||
mOrbitCamControl->setPickingMask(Mask_Reference | Mask_Terrain);
|
||||
selectNavigationMode("free");
|
||||
|
@ -312,7 +313,15 @@ void SceneWidget::keyReleaseEvent (QKeyEvent *event)
|
|||
|
||||
void SceneWidget::update(double dt)
|
||||
{
|
||||
mCurrentCamControl->update(dt);
|
||||
if(mCamPositionSet)
|
||||
{
|
||||
mCurrentCamControl->update(dt);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurrentCamControl->setup(mRootNode, Mask_Reference | Mask_Terrain, CameraController::WorldUp);
|
||||
mCamPositionSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
void SceneWidget::settingChanged (const CSMPrefs::Setting *setting)
|
||||
|
|
|
@ -118,6 +118,7 @@ namespace CSVRender
|
|||
std::auto_ptr<FreeCameraController> mFreeCamControl;
|
||||
std::auto_ptr<OrbitCameraController> mOrbitCamControl;
|
||||
CameraController* mCurrentCamControl;
|
||||
bool mCamPositionSet;
|
||||
|
||||
std::map<std::pair<Qt::MouseButton, bool>, std::string> mButtonMapping;
|
||||
|
||||
|
|
Loading…
Reference in a new issue