mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 17:19:39 +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)
|
while (stream >> ignore1 >> ignore2 >> x >> y)
|
||||||
selection.add (CSMWorld::CellCoordinates (x, y));
|
selection.add (CSMWorld::CellCoordinates (x, y));
|
||||||
|
|
||||||
// Setup camera
|
// Mark that camera needs setup
|
||||||
mCurrentCamControl->setup(mRootNode, Mask_Reference | Mask_Terrain, CameraController::WorldUp);
|
mCamPositionSet=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (hint[0]=='r')
|
else if (hint[0]=='r')
|
||||||
|
|
|
@ -160,6 +160,7 @@ SceneWidget::SceneWidget(boost::shared_ptr<Resource::ResourceSystem> resourceSys
|
||||||
, mFreeCamControl(new FreeCameraController())
|
, mFreeCamControl(new FreeCameraController())
|
||||||
, mOrbitCamControl(new OrbitCameraController())
|
, mOrbitCamControl(new OrbitCameraController())
|
||||||
, mCurrentCamControl(mFreeCamControl.get())
|
, mCurrentCamControl(mFreeCamControl.get())
|
||||||
|
, mCamPositionSet(false)
|
||||||
{
|
{
|
||||||
mOrbitCamControl->setPickingMask(Mask_Reference | Mask_Terrain);
|
mOrbitCamControl->setPickingMask(Mask_Reference | Mask_Terrain);
|
||||||
selectNavigationMode("free");
|
selectNavigationMode("free");
|
||||||
|
@ -312,7 +313,15 @@ void SceneWidget::keyReleaseEvent (QKeyEvent *event)
|
||||||
|
|
||||||
void SceneWidget::update(double dt)
|
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)
|
void SceneWidget::settingChanged (const CSMPrefs::Setting *setting)
|
||||||
|
|
|
@ -118,6 +118,7 @@ namespace CSVRender
|
||||||
std::auto_ptr<FreeCameraController> mFreeCamControl;
|
std::auto_ptr<FreeCameraController> mFreeCamControl;
|
||||||
std::auto_ptr<OrbitCameraController> mOrbitCamControl;
|
std::auto_ptr<OrbitCameraController> mOrbitCamControl;
|
||||||
CameraController* mCurrentCamControl;
|
CameraController* mCurrentCamControl;
|
||||||
|
bool mCamPositionSet;
|
||||||
|
|
||||||
std::map<std::pair<Qt::MouseButton, bool>, std::string> mButtonMapping;
|
std::map<std::pair<Qt::MouseButton, bool>, std::string> mButtonMapping;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue