mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Collected and moved existing camera infrastructure from game.cpp to camera.cpp and camera.h. Introduced configuration settings 'fov' which chooses the camera's (vertical) field of view and 'view_bobbing' which currently does nothing. Other code refactored to not expect the FOV to be a build time constant.
This commit is contained in:
parent
c0b35fa429
commit
baf7da9d4a
13 changed files with 428 additions and 209 deletions
|
@ -518,11 +518,12 @@ public:
|
|||
ISceneNode::drop();
|
||||
}
|
||||
|
||||
void updateCamera(v3f pos, v3f dir)
|
||||
void updateCamera(v3f pos, v3f dir, f32 fov)
|
||||
{
|
||||
JMutexAutoLock lock(m_camera_mutex);
|
||||
m_camera_position = pos;
|
||||
m_camera_direction = dir;
|
||||
m_camera_fov = fov;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -603,6 +604,7 @@ private:
|
|||
|
||||
v3f m_camera_position;
|
||||
v3f m_camera_direction;
|
||||
f32 m_camera_fov;
|
||||
JMutex m_camera_mutex;
|
||||
|
||||
core::map<v2s16, bool> m_last_drawn_sectors;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue