Moved the camera debug parameter from UserConfig to a static value
in camera. Added proper names for the debug modes instead of int.
This commit is contained in:
parent
ef1e5da4bc
commit
f59ea0f258
@ -521,11 +521,6 @@ namespace UserConfigParams
|
|||||||
/** True if check structures should be debugged. */
|
/** True if check structures should be debugged. */
|
||||||
PARAM_PREFIX bool m_check_debug PARAM_DEFAULT( false );
|
PARAM_PREFIX bool m_check_debug PARAM_DEFAULT( false );
|
||||||
|
|
||||||
/** Special debug camera: 0: normal camera; 1: being high over the kart;
|
|
||||||
2: on ground level; 3: free first person camera;
|
|
||||||
4: straight behind kart */
|
|
||||||
PARAM_PREFIX int m_camera_debug PARAM_DEFAULT( false );
|
|
||||||
|
|
||||||
/** True if physics debugging should be enabled. */
|
/** True if physics debugging should be enabled. */
|
||||||
PARAM_PREFIX bool m_physics_debug PARAM_DEFAULT( false );
|
PARAM_PREFIX bool m_physics_debug PARAM_DEFAULT( false );
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ AlignedArray<Camera::EndCameraInformation> Camera::m_end_cameras;
|
|||||||
std::vector<Camera*> Camera::m_all_cameras;
|
std::vector<Camera*> Camera::m_all_cameras;
|
||||||
|
|
||||||
Camera* Camera::s_active_camera = NULL;
|
Camera* Camera::s_active_camera = NULL;
|
||||||
|
Camera::DebugMode Camera::m_debug_mode = Camera::CM_DEBUG_NONE;
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
Camera::Camera(int camera_index, AbstractKart* kart) : m_kart(NULL)
|
Camera::Camera(int camera_index, AbstractKart* kart) : m_kart(NULL)
|
||||||
@ -453,13 +454,13 @@ void Camera::getCameraSettings(float *above_kart, float *cam_angle,
|
|||||||
case CM_NORMAL:
|
case CM_NORMAL:
|
||||||
case CM_FALLING:
|
case CM_FALLING:
|
||||||
{
|
{
|
||||||
if(UserConfigParams::m_camera_debug==2)
|
if(m_debug_mode==CM_DEBUG_GROUND)
|
||||||
{
|
{
|
||||||
*above_kart = 0;
|
*above_kart = 0;
|
||||||
*cam_angle = 0;
|
*cam_angle = 0;
|
||||||
*distance = -m_kart->getKartModel()->getLength()-1.0f;
|
*distance = -m_kart->getKartModel()->getLength()-1.0f;
|
||||||
}
|
}
|
||||||
else if(UserConfigParams::m_camera_debug==4)
|
else if(m_debug_mode==CM_DEBUG_BEHIND_KART)
|
||||||
{
|
{
|
||||||
*above_kart = 0;
|
*above_kart = 0;
|
||||||
*cam_angle = 0;
|
*cam_angle = 0;
|
||||||
@ -548,20 +549,20 @@ void Camera::update(float dt)
|
|||||||
float above_kart, cam_angle, side_way, distance;
|
float above_kart, cam_angle, side_way, distance;
|
||||||
bool smoothing;
|
bool smoothing;
|
||||||
|
|
||||||
|
// To view inside tunnels in top mode, increase near value
|
||||||
|
m_camera->setNearValue(m_debug_mode==CM_DEBUG_TOP_OF_KART ? 27.0f : 1.0f);
|
||||||
|
|
||||||
// The following settings give a debug camera which shows the track from
|
// The following settings give a debug camera which shows the track from
|
||||||
// high above the kart straight down.
|
// high above the kart straight down.
|
||||||
if (UserConfigParams::m_camera_debug==1)
|
if (m_debug_mode==CM_DEBUG_TOP_OF_KART)
|
||||||
{
|
{
|
||||||
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
|
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
|
||||||
m_camera->setTarget(xyz);
|
m_camera->setTarget(xyz);
|
||||||
xyz.Y = xyz.Y+55;
|
xyz.Y = xyz.Y+55;
|
||||||
xyz.Z -= 5.0f;
|
xyz.Z -= 5.0f;
|
||||||
m_camera->setPosition(xyz);
|
m_camera->setPosition(xyz);
|
||||||
// To view inside tunnels (FIXME 27>15 why??? makes no sense
|
|
||||||
// - the kart should not be visible, but it works)
|
|
||||||
m_camera->setNearValue(27.0);
|
|
||||||
}
|
}
|
||||||
else if (UserConfigParams::m_camera_debug==5)
|
else if (m_debug_mode==CM_DEBUG_SIDE_OF_KART)
|
||||||
{
|
{
|
||||||
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
|
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
|
||||||
Vec3 offset(3, 0, 0);
|
Vec3 offset(3, 0, 0);
|
||||||
@ -570,7 +571,7 @@ void Camera::update(float dt)
|
|||||||
m_camera->setPosition(offset.toIrrVector());
|
m_camera->setPosition(offset.toIrrVector());
|
||||||
}
|
}
|
||||||
// Update the first person camera
|
// Update the first person camera
|
||||||
else if (UserConfigParams::m_camera_debug == 3)
|
else if (m_debug_mode == CM_DEBUG_FPS)
|
||||||
{
|
{
|
||||||
vector3df direction(m_camera->getTarget() - m_camera->getPosition());
|
vector3df direction(m_camera->getTarget() - m_camera->getPosition());
|
||||||
vector3df up(m_camera->getUpVector());
|
vector3df up(m_camera->getUpVector());
|
||||||
@ -729,7 +730,7 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
|
|||||||
{
|
{
|
||||||
Vec3 wanted_position;
|
Vec3 wanted_position;
|
||||||
Vec3 wanted_target = m_kart->getXYZ();
|
Vec3 wanted_target = m_kart->getXYZ();
|
||||||
if(UserConfigParams::m_camera_debug==2)
|
if(m_debug_mode==CM_DEBUG_GROUND)
|
||||||
{
|
{
|
||||||
const btWheelInfo &w = m_kart->getVehicle()->getWheelInfo(2);
|
const btWheelInfo &w = m_kart->getVehicle()->getWheelInfo(2);
|
||||||
wanted_target.setY(w.m_raycastInfo.m_contactPointWS.getY());
|
wanted_target.setY(w.m_raycastInfo.m_contactPointWS.getY());
|
||||||
@ -749,7 +750,7 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
|
|||||||
btQuaternion q(m_kart->getSkidding()->getVisualSkidRotation(), 0, 0);
|
btQuaternion q(m_kart->getSkidding()->getVisualSkidRotation(), 0, 0);
|
||||||
t.setBasis(t.getBasis() * btMatrix3x3(q));
|
t.setBasis(t.getBasis() * btMatrix3x3(q));
|
||||||
}
|
}
|
||||||
if (UserConfigParams::m_camera_debug == 2)
|
if (m_debug_mode == CM_DEBUG_GROUND)
|
||||||
{
|
{
|
||||||
wanted_position = t(relative_position);
|
wanted_position = t(relative_position);
|
||||||
// Make sure that the Y position is a the same height as the wheel.
|
// Make sure that the Y position is a the same height as the wheel.
|
||||||
@ -758,7 +759,7 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
|
|||||||
else
|
else
|
||||||
wanted_position = t(relative_position);
|
wanted_position = t(relative_position);
|
||||||
|
|
||||||
if (smoothing && UserConfigParams::m_camera_debug==0)
|
if (smoothing && !isDebug())
|
||||||
{
|
{
|
||||||
smoothMoveCamera(dt);
|
smoothMoveCamera(dt);
|
||||||
}
|
}
|
||||||
|
@ -58,11 +58,26 @@ public:
|
|||||||
CM_FINAL, //!< Final camera
|
CM_FINAL, //!< Final camera
|
||||||
CM_SIMPLE_REPLAY,
|
CM_SIMPLE_REPLAY,
|
||||||
CM_FALLING
|
CM_FALLING
|
||||||
};
|
}; // Mode
|
||||||
|
|
||||||
|
enum DebugMode {
|
||||||
|
CM_DEBUG_NONE,
|
||||||
|
CM_DEBUG_TOP_OF_KART, //!< Camera hovering over kart
|
||||||
|
CM_DEBUG_GROUND, //!< Camera at ground level, wheel debugging
|
||||||
|
CM_DEBUG_FPS, //!< FPS Camera
|
||||||
|
CM_DEBUG_BEHIND_KART, //!< Camera straight behind kart
|
||||||
|
CM_DEBUG_SIDE_OF_KART,//!< Camera to the right of the kart
|
||||||
|
}; // DebugMode
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Camera* s_active_camera;
|
static Camera* s_active_camera;
|
||||||
|
|
||||||
|
/** Special debug camera: 0: normal camera; 1: being high over the kart;
|
||||||
|
2: on ground level; 3: free first person camera;
|
||||||
|
4: straight behind kart */
|
||||||
|
static DebugMode m_debug_mode;
|
||||||
|
|
||||||
/** The camera scene node. */
|
/** The camera scene node. */
|
||||||
scene::ICameraSceneNode *m_camera;
|
scene::ICameraSceneNode *m_camera;
|
||||||
/** The project-view matrix of the previous frame, used for the blur shader. */
|
/** The project-view matrix of the previous frame, used for the blur shader. */
|
||||||
@ -267,16 +282,25 @@ public:
|
|||||||
|
|
||||||
static void readEndCamera(const XMLNode &root);
|
static void readEndCamera(const XMLNode &root);
|
||||||
static void clearEndCameras();
|
static void clearEndCameras();
|
||||||
void setMode (Mode mode_); /** Set the camera to the given mode */
|
// ------------------------------------------------------------------------
|
||||||
|
static void setDebugMode(DebugMode debug_mode) { m_debug_mode = debug_mode;}
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
static bool isDebug() { return m_debug_mode != CM_DEBUG_NONE; }
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
static bool isFPS() { return m_debug_mode == CM_DEBUG_FPS; }
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void setMode(Mode mode); /** Set the camera to the given mode */
|
||||||
Mode getMode();
|
Mode getMode();
|
||||||
/** Returns the camera index (or player kart index, which is the same). */
|
void reset();
|
||||||
int getIndex() const {return m_index;}
|
|
||||||
void reset ();
|
|
||||||
void setInitialTransform();
|
void setInitialTransform();
|
||||||
void activate(bool alsoActivateInIrrlicht=true);
|
void activate(bool alsoActivateInIrrlicht=true);
|
||||||
void update (float dt);
|
void update(float dt);
|
||||||
void setKart(AbstractKart *new_kart);
|
void setKart(AbstractKart *new_kart);
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
/** Returns the camera index (or player kart index, which is the same). */
|
||||||
|
int getIndex() const {return m_index;}
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Returns the project-view matrix of the previous frame. */
|
/** Returns the project-view matrix of the previous frame. */
|
||||||
core::matrix4 getPreviousPVMatrix() const { return m_previous_pv_matrix; }
|
core::matrix4 getPreviousPVMatrix() const { return m_previous_pv_matrix; }
|
||||||
|
@ -174,89 +174,97 @@ void InputManager::handleStaticAction(int key, int value)
|
|||||||
// Moving the first person camera
|
// Moving the first person camera
|
||||||
case KEY_KEY_W:
|
case KEY_KEY_W:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
core::vector3df vel(cam->getLinearVelocity());
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
vel.Z = value ? cam->getMaximumVelocity() : 0;
|
vel.Z = value ? cam->getMaximumVelocity() : 0;
|
||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEY_KEY_S:
|
case KEY_KEY_S:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
core::vector3df vel(cam->getLinearVelocity());
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
vel.Z = value ? -cam->getMaximumVelocity() : 0;
|
vel.Z = value ? -cam->getMaximumVelocity() : 0;
|
||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEY_KEY_D:
|
case KEY_KEY_D:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && !UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
core::vector3df vel(cam->getLinearVelocity());
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
vel.X = value ? -cam->getMaximumVelocity() : 0;
|
vel.X = value ? -cam->getMaximumVelocity() : 0;
|
||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEY_KEY_A:
|
case KEY_KEY_A:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
core::vector3df vel(cam->getLinearVelocity());
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
vel.X = value ? cam->getMaximumVelocity() : 0;
|
vel.X = value ? cam->getMaximumVelocity() : 0;
|
||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEY_KEY_R:
|
case KEY_KEY_R:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
core::vector3df vel(cam->getLinearVelocity());
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
vel.Y = value ? cam->getMaximumVelocity() : 0;
|
vel.Y = value ? cam->getMaximumVelocity() : 0;
|
||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEY_KEY_F:
|
case KEY_KEY_F:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
core::vector3df vel(cam->getLinearVelocity());
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
vel.Y = value ? -cam->getMaximumVelocity() : 0;
|
vel.Y = value ? -cam->getMaximumVelocity() : 0;
|
||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Rotating the first person camera
|
// Rotating the first person camera
|
||||||
case KEY_KEY_Q:
|
case KEY_KEY_Q:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *active_cam = Camera::getActiveCamera();
|
Camera *active_cam = Camera::getActiveCamera();
|
||||||
active_cam->setAngularVelocity(value ?
|
active_cam->setAngularVelocity(value ?
|
||||||
UserConfigParams::m_fpscam_max_angular_velocity : 0.0f);
|
UserConfigParams::m_fpscam_max_angular_velocity : 0.0f);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEY_KEY_E:
|
case KEY_KEY_E:
|
||||||
{
|
{
|
||||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
if (world && UserConfigParams::m_artist_debug_mode &&
|
||||||
UserConfigParams::m_camera_debug != 3) break;
|
Camera::isFPS() )
|
||||||
|
{
|
||||||
Camera *active_cam = Camera::getActiveCamera();
|
Camera *active_cam = Camera::getActiveCamera();
|
||||||
active_cam->setAngularVelocity(value ?
|
active_cam->setAngularVelocity(value ?
|
||||||
-UserConfigParams::m_fpscam_max_angular_velocity : 0);
|
-UserConfigParams::m_fpscam_max_angular_velocity : 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1001,7 +1009,7 @@ EventPropagation InputManager::input(const SEvent& event)
|
|||||||
|
|
||||||
if (type == EMIE_MOUSE_MOVED)
|
if (type == EMIE_MOUSE_MOVED)
|
||||||
{
|
{
|
||||||
if (UserConfigParams::m_camera_debug == 3)
|
if (Camera::isFPS())
|
||||||
{
|
{
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
// Center of the screen
|
// Center of the screen
|
||||||
@ -1056,7 +1064,7 @@ EventPropagation InputManager::input(const SEvent& event)
|
|||||||
}
|
}
|
||||||
else if (type == EMIE_MOUSE_WHEEL)
|
else if (type == EMIE_MOUSE_WHEEL)
|
||||||
{
|
{
|
||||||
if (UserConfigParams::m_camera_debug == 3)
|
if (Camera::isFPS())
|
||||||
{
|
{
|
||||||
// Use scrolling to change the maximum speed
|
// Use scrolling to change the maximum speed
|
||||||
// Only test if it's more or less than 0 as it seems to be not
|
// Only test if it's more or less than 0 as it seems to be not
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "karts/controller/ai_base_controller.hpp"
|
#include "karts/controller/ai_base_controller.hpp"
|
||||||
|
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
|
#include "graphics/camera.hpp"
|
||||||
#include "karts/abstract_kart.hpp"
|
#include "karts/abstract_kart.hpp"
|
||||||
#include "karts/kart_properties.hpp"
|
#include "karts/kart_properties.hpp"
|
||||||
#include "karts/controller/ai_properties.hpp"
|
#include "karts/controller/ai_properties.hpp"
|
||||||
@ -65,7 +66,7 @@ void AIBaseController::update(float dt)
|
|||||||
void AIBaseController::setControllerName(const std::string &name)
|
void AIBaseController::setControllerName(const std::string &name)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if(m_ai_debug && !UserConfigParams::m_camera_debug)
|
if(m_ai_debug && !Camera::isDebug())
|
||||||
m_kart->setOnScreenText(core::stringw(name.c_str()).c_str());
|
m_kart->setOnScreenText(core::stringw(name.c_str()).c_str());
|
||||||
#endif
|
#endif
|
||||||
Controller::setControllerName(name);
|
Controller::setControllerName(name);
|
||||||
|
@ -150,6 +150,7 @@
|
|||||||
#include "config/player_profile.hpp"
|
#include "config/player_profile.hpp"
|
||||||
#include "config/stk_config.hpp"
|
#include "config/stk_config.hpp"
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
|
#include "graphics/camera.hpp"
|
||||||
#include "graphics/central_settings.hpp"
|
#include "graphics/central_settings.hpp"
|
||||||
#include "graphics/graphics_restrictions.hpp"
|
#include "graphics/graphics_restrictions.hpp"
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
@ -763,11 +764,11 @@ int handleCmdLine()
|
|||||||
if(UserConfigParams::m_artist_debug_mode)
|
if(UserConfigParams::m_artist_debug_mode)
|
||||||
{
|
{
|
||||||
if(CommandLine::has("--camera-wheel-debug"))
|
if(CommandLine::has("--camera-wheel-debug"))
|
||||||
UserConfigParams::m_camera_debug=2;
|
Camera::setDebugMode(Camera::CM_DEBUG_GROUND);
|
||||||
if(CommandLine::has("--camera-debug"))
|
if(CommandLine::has("--camera-debug"))
|
||||||
UserConfigParams::m_camera_debug=1;
|
Camera::setDebugMode(Camera::CM_DEBUG_TOP_OF_KART);
|
||||||
if(CommandLine::has("--camera-kart-debug"))
|
if(CommandLine::has("--camera-kart-debug"))
|
||||||
UserConfigParams::m_camera_debug=4;
|
Camera::setDebugMode(Camera::CM_DEBUG_BEHIND_KART);
|
||||||
if(CommandLine::has("--physics-debug"))
|
if(CommandLine::has("--physics-debug"))
|
||||||
UserConfigParams::m_physics_debug=1;
|
UserConfigParams::m_physics_debug=1;
|
||||||
if(CommandLine::has("--check-debug"))
|
if(CommandLine::has("--check-debug"))
|
||||||
|
@ -1761,7 +1761,7 @@ void Track::loadTrackModel(bool reverse_track, unsigned int mode_id)
|
|||||||
// It's important to execute this BEFORE the code that creates the skycube,
|
// It's important to execute this BEFORE the code that creates the skycube,
|
||||||
// otherwise the skycube node could be modified to have fog enabled, which
|
// otherwise the skycube node could be modified to have fog enabled, which
|
||||||
// we don't want
|
// we don't want
|
||||||
if (m_use_fog && !UserConfigParams::m_camera_debug && !CVS->isGLSL())
|
if (m_use_fog && !Camera::isDebug() && !CVS->isGLSL())
|
||||||
{
|
{
|
||||||
/* NOTE: if LINEAR type, density does not matter, if EXP or EXP2, start
|
/* NOTE: if LINEAR type, density does not matter, if EXP or EXP2, start
|
||||||
and end do not matter */
|
and end do not matter */
|
||||||
|
@ -440,27 +440,27 @@ bool handleContextMenuAction(s32 cmdID)
|
|||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_TOP)
|
else if (cmdID == DEBUG_GUI_CAM_TOP)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_camera_debug = 1;
|
Camera::setDebugMode(Camera::CM_DEBUG_TOP_OF_KART);
|
||||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_WHEEL)
|
else if (cmdID == DEBUG_GUI_CAM_WHEEL)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_camera_debug = 2;
|
Camera::setDebugMode(Camera::CM_DEBUG_GROUND);
|
||||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_BEHIND_KART)
|
else if (cmdID == DEBUG_GUI_CAM_BEHIND_KART)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_camera_debug = 4;
|
Camera::setDebugMode(Camera::CM_DEBUG_BEHIND_KART);
|
||||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_SIDE_OF_KART)
|
else if (cmdID == DEBUG_GUI_CAM_SIDE_OF_KART)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_camera_debug = 5;
|
Camera::setDebugMode(Camera::CM_DEBUG_SIDE_OF_KART);
|
||||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_FREE)
|
else if (cmdID == DEBUG_GUI_CAM_FREE)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_camera_debug = 3;
|
Camera::setDebugMode(Camera::CM_DEBUG_FPS);
|
||||||
irr_driver->getDevice()->getCursorControl()->setVisible(false);
|
irr_driver->getDevice()->getCursorControl()->setVisible(false);
|
||||||
// Reset camera rotation
|
// Reset camera rotation
|
||||||
Camera *cam = Camera::getActiveCamera();
|
Camera *cam = Camera::getActiveCamera();
|
||||||
@ -469,7 +469,7 @@ bool handleContextMenuAction(s32 cmdID)
|
|||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_NORMAL)
|
else if (cmdID == DEBUG_GUI_CAM_NORMAL)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_camera_debug = 0;
|
Camera::setDebugMode(Camera::CM_DEBUG_NONE);
|
||||||
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
irr_driver->getDevice()->getCursorControl()->setVisible(true);
|
||||||
}
|
}
|
||||||
else if (cmdID == DEBUG_GUI_CAM_SMOOTH)
|
else if (cmdID == DEBUG_GUI_CAM_SMOOTH)
|
||||||
|
Loading…
Reference in New Issue
Block a user