Name cameras in debug mode, useful to debug particle effects (which need to be camera-specific)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7547 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-01-25 17:05:10 +00:00
parent e6c4797795
commit f71b7437b7
2 changed files with 7 additions and 1 deletions

View File

@ -43,6 +43,11 @@ Camera::Camera(int camera_index, const Kart* kart)
m_mode = CM_NORMAL;
m_index = camera_index;
m_camera = irr_driver->addCameraSceneNode();
#ifdef DEBUG
m_camera->setName(core::stringc("Camera for ") + kart->getKartProperties()->getName());
#endif
setupCamera();
m_distance = kart->getKartProperties()->getCameraDistance();
m_kart = kart;
@ -166,7 +171,6 @@ void Camera::setupCamera()
m_camera->setFOV(m_fov);
m_camera->setAspectRatio(m_aspect);
m_camera->setFarValue(World::getWorld()->getTrack()->getCameraFar());
} // setupCamera
// ----------------------------------------------------------------------------

View File

@ -47,6 +47,8 @@ public:
scene::ICameraSceneNode* curr_cam = irr_driver->getSceneManager()->getActiveCamera();
const core::vector3df& cam_pos = curr_cam->getPosition();
// printf("Affect called with now=%u, camera=%s\n", now, curr_cam->getName());
for (unsigned int n=0; n<count; n++)
{
scene::SParticle& curr = particlearray[n];